Shiksha Flow is a comprehensive educational platform that combines AI-powered complaint management and mental health assessment to provide holistic student support. Built with Next.js 16, Firebase, and Google Gemini AI.
- Smart Assignment: AI automatically assigns complaints to the most suitable authority based on:
- Student type (Hosteller, Day Scholar, Night Scholar, Remote Learner)
- Complaint content and context
- Authority workload and availability
- Department matching
- Automatic Classification: AI infers complaint type (Administrative, Infrastructure, Hostel, Academic, Other)
- Priority Determination: AI sets urgency levels (Low, Medium, High, Urgent) with 0-10 scoring
- Sentiment Analysis: Detects student emotional state (positive, neutral, negative, frustrated, angry)
- Key Issues Extraction: Identifies 2-5 main issues from complaint description
- Smart Scheduling: Prioritizes complaints based on urgency (Urgent: 0-15 mins, High: 15-30 mins, etc.)
- AI-Powered Personalized Questions: Generates 15 contextual questions based on student profile
- Comprehensive Analysis: Dual-report system with:
- Mental State Report: Current state, stress level, key findings, concerns
- Improvement Report: Immediate actions, short-term strategies, long-term goals
- Professional Referral: Recommends professional help when needed
- Actionable Insights: Tailored recommendations with priority-based actions
- Print-Friendly Reports: Beautifully formatted 2-page reports
- Progress Tracking: Tracks assessment history and improvement
- Firebase Authentication with Email/Password
- Role-based access control (Student, Faculty, Staff, Admin)
- Protected routes and API endpoints
- Firestore security rules enforcement
- Dashboard with real-time statistics
- Complaint tracking by status, priority, student type
- Mental health trends and insights
- Admin analytics for institutional oversight
- Node.js 18+ and npm/yarn
- Firebase account
- Google Gemini API key
- Clone the repository
git clone https://github.com/your-org/shiksha-flow.git
cd shiksha-flow- Install dependencies
npm install
# or
yarn install- Set up environment variables
Create .env.local file in the root directory:
# Firebase Configuration (Public)
NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id
# Firebase Admin (Private - Server Only)
FIREBASE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"
FIREBASE_CLIENT_EMAIL=firebase-adminsdk@your_project.iam.gserviceaccount.com
# Google Gemini AI (Private - Server Only)
GEMINI_API_KEY=your_gemini_api_key- Set up Firebase
# Login to Firebase
firebase login
# Initialize Firebase (if not already done)
firebase init
# Deploy Firestore rules
firebase deploy --only firestore:rules- Run development server
npm run dev
# or
yarn devOpen http://localhost:3000 to see the application.
shiksha-flow/
βββ src/
β βββ app/ # Next.js App Router
β β βββ api/ # API Routes
β β β βββ ai/
β β β β βββ assign-complaint/ # AI complaint assignment
β β β βββ mental-health/ # Mental health APIs
β β β β βββ generate-personalized-questions/
β β β β βββ analyze-comprehensive/
β β β βββ register-student/
β β βββ dashboard/ # Dashboard pages
β β β βββ complaints/ # Complaint management
β β β βββ mental-health/ # Mental health assessment
β β β βββ register-student/
β β βββ login/ # Authentication
β βββ components/ # React components
β β βββ auth/ # Auth guards
β β βββ complaints/ # Complaint components
β β βββ mental-health/ # Mental health components
β β βββ layout/ # Layout components
β β βββ ui/ # Reusable UI components
β βββ lib/ # Utilities
β β βββ firebase/ # Firebase config & helpers
β β βββ firestore/ # Firestore queries
β βββ types/ # TypeScript types
β βββ hooks/ # Custom React hooks
β βββ context/ # React Context (Auth)
β βββ config/ # App configuration
βββ docs/ # Documentation
β βββ API.md # API documentation
β βββ Structure.md # Project structure
β βββ IMPACT_AND_FEASIBILITY.md # Impact analysis
βββ public/ # Static assets
βββ firestore.rules # Firestore security rules
βββ firebase.json # Firebase configuration
βββ package.json # Dependencies
See docs/Structure.md for detailed structure.
| Layer | Technology | Purpose |
|---|---|---|
| Frontend | Next.js 16.1.1 (React 19) | Server-side rendering, App Router |
| Styling | Tailwind CSS 4 | Utility-first CSS framework |
| Animations | Framer Motion | Smooth UI animations |
| Backend | Next.js API Routes | Serverless API endpoints |
| Database | Firebase Firestore | NoSQL cloud database |
| Authentication | Firebase Auth | User authentication & management |
| AI | Google Gemini 1.5 Flash | Natural language processing |
| Deployment | Vercel | Production hosting |
| Language | TypeScript | Type-safe development |
- API Documentation - Complete API reference
- Project Structure - Detailed file structure
- Impact Analysis - Feasibility & ROI study
Student Submits β AI Analyzes β Auto-Assigns β Authority Reviews β Resolution (Also real time status update on student's dashboard)
Welcome β dashboard/mental-health β 15 Questions β AI Analysis β Dual Reports β Actions
npm run build
npm run startvercel deploy --prodfirebase deploy --only firestore:rulesnpm run devnpm run buildnpm run lint- Page Load Time: ~1.5s
- Question Generation: ~3-4s
- AI Analysis: ~5-8s
- Database Queries: ~150ms
- Concurrent Users: 100+ supported
- β Firebase Authentication
- β Firestore Security Rules
- β Role-Based Access Control (RBAC)
- β Environment Variable Protection
- β API Route Authentication
- β Input Validation & Sanitization
- β HTTPS Only
- β CORS Protection
Contributions are welcome! Please:
- Star and Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License.
For issues, questions, or suggestions:
- Core complaint system
- AI-powered assignment
- Mental health assessment
- Dual-report generation
- Analytics dashboard
- Email notifications
- Report history tracking
- User feedback collection
- Multi-language support
- Advanced analytics
- Integration with LMS
- Mobile apps (iOS/Android)
- Next.js - React framework
- Firebase - Backend services
- Google Gemini - AI capabilities
- Tailwind CSS - Styling
- Vercel - Hosting platform
Built with passion for students' wellness and academic success
Last Updated: January 9, 2026