Learning Management System (LMS) monorepo for The American Society for the Positive Care of Children (American SPCC), a national nonprofit supporting parents, caregivers, and educators through evidence-based resources and interactive learning.
IMPORTANT!! Make sure you run git pull + npx prisma db push often! Also, remember to make a new branch everytime you execute a task. The branch name should be similar to the task name. After you have pushed your changes, make a PR so I (Sophie) can review it.
npm installRun this in both the frontend and backend folders.
Backend (Express + Prisma + PostgreSQL)
cd backend
npm run devThe backend will run on http://localhost:8000.
Frontend (React + Vite)
cd frontend
npm run devThe frontend will run on http://localhost:5173.
The project uses Supabase for PostgreSQL and Prisma ORM. To work locally, you'll use a Dockerized Supabase instance.
macOS (Homebrew):
brew install supabase/tap/supabaseOther platforms: See the full installation guide
Docker Desktop must be installed and running (download here: https://www.docker.com/products/docker-desktop/)
From the project backend (where the supabase folder will live):
npx supabase startThis launches local containers for:
- PostgreSQL (port
54322) - Supabase API (port
54321) - Supabase Studio (port
54323)
After it starts, you'll see a database URL like:
postgres://postgres:postgres@localhost:54322/postgres
Copy that URL for the next step.
Create a .env file in the /backend directory:
DATABASE_URL="postgresql://postgres:postgres@localhost:54322/postgres"
DIRECT_URL="postgresql://postgres:postgres@localhost:54322/postgres"Push your Prisma schema to the local Supabase PostgreSQL database:
cd backend
npx prisma db pushThen generate the Prisma client:
npx prisma generateYou can verify tables in Supabase Studio at http://localhost:54323
When you're done developing, stop the containers to free ports and memory:
npx supabase stopBefore each commit, run prettier to fix formatting:
npm run format