Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the codebase #9

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,52 @@ pnpm dev:web
pnpm dev:sdk
```

## Explaining the codebase

This codebase is a [Nx Monorepo](https://nx.dev/).

It includes:

1. 2 app projects: `api`, `web`
2. 2 e2e projects: `api-e2e`, `web-e2e`
3. 2 lib projects: `sdk`, `tools`

It is utilizing the below technologies for ease of development:

- Database: [PostgreSQL](https://www.postgresql.org/)
- Schema and database management: [Prisma](https://www.prisma.io/)
- E2E APIs: [GraphQL](https://graphql.org/)
- UI library: [Mantine](https://mantine.dev/)

The diagram below shows the dataflow E2E.

![Architecture](docs/Deanslist-Architecture.drawio.svg)

To get a detailed code structure run:

```shell
pnpm nx graph
```

### API code

The backend code is located under `./libs/api`.

- The `core` folder includes framework related and reusable functionality, e.g. app configuration, pagination, etc...
- Each app `<ENTITY>` has its own folder, `./libs/api/<ENTITY>`
- the `data-access` folder has code to interact with the database
- the `feature` folder has code to return data to the UI

### WEB code

The WEB code is located under `./libs/web`.

- The `core` folder includes framework related and reusable functionality, e.g. components, etc...
- Each app `<ENTITY>` has its own folder, `./libs/web/<ENTITY>`
- the `data-access` folder has code to get data from the API
- the `feature` folder sets up the routes and the pages
- the `ui` folder holds simple UI elements to be used in the `feature` code

## Extending the application

You can use the following commands to generate new models, API features, web features and SDK types.
Expand Down
4 changes: 4 additions & 0 deletions docs/Deanslist-Architecture.drawio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading