Your personal placement preparation app with real database sync.
preppath/
├── frontend/ ← The HTML app (deploy to GitHub Pages)
│ ├── index.html ← Main app (rename preppath-v3.html → index.html)
│ ├── config.js ← API URL + Supabase keys
│ ├── api.js ← All backend communication
│ └── package.json
│
├── backend/ ← Express API server (deploy to Render/Railway)
│ ├── server.js ← Main server + all routes
│ ├── .env.example ← Copy to .env and fill in keys
│ ├── scripts/
│ │ ├── setup-db.js ← Verify database tables
│ │ └── test-api.js ← Test all API endpoints
│ └── package.json
│
├── database/
│ └── setup.sql ← Run this once in Supabase SQL Editor
│
├── .github/workflows/
│ └── deploy.yml ← Auto-deploy frontend to GitHub Pages
│
└── scripts/
└── install.sh ← One-shot installer
bash scripts/install.sh- Go to supabase.com → Create free account
- New project → any name → any region → any password
- Wait ~2 min for project to spin up
- Go to SQL Editor → New Query
- Copy everything from
database/setup.sql→ Paste → Run - You should see: "Success. No rows returned"
- Supabase → Settings → API
- Copy: Project URL (looks like
https://abcde.supabase.co) - Copy: Publishable (anon) key (frontend)
- Copy: Secret key (backend only — never expose in frontend)
- If your project shows legacy keys, use
service_rolefor backend.
- If your project shows legacy keys, use
cd backend
cp .env.example .envEdit .env:
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_ANON_KEY=your-anon-key
SUPABASE_SECRET_KEY=your-secret-key
PORT=3001
ALLOWED_ORIGINS=http://localhost:3000,https://YOUR-USERNAME.github.iocd backend
npm run dev
# → Running on http://localhost:3001Edit frontend/config.js:
BACKEND_URL: 'http://localhost:3001',
SUPABASE_URL: 'https://your-project.supabase.co',
SUPABASE_ANON_KEY: 'your-anon-key',cd frontend
npm run dev
# → Opens http://localhost:3000cd backend
npm run setup-db # checks database tables
npm test # tests all API endpoints- Create a GitHub repo named
preppath - Put everything in the
frontend/folder at the root of the repo- Rename
preppath-v3.html→index.html - Include
config.jsandapi.js
- Rename
- Go to Settings → Pages → Branch: main → Save
- Your app is live at:
https://YOUR-USERNAME.github.io/preppath
Or use the GitHub Actions workflow (auto-deploys on every push to main):
- The file
.github/workflows/deploy.ymlhandles this automatically
- Go to render.com → New Web Service
- Connect your GitHub repo
- Root directory:
backend - Build command:
npm install - Start command:
node server.js - Add environment variables from your
.env - Your backend URL:
https://preppath-api.onrender.com - Update
frontend/config.js→BACKEND_URLwith this URL - Update
.env→ALLOWED_ORIGINSto include your GitHub Pages URL
- Go to railway.app
- New Project → Deploy from GitHub
- Select your repo → set root to
backend/ - Add environment variables
- Done
| Table | Purpose |
|---|---|
progress |
All checkbox/toggle state (roadmap, schedule, future steps) |
custom_tasks |
User-added tasks in project cards |
journal |
Evening reflection entries (one per day) |
study_sessions |
Study time tracking (optional, for future) |
| Method | Endpoint | Description |
|---|---|---|
| GET | /health |
Server health check |
| GET | /api/progress/:userId |
Load all progress |
| POST | /api/progress/:userId |
Save progress state |
| GET | /api/tasks/:userId |
Get custom tasks |
| POST | /api/tasks/:userId |
Add custom task |
| PATCH | /api/tasks/:userId/:taskId |
Update/toggle task |
| DELETE | /api/tasks/:userId/:taskId |
Delete task |
| GET | /api/journal/:userId |
Get journal entries |
| POST | /api/journal/:userId |
Save journal entry |
| GET | /api/stats/:userId |
Get progress summary |
User checks a task
↓
localStorage (instant, works offline)
↓
Backend API (async, in background)
↓
Supabase PostgreSQL database
↓
Syncs to all your devices
Data never expires — Supabase free tier stores data indefinitely. localStorage is a backup for offline use.
| Layer | Technology |
|---|---|
| Frontend | Vanilla HTML/CSS/JS |
| Backend | Node.js + Express |
| Database | PostgreSQL via Supabase |
| Hosting (Frontend) | GitHub Pages (free) |
| Hosting (Backend) | Render.com or Railway (free) |
| CI/CD | GitHub Actions |
"I can do all things through Christ who strengthens me."
You have everything you need. Start today.
219b25c (uploading to github from vscode direct)