This is the backend for the EIP project, developed using NestJS, Prisma, and TypeScript.
This project is open source. You are welcome to contribute on GitHub at the following address: 👉 https://github.com/Naucto/Backend
-
Clone the repository
-
Install dependencies
npm install
-
Create a
.envfile 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= -
Run the Prisma migration to create the database schema:
npx prisma migrate dev --name init
-
Seed the database with initial data (optional):
npx prisma db seed
-
Start the application:
npm start:dev
src/auth: JWT authentication, roles, guards, strategysrc/routes/user: User managementsrc/routes/project: Project managementsrc/routes/work-session: Work session managementsrc/routes/aws: AWS S3 integration (upload, buckets, policies)src/aws: Shared AWS logicsrc/common: Common DTOs and decoratorssrc/prisma: Prisma service and module configurationprisma/schema.prisma: Data model definition
This project is licensed under the GNU General Public License v3.0 (GPLv3).