Production-ready backend for the EngiLife ecosystem.
-
Install Dependencies
cd backend npm install -
Environment Create a
.envfile inbackend/:DATABASE_URL="postgresql://engilife:password@localhost:5432/engilife_db" JWT_SECRET="dev_secret_key" PORT=3001
-
Database (Docker) Start the database:
docker-compose up -d postgres
-
Run Migrations
cd backend npx prisma db push -
Start Server
npm run dev
- Auth:
POST /api/auth/signup: Create accountPOST /api/auth/login: Get JWT tokenPOST /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
Use the provided Dockerfile and docker-compose.yml.
Ensure DATABASE_URL points to your production RDS/Postgres instance.
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 mainReplace <YOUR_REMOTE_URL> with your repository URL (e.g. the one you provided).