Skip to content

Latest commit

 

History

History
82 lines (59 loc) · 1.96 KB

File metadata and controls

82 lines (59 loc) · 1.96 KB

Naucto Backend

This is the backend for the EIP project, developed using NestJS, Prisma, and TypeScript.


📢 Open Source Contribution

This project is open source. You are welcome to contribute on GitHub at the following address: 👉 https://github.com/Naucto/Backend


Launch the project

  1. Clone the repository

  2. Install dependencies

    npm install
  3. Create a .env file in the root directory and set the following environment variables:

     AWS_ACCESS_KEY_ID=MY_SECRET_ACCESS_KEY_ID
     AWS_SECRET_ACCESS_KEY=MY_SECRET_ACCESS_KEY
     AWS_REGION=MY_REGION
     POSTGRES_USER=USER
     POSTGRES_PASSWORD=PASSWORD
     POSTGRES_DB=DB_NAME
     POSTGRES_HOST=HOST
     POSTGRES_PORT=PORT
     DATABASE_URL=postgresql://USER:PASSWORD@HOST:PORT/DB_NAME?schema=public
     S3_BUCKET_NAME=bucket-name
    
     CDN_URL=URL
     CLOUDFRONT_KEY_PAIR_ID=PAIR_ID
     CLOUDFRONT_PRIVATE_KEY=
     CLOUDFRONT_PRIVATE_KEY_PATH=
    
     JWT_SECRET=JWT_SECRET
     JWT_EXPIRES_IN=EXPIRATION_TIME
     PORT=PORT_NUMBER
     NODE_ENV=
  4. Run the Prisma migration to create the database schema:

    npx prisma migrate dev --name init
  5. Seed the database with initial data (optional):

    npx prisma db seed
  6. Start the application:

     npm start:dev

📁 Project Structure

  • src/auth : JWT authentication, roles, guards, strategy
  • src/routes/user : User management
  • src/routes/project : Project management
  • src/routes/work-session : Work session management
  • src/routes/aws : AWS S3 integration (upload, buckets, policies)
  • src/aws : Shared AWS logic
  • src/common : Common DTOs and decorators
  • src/prisma : Prisma service and module configuration
  • prisma/schema.prisma : Data model definition

📄 License

This project is licensed under the GNU General Public License v3.0 (GPLv3).