A comprehensive Learning Management System with role-based access control, real-time analytics, and LMS integration support. Built for modern education with Supabase and ready for separate deployment.
StudentSathi is a production-ready LMS platform designed for educators to track student engagement, manage attendance, analyze performance, and integrate with external platforms. Features enterprise-grade RBAC, Supabase integration, and monorepo structure optimized for independent frontend/backend deployment.
- Secure user registration and login with JWT
- Access and refresh token mechanism
- Password reset via email
- Role-based access control (Admin, Teacher, Assistant)
- Protected API endpoints
- HttpOnly cookie security
- Complete CRUD operations for students
- Pagination and search functionality
- Engagement score tracking
- Attendance rate monitoring
- Student profile management
- Real-time alert generation
- Unread notification counts
- Alert categorization (engagement drop, attendance low, grade drop, behavioral)
- Severity levels (low, medium, high, critical)
- Mark as read/acknowledged functionality
- Bulk attendance recording
- Date-based attendance queries
- Student attendance history
- Automatic attendance rate calculation
- Status tracking (present, absent, late, excused)
- Grade recording with automatic GPA calculation
- Subject-wise performance tracking
- Letter grade assignment (A to F scale)
- Overall and per-subject GPA
- Performance history and trends
- Real-time dashboard metrics
- Date-range filtering (7/30/90 days)
- Attendance trends
- Engagement trends
- Performance averages
- Active student monitoring
- Configurable LMS integrations (Google Classroom, Canvas, Moodle, Teams)
- Encrypted API key storage
- Sync data functionality (stub implementation)
- Webhook configuration for external services
- Event-based triggers
- Webhook management (CRUD operations)
- Loading states on all actions
- Toast notifications for success/error
- Auto-refresh of notification counts (30s interval)
- Optimistic UI updates
- Error handling with retry logic
- Runtime: Node.js 18+
- Framework: Express.js
- Language: TypeScript
- Database: PostgreSQL
- ORM: Prisma
- Authentication: JWT + bcrypt
- Email: Nodemailer
- Security: Helmet, CORS, Rate Limiting
- Validation: Zod
- Framework: React 18
- Language: TypeScript
- Build Tool: Vite
- UI Library: shadcn/ui
- Styling: TailwindCSS
- State Management: React Query (TanStack Query)
- HTTP Client: Axios
- Routing: React Router v6
StudentSathi/ # Monorepo root
βββ frontend/ # Frontend application (React + Vite)
β βββ src/
β β βββ components/ # React components
β β β βββ ui/ # shadcn/ui components
β β βββ pages/ # Page components
β β βββ hooks/ # Custom hooks (auth, RBAC)
β β βββ services/ # API service layer
β β βββ lib/ # Utilities
β β βββ types/ # TypeScript types
β βββ public/ # Static assets
β βββ package.json # Frontend dependencies
β βββ vite.config.ts # Vite configuration
βββ backend/ # Backend API (Express + Prisma)
β βββ prisma/
β β βββ schema.prisma # Database schema
β β βββ migrations/ # Database migrations
β βββ src/
β β βββ controllers/ # Request handlers
β β βββ services/ # Business logic
β β βββ routes/ # API routes
β β βββ middleware/ # Auth, RBAC, validation
β β βββ types/ # DTOs and types
β β βββ config/ # Configuration
β βββ package.json # Backend dependencies
βββ .github/
β βββ workflows/ # CI/CD pipelines
β βββ ISSUE_TEMPLATE/ # Issue templates
β βββ PULL_REQUEST_TEMPLATE.md
βββ package.json # Root package (monorepo scripts)
βββ LICENSE # MIT License
βββ CONTRIBUTING.md # Contribution guidelines
βββ CODE_OF_CONDUCT.md # Community guidelines
βββ CHANGELOG.md # Version history
βββ SECURITY.md # Security policy
βββ SETUP_GUIDE.md # Local development setup
βββ SUPABASE_MIGRATION.md # Supabase migration guide
βββ RBAC_GUIDE.md # RBAC implementation guide
βββ README.md # This file
Experience StudentSathi without setup! Use these credentials:
Teacher Account:
- Email:
demo@studentsathi.com - Password:
demo123 - Access: Full teacher dashboard with student analytics
Admin Account:
- Email:
admin@studentsathi.com - Password:
admin123 - Access: Complete system administration
Student Account:
- Email:
student@studentsathi.com - Password:
student123 - Access: Student dashboard with personal analytics
Note: Demo accounts contain pre-populated sample data including student records, attendance, grades, and alerts.
- Node.js 18+ and npm 9+
- PostgreSQL 14+ OR Supabase account
- Git
# 1. Clone repository
git clone https://github.com/naman-agarwal-16/StudentSathi.git
cd StudentSathi
# 2. Install all dependencies
npm run install:all
# 3. Configure backend
cd backend
cp .env.example .env
# Edit .env with your database credentials
# 4. Run database migrations
npx prisma generate
npx prisma migrate dev
# 5. Seed demo data (optional)
npm run seed
# 6. Start development servers (from root)
cd ..
npm run dev
# Frontend: http://localhost:8080
# Backend: http://localhost:3001See SUPABASE_MIGRATION.md for complete Supabase setup guide.
# Quick Supabase setup
cd backend
cp .env.example .env
# Update DATABASE_URL in .env:
# DATABASE_URL="postgresql://postgres.[PROJECT-REF]:[PASSWORD]@aws-0-[REGION].pooler.supabase.com:6543/postgres?pgbouncer=true"
npx prisma generate
npx prisma migrate deployAll API endpoints are documented in SETUP_GUIDE.md.
Key endpoints:
POST /api/auth/login- User authenticationGET /api/students- List studentsGET /api/alerts/unread- Get unread alert countPOST /api/attendance/bulk- Record attendanceGET /api/analytics/summary- Dashboard data
- Password hashing with bcrypt (salt rounds: 12)
- JWT token authentication with refresh tokens
- HttpOnly cookies for secure token storage
- CORS protection with configurable origins
- Rate limiting (100 requests per 15 minutes)
- Input validation with Zod schemas
- SQL injection protection (Prisma ORM)
- XSS protection with sanitization
- Security headers (Helmet.js)
- Encrypted API key storage
- Role-based access control (RBAC)
- Row-level security ready (Supabase RLS)
See SECURITY.md for security policy and SECURITY_IMPLEMENTATION.md for implementation details.
# Run all tests
npm run test
# Backend tests
cd backend
npm test
npm run test:coverage
# Frontend linting
cd frontend
npm run lintCurrent test coverage: ~90% (backend)
npm run dev # Start both frontend and backend
npm run dev:frontend # Start only frontend
npm run dev:backend # Start only backend
npm run build # Build both projects
npm run build:frontend # Build frontend
npm run build:backend # Build backend
npm run install:all # Install all dependencies
npm run prisma:generate # Generate Prisma Client
npm run prisma:migrate # Run database migrations
npm run prisma:studio # Open Prisma Studiocd backend
npm run dev # Starts on port 3001 with hot reload
npm run build # Build for production
npm start # Start production servercd frontend
npm run dev # Starts on port 8080 with HMR
npm run build # Build for production
npm run preview # Preview production buildcd backend
npx prisma studio # Visual database browser
npx prisma migrate dev # Create new migration
npx prisma generate # Regenerate Prisma clientThis project is structured as a monorepo with independent frontend and backend that can be deployed separately.
Recommended Platforms:
- Railway - Easy PostgreSQL + Node.js deployment
- Render - Free tier available
- Heroku - Classic PaaS
- Fly.io - Global edge deployment
Quick Deploy to Railway:
# Install Railway CLI
npm install -g @railway/cli
# Login and deploy
railway login
railway init
railway add
railway up
# Set environment variables in Railway dashboardRecommended Platforms:
- Vercel - Optimized for Vite/React
- Netlify - Easy continuous deployment
- Cloudflare Pages - Fast global CDN
Quick Deploy to Vercel:
# Install Vercel CLI
npm install -g vercel
# Deploy
cd frontend
vercel
# Set VITE_API_BASE_URL environment variableSee SUPABASE_MIGRATION.md for complete guide.
Benefits:
- Managed PostgreSQL database
- Connection pooling included
- Automatic backups
- Real-time capabilities
- Row Level Security (RLS)
# Database
DATABASE_URL="postgresql://user:pass@localhost:5432/studentsathi"
# OR for Supabase:
DATABASE_URL="postgresql://postgres.[PROJECT-REF]:[PASSWORD]@aws-0-[REGION].pooler.supabase.com:6543/postgres?pgbouncer=true"
# Security
JWT_SECRET=your-secret-key-minimum-32-characters-long
ENCRYPTION_KEY=your-encryption-key-32-characters-long
FRONTEND_URL=http://localhost:8080
# Email (Optional - for password reset)
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your-email@gmail.com
SMTP_PASS=your-app-password# API Configuration
VITE_API_BASE_URL=http://localhost:3001/api
# OR for production:
VITE_API_BASE_URL=https://your-backend.railway.app/api
# Supabase (Optional - if using Supabase client directly)
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your-anon-keyWe welcome contributions! Please see CONTRIBUTING.md for guidelines.
Quick Start:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes following our code style
- Add tests for new features
- Commit using conventional commits (
feat:,fix:,docs:, etc.) - Push and open a Pull Request
See also:
- Authentication system with JWT
- Student CRUD operations
- Alert management system
- Attendance tracking
- Performance/grades management
- Analytics dashboard
- LMS integrations (infrastructure)
- Webhook system (infrastructure)
- Role-based access control (RBAC)
- Monorepo structure for separate deployment
- Supabase integration support
- Enhanced UI/UX improvements
- Comprehensive test coverage (>95%)
- E2E tests with Playwright
- Real LMS integrations (Google Classroom, Canvas)
- Actual webhook delivery system
- Two-factor authentication (2FA)
- Advanced analytics and ML predictions
- Mobile app (React Native)
- Real-time notifications (WebSocket)
- Bulk import/export (CSV, Excel)
- Custom reporting system
- Multi-language support (i18n)
MIT License - see LICENSE file for details.
- SETUP_GUIDE.md - Local development setup
- SUPABASE_MIGRATION.md - Supabase deployment guide
- RBAC_GUIDE.md - Role-based access control documentation
- SECURITY.md - Security policy and reporting
- CONTRIBUTING.md - Contribution guidelines
- CHANGELOG.md - Version history
- CODE_OF_CONDUCT.md - Community guidelines
- Documentation: Check the guides above
- Bug Reports: GitHub Issues
- Feature Requests: GitHub Issues
- Security Issues: See SECURITY.md
- Discussions: GitHub Discussions
Built with modern technologies and best practices:
- Frontend: React 18, TypeScript, Vite, shadcn/ui, TailwindCSS
- Backend: Node.js, Express, Prisma, PostgreSQL
- Database: Supabase/PostgreSQL
- Deployment: Vercel, Railway, Netlify ready
- Testing: Jest, React Testing Library
- CI/CD: GitHub Actions
Special thanks to the open-source community and contributors!
Built with Love for Education
Version 1.0.0 | Status: Production Ready | License: MIT
Report Bug β’ Request Feature β’ View Demo β’ Documentation