React frontend and Express + Postgres backend. Run everything locally with no cloud required.
From the web folder:
docker compose up -d(Or use a local Postgres install; create a database named jpaint.)
cd backend
cp .env.example .env
# Edit .env if needed (DATABASE_URL, JWT_SECRET)
npm install
npm run db:migrate
npm run devAPI runs at http://localhost:3001.
From the web folder (not inside backend):
cp .env.example .env
# VITE_API_URL defaults to http://localhost:3001
npm install
npm run devApp runs at http://localhost:5173. Log in or register; projects and canvas UI can be added next.
| Where | Variable | Example |
|---|---|---|
| backend | PORT |
3001 |
| backend | DATABASE_URL |
postgres://postgres:postgres@localhost:5432/jpaint |
| backend | JWT_SECRET |
long random string |
| frontend | VITE_API_URL |
http://localhost:3001 |
POST /auth/register— body:{ email, password }→{ user, token }POST /auth/login— body:{ email, password }→{ user, token }GET /projects— header:Authorization: Bearer <token>→ list projectsGET /projects/:id— get one project (withcanvas_data)POST /projects— body:{ name?, canvas_data? }→ createPATCH /projects/:id— body:{ name?, canvas_data? }→ updateDELETE /projects/:id— delete