← All projects

Featured • Multi-Ordinance Academic Engine

Anviksha

Multi-Ordinance Academic Engine — a project by Himanshu Singh Dangi, Frontend & Full Stack Developer.

Live Demo → Source Code
anviksha-result.vercel.app
Anviksha — Multi-Ordinance Academic Engine
Next.jsTypeScriptReactTailwind CSS v4ZustandRechartsFramer MotionCheerioVitestZodjsPDF

About this project

Live App Version Next.js React TypeScript Tailwind CSS Vitest Security

Overview

Anviksha (अन्वीक्षा — "analytical enquiry") is a student-built academic results and analytics platform for Guru Gobind Singh Indraprastha University (GGSIPU). It interfaces with the university examination portal (examweb.ggsipu.ac.in) as a stateless, privacy-first proxy layer — no database, no stored credentials, no retained records.

Rather than showing only a raw table of marks, Anviksha interprets result data through an ordinance-based academic engine (src/lib/academic/) built on official GGSIPU ordinances — Ordinance 11 for semester degrees, plus separate verified frameworks for MBBS (Ord. 15), MD/MS (Ord. 16), BHMS (Ord. 22), BASLP (Ord. 24), BPT/BOT (Ord. 31), and BAMS (Ord. 38):

Disclaimer: Anviksha is an independent, unofficial student application and is not affiliated with or endorsed by GGSIPU. Official university marksheets always supersede any calculation shown here.


Table of Contents


Core Design Principles

  1. Zero-Storage Privacy — Credentials, marks, and personal data are proxied, never persisted. There is no database anywhere in the stack.
  2. Honesty Over Guesswork — Every calculated metric carries a verification state: VERIFIED (statutory rule confirmed), RESULT_DERIVED (computed directly from official marks), WARNING (depends on estimated/user credits), NOT_APPLICABLE (the programme's ordinance doesn't define it), UNAVAILABLE (withheld rather than guessed), or AMBIGUOUS (programme framework unclear).
  3. Fail-Closed Rendering — If a programme's rules aren't verified, analytics aren't shown — Ordinance-11-shaped math is never silently applied to a medical or allied-health programme where it doesn't belong.
  4. Tested Evolution — The engine (src/lib/academic/) is type-checked and unit-tested (108 automated tests) and grows as ordinance verification progresses.

Key Features

1. Privacy-First Session Proxy

2. Ordinance-Based Academic Engine (src/lib/academic/)

3. Honest Result Viewing

4. Live Examination Notices Feed (/notices)

5. Client-Side Document Export

6. Real-Time Global System Status Indicator

7. Landing & SEO Layer


The Ordinance-Based Engine

The heart of Anviksha is src/lib/academic/ — a typed, data-driven layer that answers one question per programme: "What are we allowed to claim about this result?"

Raw ExamWeb JSON
      │
      ▼
academic-engine/  →  analyzeResult(raw, userCredits, options)
      │                  • matches programme family + ordinance from academic-db.ts
      │                  • normalizes marks, statuses, and credits
      │                  • merges repeated marksheet rows (cleared reappears win)
      │                  • computes only what the ordinance's capabilities allow
      ▼
EngineResult        →  every metric is a Metric<T>:
      │                  { value, status, reason, sources }
      │                  status ∈ VERIFIED | RESULT_DERIVED | WARNING
      │                         | UNAVAILABLE | AMBIGUOUS | NOT_APPLICABLE
      ▼
Dashboard & Analytics  →  render strictly within capabilities;
                           surface every status and citation

Programme Coverage

The engine recognizes GGSIPU programme families from the official programme name/code returned by ExamWeb:

Stream Programmes Ordinance
Semester degrees B.Tech, M.Tech, BCA, MCA, BBA, MBA, B.Com, BA, BA/BBA LLB Ordinance 11 — full analytics
Medicine MBBS Ordinance 15 — marks, pass/fail (50% theory + practical); no divisions by rule
Medicine (PG) MD / MS Ordinance 16 — pass/fail
Homoeopathy BHMS Ordinance 22 — percentage, subject distinction
Speech & Hearing BASLP Ordinance 24 — percentage divisions
Weekend programmes Weekend semester degrees Ordinance 25
Physiotherapy BPT / BOT Ordinance 31 — CPI divisions, all-subjects promotion
Ayurveda BAMS Ordinance 38

Results render for any programme declared on ExamWeb — every affiliated institute (USICT, MAIT, MSIT, BVCOE, BPIT, GTBIT, VIPS, ADGITM, JIMS, DTC, GNDIT, and the rest across Delhi NCR). Unrecognized programme names get honest raw-marks rendering with AMBIGUOUS statutory metrics, never a default formula.


Technology Stack

Category Technology Purpose
Framework Next.js 16.2 (App Router, Turbopack) Server Components, ISR caching, Route Handlers, middleware
Library React 19.2 (+ React Compiler) Client UI, concurrent rendering
Language TypeScript 5.9 End-to-end type safety
Styling Tailwind CSS v4 (@tailwindcss/postcss) Obsidian-dark design tokens, responsive layout
Motion Framer Motion v12 Fluid transitions, hero micro-interactions
State Zustand v5 In-memory result caching & credit overrides
Parsing Cheerio v1 Notices scraping & normalization
Charts Recharts v3 SGPA trends, grade distributions, internal/external splits
Forms react-hook-form + Zod Validated login & report forms
PDF Export html2canvas-pro + jspdf Client-side transcript/marksheet generation
Testing Vitest v4 + Testing Library + jsdom Unit, engine & route tests
Analytics Vercel Analytics Performance vitals & telemetry

Getting Started

Prerequisites

Setup

# Clone the repository
git clone <your-repo-url>
cd anviksha

# Install dependencies
npm install

# Start the development server (Turbopack)
npm run dev

Open http://localhost:3000. Sign in with your GGSIPU enrollment number, password, and the captcha shown (relayed live from the university portal).

No environment variables are required — the app is deliberately configuration-free and stateless.


Project Structure

anviksha/
├── public/                         # Static assets (icons, logos)
├── src/
│   ├── proxy.ts                    # Middleware: auth guards for /dashboard, /api/result, /login
│   │
│   ├── lib/academic/               # ▸ Ordinance-based academic engine (pure TypeScript)
│   │   ├── academic-db.ts          #   Ordinance registry: capabilities, rule bands, clause sources
│   │   ├── academic-engine/        #   analyzeResult(): normalization + verified computation
│   │   │   ├── index.ts            #     orchestrator — composes every derived metric
│   │   │   ├── subject-results.ts  #     row parsing, credits, status, grades, reappear merge
│   │   │   └── rules/              #     promotion, reappear, division, placement
│   │   └── academic-engine.test.ts #   Engine unit tests
│   │
│   ├── app/                        # Next.js App Router
│   │   ├── layout.tsx              #   Root layout: fonts, SEO metadata, JSON-LD
│   │   ├── page.tsx                #   Landing page
│   │   ├── manifest.ts / robots.ts / sitemap.ts
│   │   ├── (auth)/login/           #   Login page with captcha proxy
│   │   ├── (app)/
│   │   │   ├── dashboard/          #   Result overview + /dashboard/analytics deep dossier
│   │   │   ├── notices/            #   Live exam circulars (15-min ISR)
│   │   │   ├── calculations/       #   Transparent ordinance methodology guide
│   │   │   └── report/             #   User feedback & diagnostics
│   │   └── api/(auth)/
│   │       ├── captcha/route.ts    #   Captcha image relay + JSESSIONID capture
│   │       ├── health/route.ts     #   Stateless heartbeat & server responsiveness ping
│   │       ├── login/route.ts      #   Credential proxy → upstream /web/login
│   │       ├── logout/route.ts     #   Session destruction + upstream /web/logout
│   │       └── result/route.ts     #   Full result fetch (euno=100) + normalization
│   │
│   ├── components/
│   │   ├── home/                   #   Hero, engine bento, coverage, trust, FAQ/CTA sections
│   │   ├── login/                  #   LoginForm
│   │   ├── dashboard/              #   CreditTipModal, skeletons, avatar, logout
│   │   ├── analytics/              #   Promotion, Placement, Division, Trends, Reappear,
│   │   │                           #   ExplanationPanel, QuickStats cards
│   │   ├── export/                 #   ConsolidatedMasterTranscript, ResultGradeSheet
│   │   ├── notices/                #   NoticesClientView (search + categories)
│   │   └── common/                 #   AppNavbar, SystemStatusStrip, ErrorBoundary, FloatingReport
│   │
│   ├── helpers/
│   │   └── notices.ts              #   IPU notices fetcher & category classifier
│   │
│   ├── store/result-store.ts       #   Zustand: active result + custom credit overrides
│   ├── types/                      #   StudentProfile, Result, Notice, ApiResponse types
│   └── validations/                #   Zod schemas (login credentials)
│
├── vercel.json                     # Vercel config (BOM region, 30s function ceiling)
└── vitest.config.mjs               # Test configuration (jsdom, coverage)

