Skip to the content.

⚙️ Vi-SlideS Backend Documentation

A simplified overview of the Node.js backend architecture and features.


🧱 Backend Structure

src/
├── server.ts          # Express setup
├── socketServer.ts    # Real-time (Socket.IO)
├── config/db.ts       # MongoDB connection
├── controllers/       # Logic (auth, session, AI, QR)
├── models/            # MongoDB schemas
├── routes/            # API endpoints
├── middleware/        # Auth (JWT)
└── services/          # AI integration

🚀 Core Responsibilities


🔌 Server (server.ts)


🔄 Real-time System (socketServer.ts)

Handles live classroom interaction.

Main flow:

Key events:


🗄️ Database Models

User

Session

Question


🎮 Controllers

Auth

Session

AI

QR


🤖 AI Service


🔐 Authentication


🌐 API Routes

Auth

Session

AI

QR


⚡ System Flow

Teacher creates session
→ Students join (code / QR)
→ Questions submitted
→ Teacher answers or uses AI
→ Updates sent in real-time
→ Session ends → summary generated

📦 Data Handling


🔒 Security


🧠 Summary

Backend is designed to be: