Welcome! This is Universal Codes!
This is a responsive web application over a GraphQL API.
It is built using Typescript and Rust, with a React Frontend and a DGraph database. The code is heavily 'borrowed' Notify
The test framework is jest; functional areas are separated into packages and managed with lerna
- Install dependencies (Using node v20+ and yarn):
yarn install
- Setup Dgraph (see instructions here)
- You can then use the explorer (server URL is http://localhost:8080)
- Initialise DGraph schema and load data into DGraph:
yarn load-data
- Start the backend:
yarn start-backend
- Access v1 api at http://localhost:4007/v1/graphql
- Access internal api at http://localhost:4007/graphql
- Start the frontend:
yarn start-frontend
- Unit tests across frontend and the backend:
yarn test
- Test frontend:
yarn test-frontend
- Test backend (unit tests):
yarn test-backend
- Integration tests:
yarn test-integration
- Generate GraphQL Types:
yarn generate
We will need to make some updates to our release scripts since the code rearrange, and for the new frontend, but we'll cross that bridge when we get there :)
The prepare
script enables Husky, which we use for our git hooks. It only needs to be run once to be configured.
The prepare
script should run automatically on post-install (after yarn install
). If need be, you can also run it manually with yarn prepare
.
master
branch - is the stable release branchdevelop
branch - the main development branch
When developing, create an issue first then a branch based on the issue number. Current practice is to use the format #[issue number]-some-description
for the branch name. When ready, create a PR which targets develop
and when approved, merge to develop
. We aim to review PRs promptly and keep the PR list as low as possible as a kindness to other developers ( and reduce merge hell! )
There is also a extensive wiki which we may need to update the live system.