Skip to content

About

Onscreen Marking Software

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

EvalMeridian

CI License: MIT

An on-screen evaluation system for academic institutions. Digitizes the physical exam marking workflow — from scanning answer scripts to assigning evaluators to releasing results — into a single web application.

Why This Exists

University exam evaluation still runs on physical paper bundles, manual assignment registers, and spreadsheet-based tabulation. EvalMeridian replaces that with a browser-based workflow where administrators upload scanned scripts, evaluators mark them on-screen with annotation tools, and students can view released results.

Features

Admin Operations

  • Exam session management — create sessions scoped by academic year, semester, and exam type
  • Roster import — bulk import student records from CSV
  • Batch script upload — upload scanned answer scripts (PDFs) in batches, organized by paper code
  • Automated reconciliation — match uploaded scripts to student records using roll number extraction
  • Manual exception handling — resolve unmapped or ambiguous scripts
  • Evaluator assignment — distribute scripts to evaluators and track progress
  • Real-time monitoring — live dashboard showing evaluation throughput across the session

Evaluator Canvas

  • PDF viewer with annotations — view scanned scripts with zoom, pan, and page navigation
  • Marking tools — tick, cross, circle, underline, freehand pen, and text comment annotations
  • Keyboard shortcuts — C (correct), X (incorrect), V (cursor), T (text), P (pen), M (focus mode)
  • Split view — side-by-side display of student script alongside question paper or marking scheme
  • Auto-save — debounced draft saves every 2 seconds with sync status indicator
  • Question-wise scoring — input marks per question with running total
  • UFM flagging — flag scripts for Unfair Means with a separate review queue
  • Auto-advance — automatically loads the next pending script after submission

Teacher Dashboard

  • Course overview with KPI cards
  • Resource management (question papers, marking schemes)
  • Assessment result visibility

Student Portal

  • View released evaluation results
  • Track evaluation status (pending vs. released)
  • Institutional information and verification status

Tech Stack

Layer Technology
Framework Next.js 16 (App Router, React Compiler)
Language TypeScript
Styling Tailwind CSS 4 + shadcn/ui
Backend Supabase (PostgreSQL, Auth, Storage, Realtime)
PDF Rendering react-pdf + pdfjs-dist
CSV Parsing PapaParse
Icons Lucide React
Notifications Sonner

Project Structure

src/
├── app/
│   ├── (dashboard)/          # Authenticated routes (layout with sidebar)
│   │   ├── admin/            # Admin pages: overview, operations, scripts, students, results
│   │   ├── evaluator/        # Evaluator dashboard + canvas/[id] marking workspace
│   │   ├── teacher/          # Teacher dashboard, resources, results
│   │   └── student/          # Student dashboard + results
│   ├── login/                # Authentication page
│   └── layout.tsx            # Root layout (AuthProvider, theme, fonts)
├── components/
│   ├── admin/                # Admin-specific: BatchUploadPanel, MappingRunner, etc.
│   ├── dashboard/            # Shared dashboard components: AnnotatablePDFViewer, ResultsTable
│   ├── layout/               # Sidebar, Header, MobileDrawer
│   ├── shared/               # Reusable: DataTable, Breadcrumbs, SessionCard
│   └── ui/                   # shadcn/ui primitives
├── context/                  # AuthContext (session + role), NavContext (sidebar state)
├── types/                    # TypeScript interfaces: operations, roster, student
├── utils/
│   ├── supabase/client.ts    # Supabase client initialization
│   ├── rosterCsv.ts          # CSV parsing and validation for roster import
│   └── studentMapping.ts     # Roll number matching logic
└── lib/
    └── utils.ts              # cn() utility for className merging

Getting Started

Prerequisites

  • Node.js 18.x or later
  • A Supabase project with Auth, Database, and Storage configured

Setup

  1. Clone the repository

    git clone https://github.com/AkashNaickar/EvalMeridian.git
    cd EvalMeridian
  2. Install dependencies

    npm install
  3. Configure environment variables

    cp .env.example .env.local

    Edit .env.local with your Supabase project credentials:

    NEXT_PUBLIC_SUPABASE_URL=https://your-project-id.supabase.co
    NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key-here
    
  4. Set up the database

    Run the migration files in supabase/migrations/ against your Supabase project in filename order. 20260311_base_schema.sql creates the core tables (profiles, exams, scripts, resources); the later migrations add student mapping, operations sessions, RLS hardening, and the storage bucket. 20260314_storage_eval_documents.sql creates the private eval_documents bucket and its access policies, so you do not need to create it by hand.

  5. Create user accounts

    Add users through Supabase Auth, then insert a matching row in profiles with their role. The migrations alone do not create accounts.

  6. Start the dev server

    npm run dev

    Open http://localhost:3000.

For detailed setup instructions, see docs/setup.md.

Available Scripts

Command Description
npm run dev Start the development server
npm run build Create a production build
npm run start Serve the production build
npm run lint Run ESLint
npm run typecheck Run TypeScript type checking (tsc --noEmit)
npm run test Run Vitest unit tests
npm run test:e2e Run Playwright smoke tests (builds and serves the app)

Testing

  • Unit tests (Vitest) cover the pure logic in src/utils/ — roster CSV parsing/validation and roll-number normalization/matching. Run with npm run test -- --run.
  • Smoke tests (Playwright) verify the main route flow: unauthenticated visitors are redirected to /login and the login page renders. Run with npm run test:e2e (starts a production build on port 3000 automatically).

CI runs lint, typecheck, unit tests, build, and the Playwright smoke suite on every push and pull request.

Authentication & Roles

Authentication is handled by Supabase Auth (email/password). On sign-in, the app queries the profiles table for the user's role field and routes them to the corresponding dashboard:

Role Route Access
admin /admin Full system — sessions, scripts, assignments, monitoring
evaluator /evaluator Assigned scripts, evaluation canvas
teacher /teacher Course overview, resource management, results
student /student Personal results, evaluation status

Unauthenticated users are redirected to /login. Route protection is enforced in two layers:

  1. Server-side middleware (src/middleware.ts) — validates the Supabase session on every request via @supabase/ssr and redirects unauthenticated traffic to /login before any page renders.
  2. Client-side layout guard (AuthContext + dashboard layout) — resolves the user's role and routes them to the correct dashboard.

Role-based data access is enforced by Row Level Security policies in Supabase.

Database

The application uses Supabase PostgreSQL with the following core tables:

  • profiles — user accounts with role assignment
  • exam_sessions — exam session metadata (year, semester, type, status)
  • scripts — individual answer scripts with evaluation state, marks, annotations
  • students — student master roster
  • resources — question papers and marking schemes linked to sessions
  • exams — exam definitions with subject information

Schema migrations are in supabase/migrations/. Ad-hoc repair scripts (for development use) are in docs/sql/.

Architecture

See docs/architecture.md for detailed diagrams covering auth flow, role-based routing, and the evaluation workflow.

Current Status

This is an active development project. Known limitations:

  • Teacher and Student dashboards have limited dynamic data (some KPI values are static placeholders)
  • Admin dashboard KPIs use static demo data
  • No pagination on large data tables
  • @typescript-eslint/no-explicit-any and react-hooks/set-state-in-effect are tracked as lint warnings (pre-existing patterns, being fixed progressively)

Contributing

See CONTRIBUTING.md for guidelines on branch naming, commit conventions, and the pull request process.

Security

See SECURITY.md for how to report vulnerabilities privately.

License

Released under the MIT License.

About

Onscreen Marking Software

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages