Sehpaathi is a comprehensive AI-powered educational platform designed specifically for engineering students at MITS Gwalior. It combines modern web technologies with artificial intelligence to provide an all-in-one learning experience featuring AI assistance, resource management, collaborative study materials, and an enhanced user experience with smooth animations and multi-language support.
Sehpaathi transforms the traditional learning experience by offering:
- AI-Powered Study Assistant: Intelligent chatbot powered by Groq's LLaMA model with multi-language support
- Enhanced User Experience: Smooth scrolling animations and interactive UI components
- Resource Management: Personal document organization and file storage
- Materials Browser: Centralized access to course materials across branches and semesters
- Google Drive Integration: Seamless file upload and sharing capabilities
- Firebase Authentication: Secure user management with Google OAuth
- Interactive Demo: Fixed-layout demo page with video tutorials and real-time chat
- Technology Stack: React 18, Vite, TailwindCSS, Material-UI
- Animations: Intersection Observer API for smooth scroll animations
- State Management: Redux Toolkit + React Context for theme management
- Routing: React Router DOM with enhanced navigation guards
- Authentication: Firebase Auth with Google OAuth
- Deployment: Vercel with GitHub Pages support
- UI Enhancements: Custom scrollbars, hover animations, and transition effects
- Technology Stack: Node.js, Express.js, Firebase Admin SDK
- AI Integration: Groq SDK for LLaMA-3 70B model
- File Storage: Google Drive API integration
- Security: Helmet, CORS, rate limiting, compression
- Documentation: Swagger/OpenAPI
- Node.js 18+ and npm
- Firebase project with Authentication enabled
- Google Cloud Console project with Drive API enabled
- Groq API key
Backend (.env)
# Server Configuration
PORT=3000
NODE_ENV=development
BASE_URL=http://localhost:3000
FRONTEND_URL=http://localhost:5174
# Firebase Configuration
FIREBASE_SERVICE_ACCOUNT_JSON={"type":"service_account",...}
# Google Drive API
GOOGLE_DRIVE_CREDENTIALS={"type":"service_account",...}
# AI Configuration
GROQ_API_KEY=your_groq_api_key_here
# Security
ALLOWED_ORIGINS=http://localhost:5174,https://your-frontend-domain.comFrontend (.env)
# Environment
VITE_ENVIRONMENT=local
# Backend URLs
VITE_BACKEND_URL=http://localhost:3000
# Firebase Configuration
VITE_FIREBASE_API_KEY=your_firebase_api_key
VITE_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your-project-id
VITE_FIREBASE_STORAGE_BUCKET=your-project.appspot.com
VITE_FIREBASE_MESSAGING_SENDER_ID=123456789
VITE_FIREBASE_APP_ID=1:123456789:web:abcdef1. Clone the repository
git clone <repository-url>
cd sehpaathi2. Backend Setup
cd backend
npm install
npm startBackend runs on http://localhost:3000
3. Frontend Setup
cd frontend
npm install
npm run devFrontend runs on http://localhost:5174
- Smooth Scrolling: Native smooth scrolling with intersection observer animations
- Custom Scrollbars: Gradient-styled scrollbars with hover effects
- Section Animations: Fade-in animations triggered by scroll position
- Interactive Components: Hover effects and micro-interactions throughout the UI
- Multi-Language Demo: Modular component showcasing AI capabilities in 7+ languages
- Fixed Demo Layout: Non-scrolling demo page with side-by-side video and chat
- Intelligent Responses: Context-aware answers using Groq's LLaMA-3 70B model
- Multi-Language Support: Responses in English, Hindi, Sanskrit, Spanish, French, German
- Conversation History: Maintains chat context with 1000-message memory
- Markdown Support: Rich text formatting with code syntax highlighting
- Copy Functionality: Easy copying of AI responses and code blocks
- Real-time Typing Indicators: Visual feedback during AI processing
- Interactive Prompts: Pre-configured question suggestions for quick queries
- File Upload: Direct integration with Google Drive for secure storage
- Resource Categories: Notes, bookmarks, videos, files, and media
- Personal Collections: User-specific resource organization via Firestore
- Quick Access: Instant retrieval and management of study materials
- Share Links: Auto-generated shareable links for uploaded files
- Animated Cards: Interactive resource cards with hover animations
- Branch-wise Organization: Resources categorized by engineering branches
- Semester Navigation: Materials organized by academic semesters
- Material Types: Class notes, PPTs, previous papers, practical reports
- Subject-wise Filtering: Easy navigation through course subjects
- Enhanced UI: Improved visual hierarchy and navigation
- Firebase Authentication: Google OAuth integration
- JWT Token Verification: Secure API access with Firebase ID tokens
- Rate Limiting: Protection against API abuse (100 requests/15 minutes)
- CORS Protection: Configurable origin restrictions
- Helmet Security: Comprehensive security headers
- Profile Guards: Enhanced route protection based on profile completion
sehpaathi/
βββ backend/ # Node.js Express Server
β βββ config/ # Configuration files
β β βββ firebase.js # Firebase Admin SDK setup
β β βββ googleDrive.js # Google Drive API configuration
β β βββ index.js # Config exports
β βββ controllers/ # Request handlers
β β βββ chatController.js # AI chat endpoint logic
β βββ middleware/ # Express middleware
β β βββ auth.js # Firebase token verification
β β βββ errorHandler.js # Global error handling
β β βββ validation.js # Request validation
β βββ routes/ # API endpoints
β β βββ chat.js # AI chat routes
β β βββ docs.js # API documentation
β β βββ files.js # File management routes
β β βββ health.js # Health check endpoint
β βββ services/ # Business logic
β β βββ chat.js # Chat service orchestration
β β βββ driveService.js # Google Drive operations
β β βββ groq.js # Groq AI integration
β β βββ groqService.js # AI service wrapper
β βββ utils/ # Utility functions
β β βββ errors.js # Custom error classes
β β βββ logger.js # Logging utilities
β βββ package.json # Backend dependencies
β βββ server.js # Main server file
βββ frontend/ # React Application
β βββ src/
β β βββ app/ # Redux store configuration
β β β βββ store.js # Redux store setup
β β βββ auth/ # Authentication utilities
β β β βββ authService.js # Auth helper functions
β β β βββ firebase.js # Firebase client config
β β βββ components/ # Reusable UI components
β β β βββ AI/ # AI Assistant components
β β β βββ DashboardHeader/ # Dashboard navigation
β β β βββ DateHeader/ # Date display component (NEW)
β β β βββ Footer/ # Footer component
β β β βββ Header/ # Main header
β β β βββ Materials/ # Materials browser
β β β βββ MultiLanguageSection/ # Multi-language demo (NEW)
β β β βββ Profile/ # User profile
β β β βββ ProfileCompletionCard/ # Profile completion tracker (NEW)
β β β βββ QuickAccess.jsx/ # Dashboard shortcuts
β β β βββ ResourceManager/ # Resource management
β β β βββ Sidebar/ # Navigation sidebar
β β β βββ ThemeToggle/ # Dark/light mode toggle (NEW)
β β βββ contexts/ # React Context providers (NEW)
β β β βββ context.js # General app context
β β β βββ ThemeContext.jsx # Theme state management
β β β βββ useTheme.js # Theme hook
β β βββ features/ # Redux slices
β β β βββ user/ # User state management
β β βββ pages/ # Route components
β β β βββ About/ # About page (enhanced with animations)
β β β βββ ComingSoon/ # Coming soon page (NEW)
β β β βββ ContactSupport/ # Support page (NEW)
β β β βββ Dashboard/ # Main dashboard (enhanced)
β β β β βββ AIChat.jsx # AI chat interface
β β β β βββ Dashboard.jsx # Main dashboard
β β β β βββ DashboardHome.jsx # Dashboard home view
β β β β βββ Materials.jsx # Materials management
β β β β βββ Profile.jsx # Profile settings
β β β β βββ Resources.jsx # Resource browser
β β β βββ Demo/ # Interactive demo page (NEW)
β β β βββ Error/ # Error handling
β β β βββ Home/ # Landing page (enhanced with scroll animations)
β β β βββ Signin/ # Login page
β β β βββ Signup/ # Registration page
β β β βββ UserCustomization/ # User preferences (NEW)
β β βββ route/ # Route protection
β β β βββ PrivateRoute.jsx # Auth-protected routes
β β β βββ ProfileGuard.jsx # Profile completion guard (NEW)
β β βββ services/ # API services
β β β βββ materialServices.js # Material API calls
β β βββ constants.js # App constants and configurations
β β βββ index.css # Enhanced base styles with smooth scrolling (UPDATED)
β β βββ App.jsx # Root component
β β βββ Layout.jsx # Main layout wrapper
β β βββ main.jsx # Application entry point
β βββ package.json # Frontend dependencies
β βββ vite.config.js # Vite configuration
βββ README.md # This file
Backend Initialization:
- Server starts on port 3000 with security middleware
- Firebase Admin SDK initializes with service account
- Google Drive API configures with credentials
- Groq client initializes with API key
- Routes register and middleware applies
Frontend Initialization:
- Vite dev server starts on port 5174
- React router configures with protected routes
- Redux store initializes with user state
- Firebase client SDK initializes
- Components mount and Firebase auth listener activates
- User clicks "Sign in with Google" on frontend
- Firebase Auth handles Google OAuth popup
- Frontend receives Firebase ID token
- Token stored in Redux state for API calls
- Backend middleware verifies token on protected routes
- User redirected to dashboard upon successful auth
- User types message in AI Assistant component
- Frontend sends POST request to
/api/chat/message - Backend validates message and forwards to GroqService
- Groq API processes message with LLaMA-3 model
- Response formatted with markdown and returned
- Frontend displays AI response with syntax highlighting
- User selects file in Resource Manager
- Frontend gets Firebase ID token
- File uploaded to backend
/api/files/uploadendpoint - Backend verifies token and uploads to Google Drive
- Drive service creates user-specific folder
- File permissions set for sharing
- File metadata saved to Firestore
- Frontend updates local state with new resource
- Firestore listeners in Dashboard component
- Real-time updates for user resources
- Automatic UI refresh on data changes
- Optimistic updates for better UX
- Smooth Scrolling: Implemented native CSS smooth scrolling across all pages
- Scroll Animations: Added intersection observer-based animations for section entrances
- Custom Scrollbars: Gradient-styled scrollbars that match the app theme
- Enhanced Animations: Improved hover effects and micro-interactions
- Mobile Responsiveness: Better responsive design for mobile devices
- Modular Component: Created dedicated
MultiLanguageSectioncomponent - 7 Language Cards: English, Hindi, Sanskrit, Spanish, French, German + "Many More"
- Flag Gradients: Country-inspired gradient backgrounds for language cards
- Interactive Demo: Real-time language switching in demo chat
- Responsive Layout: Optimized for both desktop and mobile viewing
- Fixed Viewport: Eliminated page scrolling for better demo experience
- Video Integration: Embedded YouTube tutorial alongside interactive chat
- Side-by-side Layout: Video on left, chat demo on right (desktop)
- Mobile Stacking: Responsive stacking for mobile devices
- Interactive Elements: Clickable prompt suggestions and animated indicators
- Activity Cards: Enhanced recent activity cards with animations
- Interactive Elements: Hover effects and transitions throughout
- Visual Hierarchy: Improved spacing and component organization
- Performance: Optimized rendering and reduced unnecessary re-renders
- Context API: Theme management with React Context
- Error Handling: Better error boundaries and user feedback
- Code Organization: Modularized components for better maintainability
- Performance: Intersection Observer for efficient scroll animations
- Backend API: Create route β controller β service β test
- Frontend Component: Create component β connect to Redux β integrate API
- State Management: Add Redux slice if needed
- Authentication: Protect routes with middleware/PrivateRoute
- Animations: Add intersection observer for scroll-triggered animations
- server.js: Main server configuration affects all requests
- App.jsx: Root component changes affect entire frontend
- Dashboard.jsx: Central hub affecting all dashboard features
- groq.js: AI service changes affect chat functionality
- firebase.js (both): Auth changes affect entire user system
- index.css: Global style changes affect entire application
- MultiLanguageSection.jsx: Isolated component for multi-language features
POST /api/chat/message- Send message to AIPOST /api/files/upload- Upload file to DriveGET /api/files/list- List user files
GET /health- Health checkGET /docs- API documentationGET /- Server status page
- Configure environment variables on hosting platform
- Ensure Firebase service account JSON is properly set
- Set up Google Drive API credentials
- Configure CORS for production frontend URL
- Build with
npm run build - Configure environment variables for production
- Set up domain in Firebase Auth settings
- Deploy to Vercel/Netlify with build command
- Fork the repository
- Create feature branch:
git checkout -b feature/new-feature - Commit changes:
git commit -am 'Add new feature' - Push to branch:
git push origin feature/new-feature - Submit pull request
This project is a product in development and is not yet licensed for public use.