Architecture & Data Flow

 Browser                                    Anviksha (Next.js)                GGSIPU Portal
─────────────                          ──────────────────────────         ───────────────────
 Enter credentials + captcha
        │                                        │
        ▼                                        ▼
 Zod validation ─────────────────►  POST /api/(auth)/login ─────────►  POST /web/login
 sha256(password + captcha salt)          │  (captures JSESSIONID           │
        │                                 │   into HttpOnly cookie)         ▼
        │                                 │                          session established
        ▼                                 ▼
 Dashboard request ──────────────►  GET /api/(auth)/result ─────────►  student/search
        │                                 │  (euno=100 full fetch)         ?euno=100
        │                                 ▼
        │                          academic-engine/
        │                          (analyzeResult + academic-db)
        ▼                                 ▼
 Zustand store (in-memory) ◄────── EngineResult with per-metric verification
        │
        ├──► Dashboard, Analytics (verification-badged rendering)
        └──► PDF Transcript export (client-side only)

 Logout ─────────────────────────►  POST /api/(auth)/logout ────────►  GET /web/logout
                                        (cookies destroyed)

Session lifecycle: middleware (src/proxy.ts) checks the auth_session cookie on every protected request; expired sessions receive a 401 SESSION_EXPIRED (API) or a redirect to /login?expired=true (pages).


Grading Reference (Ordinance 11)

Marks Range Letter Grade Grade Points
90 – 100 O (Outstanding) 10
75 – 89 A+ (Excellent) 9
65 – 74 A (Very Good) 8
55 – 64 B+ (Good) 7
50 – 54 B (Above Average) 6
45 – 49 C (Average) 5
40 – 44 P (Pass) 4
< 40 or absent F (Fail) 0

Scripts

Command Description
npm run dev Start the dev server (Turbopack)
npm run build Production build
npm start Serve the production build
npm run lint ESLint across the project
npm test Run the full Vitest suite
npm run test:watch Vitest in watch mode
npm run test:coverage Test run with coverage report
npx tsc --noEmit TypeScript type-check

Testing & Verification

The project maintains a 108-test automated suite (7 files) covering the academic engine, notices scraper, system status strip, validators, and API routes:

npm test              # 108 tests, currently 100% green
npx tsc --noEmit      # clean
npm run lint          # 0 errors
npm run build         # production bundle
Suite Focus
lib/academic/academic-engine.test.ts Ordinance rules, grades, SGPA/CGPA, CS/AP exclusion, promotion, reappear merge
components/dashboard/dashboard-metrics.test.ts Dashboard tabs, backlog counting after a cleared reappear
components/common/SystemStatusStrip.test.tsx Heartbeat latency, Slow/Offline classification, 12s timer, tab visibility, network events
helpers/notices.test.ts Notices fetching & categorization
validations/login.validation.test.ts Credential schema validation
app/api/(auth)/login|result route tests Proxy route behaviour & error paths

Security & Privacy


Deployment

Deployed on Vercel (vercel.json):

Any Next.js-compatible host works — the app has no server-side state or environment dependencies.


Documentation

Document Contents
/calculations In-app methodology guide: every formula, badge, and its ordinance clause

Author

Designed and built by Himanshu Singh.

Disclaimer: Anviksha is an independent, student-built analytics layer and is not affiliated with or endorsed by GGSIPU. All academic decisions remain subject to official university records and ordinances.

  1. 01 Anvaya Lab Full Stack API Client →
  2. 02 DevToolkit AI AI Developer Toolkit →
  3. 03 Vidyavriksha Full Stack Platform →
  4. 04 Inside Campus Team Lead • Hackathon →
  5. 05 Sutra Ecom MERN E-Commerce →
  6. 06 TVGF Website Client Project →
  7. 07 Portfolio Website Personal Portfolio →
  8. 08 Weather App API Integration →
  9. 09 PostFinder JavaScript Project →