Autonomous academic assignment pipeline with a luxury Next.js frontend.
Frontend (Next.js 14) Backend (Express + BullMQ)
http://localhost:3001 ←→ http://localhost:8000/api/v1
↓
Redis job queue
↓
Agent Worker (BullMQ, concurrency 5)
↓
┌──────────────────────────────────────┐
│ 8-Step Pipeline │
│ 1. LMS Scrape (Playwright) │
│ 2. Knowledge Graph (SQLite) │
│ 3. Research (Perplexity Sonar) │
│ 4. Writing (DeepSeek R1) │
│ 5. DOCX Build (docx npm) │
│ 6. Citations (URL verify) │
│ 7. Delivery (LMS + download) │
│ 8. Notify (WhatsApp/SMS/email) │
└──────────────────────────────────────┘
cd backend
cp .env.example .env # fill in API keys
npm install
npx playwright install chromium
node server.js # terminal 1
node workers/agentWorker.js # terminal 2cd frontend
npm install
npm run dev # http://localhost:3001# Ubuntu/WSL
sudo apt install redis-server
sudo systemctl start redis| Variable | Required | Description |
|---|---|---|
JWT_SECRET |
Yes | Random secret for auth tokens |
REDIS_URL |
Yes | redis://127.0.0.1:6379 |
PERPLEXITY_API_KEY |
Yes | Sonar Pro API key |
DEEPSEEK_API_KEY |
Yes | DeepSeek R1 API key |
TWILIO_ACCOUNT_SID |
For WhatsApp/SMS | Twilio credentials |
SMTP_USER / SMTP_PASS |
For email | Gmail app password |
UPLOADS_DIR |
No | Default ./uploads |
# PM2
npm install -g pm2
cd backend
pm2 start ecosystem.config.cjs
pm2 save