AI-native assessment creation for modern classrooms.
Generate polished question papers, OCR uploaded notes/screenshots, stream progress in real time, and export production-ready PDFs.
Acadasign is a full-stack AI SaaS for teachers, schools, and education teams that need to create assessment papers quickly without sacrificing quality.
It combines a polished Next.js experience with an Express backend, BullMQ workers, MongoDB persistence, Redis caching, authenticated PDF generation, Socket.io live updates, and OCR-based source extraction for images and screenshots.
Assessment creation is still too manual in most schools. Teachers spend hours extracting content, writing questions, formatting PDFs, and re-checking output for consistency.
VedaAI reduces that workload by turning source material into structured question papers with one flow:
- Upload a PDF, text file, or image.
- Extract the source text with PDF parsing or OCR.
- Generate a structured paper with balanced difficulty.
- Stream live progress to the UI.
- Review, regenerate, copy a link, or download a PDF.
The goal is simple: make assessment generation feel like a modern AI product, not a form-filling tool.
flowchart LR
U[Teacher / Admin] --> F[Next.js Frontend]
F -->|REST + cookies| A[Express API]
F <-->|Socket.io| S[Realtime Events]
A --> M[(MongoDB Atlas)]
A --> R[(Redis)]
A --> Q[BullMQ Queue]
Q --> W[BullMQ Worker]
W --> O[OCR / PDF parsing]
W --> L[LLM Provider]
W --> M
W --> R
W --> S
F --> P[Authenticated PDF Endpoint]
Upload source material
↓
Extract text (PDF / OCR / plain text)
↓
Build a grounded prompt with rules
↓
Queue generation job via BullMQ
↓
Worker generates structured paper
↓
Persist to MongoDB + cache in Redis
↓
Stream progress over Socket.io
↓
Render exam paper + secure PDF export
| Layer | Tools | Purpose |
|---|---|---|
| Frontend | Next.js 14, React 18, TypeScript, Tailwind CSS, Zustand, Framer Motion | Premium SaaS UI, routing, state, interactions |
| Backend | Node.js, Express, TypeScript | API, auth, assignments, results, PDF route |
| Database | MongoDB + Mongoose | Persistent assignment/result storage |
| Cache / Queue | Redis + BullMQ | Async paper generation and fast status updates |
| Realtime | Socket.io | Live progress + completion events |
| PDFs | Puppeteer | Render printable exam papers |
| OCR | Tesseract.js | Extract text from images/screenshots |
| AI | Gemini / OpenAI / Anthropic compatible layer | Source-grounded generation |
- AI question paper generation with structured sections, mark allocation, and difficulty balancing.
- OCR for images and screenshots so scanned notes can be converted into usable source text.
- Grounded prompt design that discourages generic “notes-style” questions.
- Authenticated PDF export that downloads the actual file instead of opening a blank tab.
- Realtime generation feedback using Socket.io and BullMQ.
- Modern glass UI built to feel like a serious startup product.
- Regenerate flow for quick iteration when the first output needs refinement.
- Copy link and share workflow for output pages.
The generation pipeline is intentionally layered so quality and reliability stay high.
-
Input normalization
- The backend receives uploaded text, PDF, or image content.
- Images are processed with OCR.
- PDFs are extracted into text.
-
Concept extraction
- Source text is reduced into reusable concepts.
- The generator avoids weak stems and vague wording.
-
Prompt construction
- The system adds explicit writing rules.
- JSON-only output is requested.
- The prompt reinforces grounding in the uploaded material.
-
Model generation
- The selected model returns structured paper JSON.
- Invalid output can fall back to a deterministic generator.
-
Post-processing
- Sections, marks, and options are normalized.
- The result is persisted and cached.
sequenceDiagram
participant UI as Frontend
participant API as Express API
participant Q as BullMQ Queue
participant W as Worker
participant DB as MongoDB
participant WS as Socket.io
UI->>API: Create assignment
API->>Q: Enqueue job
UI->>WS: Subscribe to assignment channel
Q->>W: Worker receives job
W->>WS: generation:progress
W->>DB: Save partial/final result
W->>WS: generation:complete
UI->>API: Fetch result / download PDF
The queue keeps request latency low while the worker handles the heavier AI, OCR, and PDF tasks.
The frontend uses the Next.js App Router with a clean separation between screens, UI primitives, and shared logic.
frontend/src/app/- routes, layout, and top-level screensfrontend/src/components/- UI components, output screens, forms, and layout shellsfrontend/src/context/- user and toast state providersfrontend/src/lib/- API client, socket helpers, validators, and utilitiesfrontend/src/store/- lightweight client-side assignment state
- Glassmorphism instead of flat admin styling.
- Soft warm neutrals instead of aggressive orange-only accents.
- Clear hierarchy for teachers using the app on large and small screens.
- Responsive navigation with a desktop shell and mobile bottom bar.
Add your final product screenshots here before launch.




Suggested captures:
- Dashboard / analytics
- Create assignment form
- Generated exam paper view
- PDF download state
- Mobile bottom navigation
vedaai/
├── frontend/
│ └── src/
│ ├── app/
│ ├── components/
│ ├── context/
│ ├── lib/
│ ├── store/
│ └── types/
├── backend/
│ └── src/
│ ├── config/
│ ├── lib/
│ ├── middleware/
│ ├── models/
│ ├── queue/
│ ├── routes/
│ ├── services/
│ ├── types/
│ └── workers/
├── .env.example
├── package.json
├── prompt.md
└── README.md
The backend uses auth-protected routes with cookies and bearer token support in the frontend client.
Creates a new assignment and queues generation.
Response:
{
"success": true,
"assignmentId": "string",
"jobId": "string"
}Returns the saved assignment metadata.
Queues a fresh generation job.
Returns the generation status and paper payload.
Returns a real PDF download with attachment headers.
Returns the current authenticated user.
Updates the current user profile.
- Node.js 18+ or current LTS
- MongoDB Atlas or local MongoDB
- Redis or Redis Cloud
- One AI provider key
npm install --legacy-peer-depsCopy the root example file and create a frontend env file:
copy .env.example .envCreate frontend/.env.local manually with the frontend values below.
PORT=5000
MONGODB_URI=mongodb+srv://301pavan2005_db_user:teq2ePJdJ3d238Nk@clustero.ztoyfcs.mongodb.net/?appName=Cluster
REDIS_URL=redis://localhost:6380
GEMINI_API_KEY=
ANTHROPIC_API_KEY=
OPENAI_API_KEY=
FRONTEND_URL=http://localhost:3000NEXT_PUBLIC_API_URL=http://localhost:5000
NEXT_PUBLIC_WS_URL=http://localhost:5000
NEXT_IGNORE_INCORRECT_LOCKFILE=1NEXT_IGNORE_INCORRECT_LOCKFILE=1 is kept because the Windows/npm combination in this workspace can trigger Next.js lockfile warnings even when the app builds correctly.
npm run devnpm run dev --workspace frontend
npm run dev --workspace backendnpm run buildnpm run lintRecommended production setup:
- Frontend: Vercel
- Backend: Render, Railway, Fly.io, or a VPS
- Database: MongoDB Atlas
- Queue/Cache: Redis Cloud
flowchart LR
Browser --> Vercel[Frontend on Vercel]
Vercel --> Backend[Express API + Worker Host]
Backend --> Atlas[(MongoDB Atlas)]
Backend --> Redis[(Redis Cloud)]
Backend --> AI[LLM Provider]
Backend --> PDF[Puppeteer PDF Renderer]
- Push the repo to GitHub.
- Connect the frontend workspace to Vercel.
- Deploy the backend workspace to your Node host.
- Add MongoDB, Redis, and AI secrets in the backend environment.
- Point
NEXT_PUBLIC_API_URLandNEXT_PUBLIC_WS_URLto the backend URL. - Point
FRONTEND_URLto the deployed frontend URL.
If you see legacy assignments appearing across accounts or /api/pdf returning 500s after deployment, perform these steps on your backend host:
- Ensure the latest
mainis deployed (pullorigin/mainand restart the service). - Flag legacy assignments (those created before
userIdwas enforced) so they don't surface to regular users:
# from the repository root, with proper env vars set (MONGO_URI or MONGODB_URI)
cd backend
node scripts/migrate-legacy-assignments.js- After migration, restart the backend so route protections and the PDF fallback are active.
- Monitor server logs for
Primary PDF renderer failedwarnings — the emergency fallback is enabled and will return a simple PDF when the primary renderer fails.
Contact the maintainer if you need a one-off data migration that assigns legacy documents to specific owners.
- Confirm WebSocket upgrade support and PDF downloads.
Frontend:
npm run build --workspace frontend
npm run start --workspace frontendBackend:
npm run build --workspace backend
npm run start --workspace backend- BullMQ keeps generation jobs off the request path.
- Redis reduces repeat reads for recently generated outputs.
- MongoDB stores durable assignment state and results.
- Socket.io gives responsive progress updates without polling.
- The PDF flow is isolated from the main UI request cycle.
- The backend can be horizontally scaled if Redis and MongoDB are shared.
- Keep secrets out of GitHub; use environment variables only.
- Use authenticated PDF downloads instead of public links.
- Restrict CORS to the real frontend origin.
- Enforce HTTPS in production.
- Treat uploads as untrusted input.
- Use rate limiting on API routes.
- Preserve teacher/user session boundaries.
- Asynchronous generation via BullMQ.
- Cached results in Redis.
- Blob-based PDF download to avoid blank-tab failures.
- OCR only runs when image input is provided.
- Client-side state is lightweight and targeted.
- The app shell uses shared primitives to reduce duplication.
- Add richer assignment analytics and topic insights
- Add version history for generated papers
- Add export templates for different school formats
- Add collaboration / reviewer comments
- Add stronger OCR worker reuse and performance tuning
- Add template marketplace for subject-specific assessment styles
- Add multi-tenant organization support