AgencyCRM is a management system for a company that allows you to create orders and monitor their implementation.
This is a server-side REST API application for AgencyCRM.
Here you can see a demo version of the project.
Authorization is available under one of 3 user roles:
Role | Email / Password |
---|---|
admin | admin@example.com / adminDemoPassword |
manager | manager@example.com / managerDemoPassword |
executor | executor@example.com / executorDemoPassword |
- NestJS as a server framework.
- TypeORM - ORM for working with the database.
- PostgreSQL as a database.
- Faker - generation fake data to fill the database.
- Passport.js for authentication.
- Swagger for API specification.
- Docker - for local development and deployment.
# Clone the repository
git clone https://github.com/Kotmail/agency-crm-backend.git
# Go to the folder
cd agency-crm-backend
Warning
You need to rename the .env.example file in the root folder to .env, and then change the values according to your needs.
After completing the steps above, select the preferred installation option below:
Prerequisites
- Node.js installed.
- Npm installed.
- PostgreSQL installed. A database has been created.
# Installing dependencies in the project folder
npm i
# Building a project
npm run build
# Running migrations to create a database structure.
npm run migration:run
# Filling the database with initial data (if necessary).
npm run db:seed
# Starting a server
# - for development
npm run start:dev
# - or for production
npm run start:prod
Prerequisites
- Docker installed.
- Docker Compose installed.
# Launching services
# - in development mode with a file watcher
docker compose --profile dev up --watch
# - in production mode
docker compose --profile prod up -d
After installation using one of the above methods, the API endpoints will be available at the local address: http://localhost:3000.
The API specification is implemented using Swagger and is available after starting the server at: http://localhost:3000/swagger.