Skip to content

Latest commit

 

History

History
90 lines (74 loc) · 3.05 KB

README.md

File metadata and controls

90 lines (74 loc) · 3.05 KB

Forum

TypeScript NestJS Prisma Docker Redis

This repository handles the server-side functionalities of an educational forum. Built with Domain-Driven Design (DDD) and Clean Architecture principles. The backend is responsible for managing user authentication, handling discussion threads, and storing and retrieving data. This backend serves as the core for collaboration between students and teachers, providing a API to manage questions, answers, notifications, and other features.

📋 Contents

🛠️ Features

  • User registration and authentication.

  • Create, edit, and delete questions and answers.

  • Comment on questions and answers.

  • Mark the best answer for a question.

  • Notifications for key forum interactions.

  • File uploads and attachment management by Cloudflare R2.

  • 🚀 Technologies Used

  • Nest.js - A progressive Node.js framework.

  • Prisma - ORM for database access.

  • Vitest - Unit and e2e testing.

  • Docker - Containerization for execution.

  • Redis - Caching for performance optimization.

  • CloudFlare R2 - Upload and storage of attachments

💾 Setup and Installation

  1. Clone the repository:
    git clone https://github.com/DanielF-Cardoso/forum-nest.git
  2. Run Docker: To use Redis and Postgress services with Docker
    docker-compose up -d
  3. Set up environment variables: Create a .env file based on the provided example
    cp .env-example .env
  4. Install dependencies:
    npm install
  5. Set up the database: Ensure Prisma is properly configured and apply migrations
    npx prisma migrate dev

⚙️ How to Run

  1. Run the application locally:
    npm run start:dev

🧪 Running Tests

  • Run the Unit test:
    npm run test
  • Run the Unit tests in watch mode:
    npm run test:watch
  • Run the Unit tests with coverage:
    npm run test:cov
  • Run end-to-end tests:
    npm run test:e2e
  • Run end-to-end tests in watch mode:
    npm run test:watch