Skip to content

Forum API developed to apply fundamentals of Domain-Driven Design, Clean Architecture and SOLID. The architecture was designed using DDD concepts, applying controllers, use cases, unit and E2E tests, domain events, relationships, uploads, cache and other concepts. Built with Nest.js.

Notifications You must be signed in to change notification settings

luc-ribeiro/forum-clean-ddd-nest

Repository files navigation

Forum Clean Architecture DDD Nest.js

Clique aqui para ver a versão em Português.

💻 Project

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.

🚀 Technologies

  • Nest.js
  • Node.js
  • TypeScript
  • Prisma ORM
  • Redis: Caching system to optimize access to question details.
  • Vitest
  • Cloudflare R2: Object storage for managing attachments.

📄 How to use

  • Clone this repository:
  $ git clone https://github.com/luc-ribeiro/forum-clean-ddd-nest.git
  • Setup the .env variables in root, following the src/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

About

Forum API developed to apply fundamentals of Domain-Driven Design, Clean Architecture and SOLID. The architecture was designed using DDD concepts, applying controllers, use cases, unit and E2E tests, domain events, relationships, uploads, cache and other concepts. Built with Nest.js.

Topics

Resources

Stars

Watchers

Forks