Carea-Backend is the backend for a car-selling platform.
- User Auth
- User Roles
- Inventory Management
- Order Management
The project is built on a monolith with the above functionalities separated in modules.
This allows for single responsibilities and higher cohesion of the modules.
The project uses the following technologies:
-
Nestjs
- The opinionated structuring of code into modules allows for good dev experience as well as cleaner code.
- The dependency injection allows for cleaner code.
-
Postgres
- The data used are highly related to each other thus a relational database is preferred.
-
Prisma
- The type-safety, declarative schema file, and good migration support made prisma the perfect choice the Orm.
-
Kafka
- Kafka is used to offer asynchronous processing of events as well as background processing of tasks such as sending emails.
-
Redis*
- Redis is used as a cache to complement the database’s performance.
-
Docker
- Used for deployment.
-
Graphql
- Preferred over rest because of the good dev experience, type-safety.
git clone https://github.com/smiley-geek/carea-backend.git
yarn
Copy .env.example to .env
Fill .env
yarn prisma db push
yarn start
Go to http://localhost:<port>/graphql
git clone https://github.com/smiley-geek/carea-backend.git
Copy .env.example to .env
Fill .env
yarn prisma db push
docker-compose up -d
Go to http://localhost:<port>/graphql
- Contains winston logs under logs folder
- Contains all logs and logs specific to errors
- Used for async processing of background tasks
- Can be used for further streaming purposes
- Can be integrated with a schema registry to achieve a typed experienced for the consumers.