Automate college session plans from syllabus text and lecture schedules.
- Frontend: React + Vite (
apps/web) → Vercel - Backend: Express + TypeScript (
apps/api) → Render - Database: MongoDB Atlas
- Node.js 20+
- MongoDB (local or Atlas)
npm install
cp apps/api/.env.example apps/api/.env
cp apps/web/.env.example apps/web/.envEdit apps/api/.env:
MONGODB_URI=mongodb://127.0.0.1:27017/sessionplan
JWT_SECRET=dev-secret
CORS_ORIGIN=http://localhost:5173
Edit apps/web/.env:
VITE_API_URL=http://localhost:4000
# Terminal 1 - API
npm run dev:api
# Terminal 2 - Web
npm run dev:web- Web: http://localhost:5173
- API: http://localhost:4000
- Create a free M0 cluster.
- Create database user and allow network access (
0.0.0.0/0for Render). - Use database name
sessionplan(not other existing DBs). - Copy connection string to
MONGODB_URIon Render and in localapps/api/.envfor seeding.
Example:
mongodb+srv://USER:PASSWORD@cluster0.xxxxx.mongodb.net/sessionplan?retryWrites=true&w=majority
Dashboard: Render → Web Service → Environment → Add variables
| Key | Value |
|---|---|
NODE_ENV |
production |
MONGODB_URI |
Atlas URI with /sessionplan |
JWT_SECRET |
Long random string (Render can generate) |
CORS_ORIGIN |
https://session-plan-automation-web.vercel.app (no trailing slash) |
Service settings:
| Field | Value |
|---|---|
| Root Directory | apps/api |
| Build Command | cd ../.. && npm install --include=dev && npm run build:api |
| Start Command | npm start |
Or deploy via render.yaml at repo root.
Dashboard: Vercel → Project → Settings → Environment Variables
| Key | Value | Environments |
|---|---|---|
VITE_API_URL |
https://session-plan-api.onrender.com (no trailing slash) |
Production, Preview |
Project settings:
| Field | Value |
|---|---|
| Root Directory | apps/web |
| Build | Uses apps/web/vercel.json |
After changing VITE_API_URL, Redeploy (env vars are baked in at build time).
Do not put MONGODB_URI or JWT_SECRET on Vercel.
Admin users are created in MongoDB, not via public registration. Run from your machine against the same MONGODB_URI as production:
- Set
MONGODB_URIinapps/api/.envto your Atlas production URI. - Run (PowerShell):
$env:ADMIN_NAME = "Admin"
$env:ADMIN_EMAIL = "your-admin@email.com"
$env:ADMIN_PASSWORD = "your-secure-password"
npm run seed:admin- Log in on the Vercel site with those credentials → lands on
/admin(users list).
Re-running the seed updates password and promotes an existing email to admin.
- Register / login.
- Step 1: Paste syllabus text and prepare lectures (
Unit-1: ...starts a unit; each following line is a topic until the nextUnit-). - Step 2: Enter AY, class, semester, divisions, lecture dates; uncheck holidays.
- Step 3: Choose units.
- Generate → preview/edit → Download DOCX.
- Log in with seeded admin account.
- View all faculty users and expand View plans for each user's session plans.
Sample files are in docs/ for reference.