This project is the implementation of the infrastructure layer of the Forum Clean DDD Node built with Nest.js.
Features
- Create and Edit Questions: Users can create and edit questions. Questions can contain attachments such as images and PDFs.
- Answers and Comments: Other users can answer questions or make comments. They can also add attachments to their answers.
- Attachment Uploads: Attachments are uploaded to a Cloudflare R2 instance.
- Caching: Redis is used to cache question details, improving system performance.
- Nest.js
- Node.js
- TypeScript
- Prisma ORM
- Redis: Caching system to optimize access to question details.
- Vitest
- Cloudflare R2: Object storage for managing attachments.
- Clone this repository:
$ git clone https://github.com/luc-ribeiro/forum-clean-ddd-nest.git
-
Setup the
.env
variables in root, following thesrc/infra/env/env.ts
file -
Install dependencies:
$ npm install
- Build the Docker container:
$ docker compose up -d
- Run the tests:
# For unit tests
$ npm test
# For E2E tests
$ npm run test:e2e
- Run the project:
$ npm run start:dev