Skip to content

do4-2022/polycode-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


PolyCode - Backend
PolyCode - Backend

Prepare yourself for coding interviews or learn new programming languages in minutes !

Website status

Key FeaturesHow To UseUseful CommandsCreditsRelated

Key Features

  • 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

How To Use

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.

Useful Commands

Generate an application

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.

Generate a library

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.

Development server

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.

Build

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.

Running unit tests

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.

Running end-to-end tests

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.

Credits

This software uses the following open source packages:

Related

polycode-frontend - Web version of PolyCode
polycode-ops - Operations management system for PolyCode

About

Backend API of PolyCode project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published