Skip to content

Suyash2527/EngiLife.AI

Repository files navigation

EngiLife Backend

Production-ready backend for the EngiLife ecosystem.

Setup

  1. Install Dependencies

    cd backend
    npm install
  2. Environment Create a .env file in backend/:

    DATABASE_URL="postgresql://engilife:password@localhost:5432/engilife_db"
    JWT_SECRET="dev_secret_key"
    PORT=3001
  3. Database (Docker) Start the database:

    docker-compose up -d postgres
  4. Run Migrations

    cd backend
    npx prisma db push
  5. Start Server

    npm run dev

API Documentation

  • Auth:
    • POST /api/auth/signup: Create account
    • POST /api/auth/login: Get JWT token
    • POST /api/auth/verify-email: Verify account (code: 1234)
  • Resources (Requires Authorization: Bearer <token>):
    • GET /api/tasks, POST /api/tasks, etc.
    • Resources: tasks, subjects, schedule, notes, habits, savingsGoals

Production Deployment

Use the provided Dockerfile and docker-compose.yml. Ensure DATABASE_URL points to your production RDS/Postgres instance.

Preparing to Push to Remote

If you want to push this workspace to a remote Git repository, run:

git init
git add .
git commit -m "chore: prepare project for initial push"
git remote add origin <YOUR_REMOTE_URL>
git branch -M main
git push -u origin main

Replace <YOUR_REMOTE_URL> with your repository URL (e.g. the one you provided).

About

A all in one platform for Enginnering students

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors