GithubHelp home page GithubHelp logo

isabella232 / home-apps Goto Github PK

View Code? Open in Web Editor NEW

This project forked from juxt/home-apps

0.0 0.0 0.0 2.78 MB

Monorepo for SPAs that use home.juxt.site as a backend

Shell 0.28% JavaScript 34.92% Clojure 0.57% TypeScript 61.05% CSS 0.94% Makefile 0.04% HTML 0.79% SCSS 1.42%

home-apps's Introduction

Monorepo for internal JUXT apps

This monorepo uses NX to manage packages, builds, tests and development servers. It is a little complex (like a lot of js tools), but it allows very easy reuse of frontend components such as the generated site hooks.

It is recommended to install the NX vscode extension which saves you from remembering all the difference commands (generating new projects, testing, running, building etc).

There are two parts to developing one of these apps, the 'backend' and the frontend. The frontend can use any build system (clojurescript/etc) but NX built in tooling will use webpack and babel. The backend uses Site which generates a graphql API given a schema file. The same schema file is also used to generate react-hooks using graphql-code-generator and react-query.

Initial Setup

First run yarn from the root of the project. This will install all the dependencies and may take a while. Then run yarn from any directory with its own package.json (currently /libs/site and /apps/photography-guild).

Running a Frontend app

The basic command for running any frontend app is yarn nx run {APP_NAME}:serve where {APP_NAME} is the name of the app. For example yarn nx run photography-guild:serve.

Backend (changing the schema/generated graphql hooks)

You can either use the schema file in libs/site or make your own (see the photography app for an example of that). But if you want to make changes to the schema, you'll need to run the schema watcher script for the schema you are using. For example, in the photography app directory, run (after running yarn to install the dependencies):

yarn prod-generate

which will build react hooks for each 'operation' in operations.graphql as well as deploying the schema to the remote Site server when you edit the file.

If you have a local Site server running, see if there is a dev-generate command in the package.json file. If not you should be able to figure it out as its just a case of updating the domain from the prod example.

home-apps's People

Contributors

armincerf avatar luciodale avatar dinu-loredana avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.