Code Map
Top-level Configuration
Section titled “Top-level Configuration”Build & Development
Section titled “Build & Development”- vite.config.js: Build config, PWA settings, Workbox caching strategies, alias resolvers
- tailwind.config.js: Custom theme tokens, dark mode, animations, plugin configuration
- postcss.config.js: PostCSS with Tailwind and autoprefixer
- eslint.config.js: ESLint rules and configuration
- jsconfig.json: Path aliases and module resolution
- components.json: shadcn/ui component configuration
Public Assets
Section titled “Public Assets”- public/AC.json: Academic calendar data (filterable events)
- public/artifact/: Python wheels for Pyodide (PyMuPDF, jiit_marks)
- public/icons/: App icons and favicons
- public/pwa-icons/: PWA manifest icons (multiple sizes)
- public/robots.txt: SEO crawler directives
- public/sitemap.xml: Site structure for search engines
Documentation
Section titled “Documentation”- docs/: Astro Starlight documentation site
- README.md: Quick start and overview
- CONTRIBUTING.md: Developer contribution guide
- LICENSE: Project license
Source Structure
Section titled “Source Structure”Entry Points
Section titled “Entry Points”- src/main.jsx: App initialization, theme provider, Helmet provider, router mounting
- src/index.css: Global styles and CSS variables
- src/App.css: App-specific styles
Core Application
Section titled “Core Application”- src/App.jsx:
- Main router configuration (HashRouter)
- Authentication flow management
- Global state management
- Offline mode detection and fallback
- Layout and navigation structure
- Route-based data fetching coordination
Context & Providers
Section titled “Context & Providers”- src/context/ThemeContext.jsx:
- Theme state management (light/dark)
- Theme toggle functionality
- localStorage persistence
- CSS class application
Component Library
Section titled “Component Library”Layout Components
Section titled “Layout Components”- src/components/Header.jsx: Top navigation, theme toggle, offline indicator, settings, back button
- src/components/Navbar.jsx: Bottom/side navigation with route links, PWA install
- src/components/Login.jsx: Authentication form, auto-login, offline mode detection
Feature Pages
Section titled “Feature Pages”-
src/components/Attendance.jsx:
- Multi-tab interface (overview, subject details, daily logs)
- Semester selection and caching
- Attendance goal tracking
- Subject sorting and filtering
- Cache management and refresh
-
src/components/Grades.jsx:
- SGPA/CGPA overview
- Semester grade cards
- Marks download coordination
- Historical data access
-
src/components/Exams.jsx:
- Exam schedule display
- Event filtering
- Auto-focus during exam periods
- Semester-wise exam data
-
src/components/Subjects.jsx:
- Registered subjects list
- Faculty information
- Component breakdown (L/T/P)
- Subject choices integration
-
src/components/Profile.jsx:
- Personal information tabs
- Contact details
- Educational qualifications
- Hostel information
- Quick action buttons
-
src/components/Timetable.jsx:
- Dynamic timetable generation
- Subject variant management
- Campus/year/batch configuration
- External service integration
-
src/components/Fee.jsx:
- Fee structure display
- Encrypted payload generation
- Payment status tracking
-
src/components/Feedback.jsx:
- Faculty feedback forms
- Dynamic question loading
- Rating system (1-5 stars)
- Submission tracking
-
src/components/AcademicCalendar.jsx:
- Event filtering and search
- Month-wise navigation
- Category-based filtering
-
src/components/CGPATargetCalculator.jsx:
- SGPA calculator mode
- Target CGPA planning
- Semester data import
- What-if analysis
Sub-Components & Cards
Section titled “Sub-Components & Cards”- src/components/AttendanceCard.jsx: Subject attendance card with progress, details sheet, trends
- src/components/SubjectInfoCard.jsx: Subject info with faculty, credits, components
- src/components/GradeCard.jsx: Grade display with marks breakdown
- src/components/MarksCard.jsx: Exam marks with download functionality
- src/components/SubjectChoices.jsx: Elective choice management with status
- src/components/CircleProgress.jsx: Circular progress indicator with customization
Dialog Components
Section titled “Dialog Components”- src/components/MessMenu.jsx: Mess menu viewer (daily/weekly)
- src/components/SettingsDialog.jsx: App settings and preferences
- src/components/InstallPWA.jsx: PWA installation prompt
UI Primitives (shadcn/ui)
Section titled “UI Primitives (shadcn/ui)”- src/components/ui/button.jsx: Button variants and sizes
- src/components/ui/input.jsx: Text input with validation
- src/components/ui/select.jsx: Dropdown select menus
- src/components/ui/dialog.jsx: Modal dialogs
- src/components/ui/sheet.jsx: Side panels/drawers
- src/components/ui/tabs.jsx: Tab navigation
- src/components/ui/switch.jsx: Toggle switches
- src/components/ui/label.jsx: Form labels
- src/components/ui/progress.jsx: Progress bars
- src/components/ui/calendar.jsx: Date picker
- src/components/ui/table.jsx: Data tables
- src/components/ui/form.jsx: Form validation helpers
- src/components/ui/ThemeBtn.jsx: Theme toggle button
Utility Scripts
Section titled “Utility Scripts”Data Management
Section titled “Data Management”-
src/components/scripts/cache.js:
- localStorage cache helpers
- Expiration management
- Typed cache getters/setters
- Cache statistics
- Cleanup utilities
-
src/components/scripts/artificialW.js:
- Offline WebPortal shim
- Reads from cached data
- Mimics live API structure
- Enables offline functionality
Library Utilities
Section titled “Library Utilities”-
src/lib/utils.js:
cn()class name merger (clsx + tailwind-merge)- Utility helpers
-
src/lib/pyodide.js:
- Pyodide loader and initializer
- Python package management
- Wheel artifact loading
- PDF processing setup
-
src/lib/jiitCrypto.js:
- AES-CBC encryption utilities
- Date-based key generation
- Payload serialization
- Fee payload encryption
API Integration
Section titled “API Integration”- src/api/messmenu.js: Mess menu API endpoint handler
Styles
Section titled “Styles”- src/styles/layout.css: Layout-specific styles and containers
- src/styles/transitions.css: Page transition animations for React Transition Group
Routes
Section titled “Routes”The app uses HashRouter with the following routes:
Main Navigation
Section titled “Main Navigation”/→ Redirects to default tab or/attendance/attendance→ Attendance tracking/grades→ Grades and SGPA/CGPA/exams→ Exam schedule/subjects→ Registered subjects/profile→ Student profile
Secondary Pages
Section titled “Secondary Pages”/academic-calendar→ Academic events calendar/fee→ Fee details and payments/feedback→ Faculty feedback forms/gpa-calculator→ CGPA target calculator/timetable→ Class timetable
Authentication
Section titled “Authentication”/login→ Login page (shows when not authenticated)
Data Flow
Section titled “Data Flow”Authentication
Section titled “Authentication”- User credentials →
Login.jsx - jsjiit
WebPortalauthentication - Success → Store credentials in localStorage
- Failure with cache → Load
ArtificialWebPortal - Set
isAuthenticatedstate → Show main app
Data Fetching
Section titled “Data Fetching”- Component mount → Check cache
- Cache miss or expired → Fetch from
w(WebPortal) - Store response in cache
- Update component state
- Display data
Offline Mode
Section titled “Offline Mode”- Login fails but cache exists
- Swap to
ArtificialWebPortal - All API calls read from cache
- Show offline indicator
- Restrict features requiring live data
Caching Strategy
Section titled “Caching Strategy”Cache Keys
Section titled “Cache Keys”attendance-{username}-{semester}: Attendance datasubjects-{username}-{semester}: Subject datagrades-{username}-{semester}: Grade dataprofile-{username}: Profile dataexamSchedule-{username}-{semester}: Exam datacgpaCalculatorSemesters: Calculator statedefaultTheme: Theme preferencedefaultTab: Startup tabattendanceGoal: Global attendance goal
Cache Management
Section titled “Cache Management”- Expiration-based cleanup
- Manual refresh options
- Clear all cache (Settings)
- Per-data-type clearing
- Cache age display