- Build on top of NestJS with Express
- TypeScript & ES 2022+
- Build with first class monorepo support thanks to Nx
- Monolith application
- PostgresSQl, Mongo as databases
- JWT Authentification with RBAC & policies
- Email sending with AWS SES
- Hot reloading with Watchman
- Run code in Kubernetes with jobs
- Include charts deployment with Helm
To clone and run this application, you'll need Git, Node.js (which comes with npm), Docker and Postgres CLI installed on your computer. From your command line:
# Clone this repository
$ git clone [email protected]:do-polycode/backend.git
# Go into the repository
$ cd backend
# Install dependencies
$ npm install
# Start databases and external services
$ docker-compose up -d
# Run the api
$ npm start api
# Populate databases
$ npm run populate-db
# Run the runner
$ npm start runner
Note If you're using Linux Bash for Windows, see this guide or use
node
from the command prompt.
Run nx g @nrwl/nest:application my-app
to generate a nest application.
You can use any of the plugins to generate applications as well.
When using Nx, you can create multiple applications and libraries in the same workspace.
Run nx g @nrwl/nest:library my-lib
to generate a nest library.
Run nx g @nrwl/node:library my-lib
to generate a node library.
You can also use any of the plugins to generate libraries as well.
Libraries are shareable across libraries and applications. They can be imported from @polycode/my-lib
.
Run nx serve my-app
for a dev server. Navigate to http://localhost:3000/. The app will automatically reload if you change any of the source files.
Run nx build my-app
to build the project. The build artifacts will be stored in the dist/
directory. Use the --prod
flag for a production build.
Run nx test my-app
to execute the unit tests via Jest.
Run nx affected:test
to execute the unit tests affected by a change.
Run nx e2e my-app
to execute the end-to-end tests via Cypress.
Run nx affected:e2e
to execute the end-to-end tests affected by a change.
This software uses the following open source packages:
polycode-frontend - Web version of PolyCode
polycode-ops - Operations management system for PolyCode