Skip to content

Haguel/NestJS-Forum-Backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NestJS Logo

NestJS backend for a forum

License

Description

Here is my NestJS pet project. It provides a platform for users to make/edit/remove and like posts. Additionally there is logic for admins and moderators to manage complaints or just mute and ban users.

Features

  • User authentication and authorization
  • Create, read, update, and remove posts
  • Create, read, remove complaints
  • Liking system for posts
  • User roles and permissions
  • Moderation and administration tools
  • Swagger documentation
  • PostgreSQL as database

Installation

  1. Clone the repository:

    git clone https://github.com/Haguel/NestJS-Forum-Backend.git
    
  2. Install dependencies

     cd NestJS-Forum-Backend
     npm install
    
  3. Setup test.env file

     PORT=3000
     DB_HOST=localhost
     DB_PORT=5432
     DB_PASSWORD=root
     DB_USERNAME=postgres
     DB_NAME=nest_forum_backend
     SALT_ROUNDS=6
     JWT_SECRET=secret
    
  4. Start the test server

    npm run start:test
    
  5. Run prepared seeder in order to get needed data to test (it creates needed roles and an admin)

    npm run db:seed:test

Attention: Do not run seeder before the first initializtion of the app. Run the server first in order to init all the needed tables in the database

Libraries I used

  • nestjs-config dotenv cross-env
  • nestjs-jwt
  • bcrypt
  • class-transformer class-validator
  • pg pg-hstore
  • nestjs-swagger
  • nestjs-sequelize sequelize sequelize-typescript types-sequelize
  • sequelize-cli

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors