How nikhil210206/skipp works
Purpose and entry points
Skipp is a privacy-oriented SRM student companion: it converts portal attendance, marks, timetable, and academic-planner pages into a local-first installable PWA. The browser entry is the Next.js App Router root at frontend/src/app/layout.tsx and landing/login route at frontend/src/app/page.tsx. The server entry is FastAPI in backend/main.py, with Vercel’s Python handler at backend/api/index.py.
Client application shell and session boundary
The authenticated application is organized beneath the (app) route group, whose layout provides the persistent shell/navigation: frontend/src/app/(app)/layout.tsx, frontend/src/components/AppShell.tsx, and frontend/src/context/SessionContext.tsx. The session context is the main client-side boundary between login/refresh state and feature pages. Credentials and refreshed portal data remain device-side; the frontend sends credentials only for a refresh request.
Secure local persistence and backend API client
The client API and persistence layer mediates all server calls and cached snapshots: frontend/src/lib/api.ts, frontend/src/lib/crypto.ts, and frontend/src/lib/__devFixture.ts. Web Crypto AES-GCM and IndexedDB protect cached credentials/data locally. This cache prevents page navigation and reopening from repeatedly authenticating against SRM, which is important because the upstream portal applies CAPTCHA and daily login limits.
Portal authentication and scraping backend
FastAPI receives refresh/login work, then performs the cross-origin portal interaction server-side. Core request/session/client responsibilities are separated in backend/core/client.py, backend/core/session.py, and backend/core/student_portal_client.py. These components use the student’s supplied credentials in request memory, establish portal session/cookies, retrieve upstream HTML, parse it, return normalized JSON, and discard credentials/data rather than persisting them.
Domain models and normalized snapshot
Backend schemas define the contract returned to the PWA: backend/models/snapshot.py, backend/models/attendance.py, and backend/models/student_portal.py. The snapshot is the aggregate refresh payload; attendance, marks, schedule/timetable, and portal-planner data are transformed from portal-specific HTML into frontend-consumable structures. This model boundary isolates UI and prediction logic from changes in SRM markup.
Academic data pipelines and planning logic
Feature services independently parse or derive the key academic views: attendance in backend/services/attendance.py, marks in backend/services/marks.py, and timetable in backend/services/unified_timetable.py. backend/services/academic_planner.py builds calendar/day-order/holiday planning data. Client pages consume the cached snapshot for dashboard and dedicated workflows, including frontend/src/app/(app)/attendance/page.tsx, frontend/src/app/(app)/calendar/page.tsx, and frontend/src/app/(app)/timetable/page.tsx.
Predictions, customization, and device features
Attendance/leave and grade calculations are split between backend-oriented services such as backend/services/predictor.py and frontend interaction utilities such as frontend/src/lib/predictor.ts and frontend/src/lib/leavePredictor.ts. User-only adjustments—custom or optional classes—are local concerns via frontend/src/lib/customClasses.ts. The PWA/runtime layer uses frontend/public/sw.js for network-first caching, frontend/src/components/PWARegister.tsx for registration, and frontend/src/lib/notify.ts for local notifications; no push service or server-side student database exists.
Runtime and external dependencies
The frontend runs on Next.js 16/React 19/TypeScript, deployable as web plus Capacitor Android/iOS shells (frontend/capacitor.config.ts, frontend/android/app/src/main/java/life/skipp/app/MainActivity.java, frontend/ios/App/App/AppDelegate.swift). The backend is Python/FastAPI deployed through Vercel configuration (backend/vercel.json). Its sole material external data service is academia.srmist.edu.in; Vercel cookieless analytics/speed insights are the stated telemetry integration.
Main entry points: page.tsx Academic views · student_portal_client.py Portal scraper · layout.tsx App root & login · api.ts API & cache mediator
Components 21
Next.js PWA
- App root & login
frontend/src/app/layout.tsx - Authenticated shell
frontend/src/app/(app)/layout.tsx - Session context · Controls login and refresh state for feature pages.
frontend/src/context/SessionContext.tsx - Academic views · Attendance, calendar, and timetable workflows consume snapshots.
frontend/src/app/(app)/attendance/page.tsx - API & cache mediator
frontend/src/lib/api.ts - Encrypted local cache · Keeps credentials and refreshed snapshots device-local.
frontend/src/lib/crypto.ts - Client predictions · Leave and attendance prediction utilities.
frontend/src/lib/leavePredictor.ts - Custom classes
frontend/src/lib/customClasses.ts - PWA runtime · Provides network-first caching.
frontend/public/sw.js - PWA registration
frontend/src/components/PWARegister.tsx
FastAPI refresh service
- FastAPI API · Receives login and refresh work.
backend/main.py - Vercel Python handler
backend/api/index.py - Portal session client · Uses supplied credentials only in request memory.
backend/core/session.py - Portal scraper · Fetches and parses portal HTML and cookies.
backend/core/student_portal_client.py - Academic parsers · Parses attendance, marks, and unified timetable data.
backend/services/attendance.py - Academic planner · Builds calendar, day-order, and holiday data.
backend/services/academic_planner.py - Backend predictor
backend/services/predictor.py - Normalized snapshot · Aggregate API contract isolating clients from portal markup.
backend/models/snapshot.py
SRM portal
- academia.srmist.edu.in · Sole material external data source.
Native shells
- Android & iOS shells
frontend/capacitor.config.ts
Other components
- Vercel telemetry · Cookieless analytics and speed insights.
Connections 23
- App root & login → Authenticated shell: enters after login
- Authenticated shell → Session context: provides session
- Authenticated shell → Academic views: hosts
- Session context → API & cache mediator: requests refresh
- API & cache mediator → Encrypted local cache: reads and writes
- Academic views → Encrypted local cache: uses cached snapshot
- Academic views → Client predictions: calculates scenarios
- Academic views → Custom classes: applies adjustments
- PWA registration → PWA runtime: registers
- PWA runtime → App root & login: caches runtime
- API & cache mediator → FastAPI API: refresh request · Credentials are sent only for refresh.
- Vercel Python handler → FastAPI API: invokes
- FastAPI API → Portal session client: starts request session
- Portal session client → Portal scraper: supplies session cookies
- Portal scraper → academia.srmist.edu.in: fetches portal HTML
- Portal scraper → Academic parsers: source HTML
- Portal scraper → Academic planner: source HTML
- Academic parsers → Normalized snapshot: normalizes data
- Academic planner → Normalized snapshot: adds planning data
- Backend predictor → Normalized snapshot: adds derived results
- Normalized snapshot → API & cache mediator: normalized JSON
- Android & iOS shells → App root & login: hosts web app
- App root & login → Vercel telemetry: reports anonymous metrics