Skip to content

Latest commit

 

History

496 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QuestionGen

A desktop application for generating VCE (Victorian Certificate of Education) exam questions using AI. QuestionGen creates both multiple-choice and written-response questions for subjects including Mathematical Methods, Specialist Mathematics, Chemistry, and Physical Education.

Features

  • AI-Powered Question Generation: Uses models available on the connected ChatGPT account to generate exam-style questions aligned with VCE study design
  • Multiple Question Types: Support for multiple-choice (4 options) and written-response questions
  • Subject Coverage:
    • Mathematical Methods
    • Specialist Mathematics
    • Chemistry
    • Physical Education
  • Difficulty Levels: Essential Skills, Easy, Medium, Hard, Extreme
  • Exam PDF Integration: Attach past exam papers as style references for formatting and question patterns
  • Examiners' Reports: Import VCAA examiners' reports to inform question difficulty and common misconception targeting
  • Spaced Repetition: Practice mode with Leitner system for retention
  • Analytics Dashboard: Track performance, generation history, and distinctness metrics
  • Cloud Sync: Supabase integration for cross-device synchronization of question data, history, settings, and answer images
  • Progressive Web App: Installable desktop app built with Tauri

Tech Stack

  • Frontend: React 19, TypeScript, Vite, Tailwind CSS, shadcn/ui
  • Desktop: Tauri 2 (Rust backend)
  • State Management: Zustand
  • Math Rendering: MathJax 4
  • AI: Login with ChatGPT through a bundled local sidecar
  • File Handling: PDF input through ChatGPT's authenticated response proxy
  • Analytics: Recharts for data visualization

Development

Prerequisites

Setup

# Install dependencies
bun install

# Start development server
bun run dev

# Build for production
bun run build

# Run Tauri desktop app
bun run tauri

Configuration

  1. Copy .env.example to .env
  2. Create a Supabase project and add its URL and publishable key to .env
  3. Apply supabase/migrations/20260728000000_initial_cloud_sync.sql with bunx supabase db push

Cloud sync uses email/password authentication. The migration creates the account-scoped sync table, Realtime publication entry, private image bucket, and row/storage access policies.

On first Supabase sign-in, records cached on the device are uploaded even if they were previously marked as synced to Firebase. Firebase-only cloud data and Firebase Auth accounts require a separate administrative export/import.

Project Structure

src/
├── App.tsx              # Main app with routing
├── views/               # Page components
│   ├── GeneratorView.tsx    # Question generation UI
│   ├── HistoryView.tsx      # Generation history
│   ├── AnalyticsView.tsx    # Performance analytics
│   ├── SettingsView.tsx     # App settings
│   └── ...
├── context/             # React contexts (Supabase, Timer)
├── store/               # Zustand state stores
├── lib/                 # Utilities (token estimation, spaced repetition)
└── types.ts             # TypeScript definitions

src-tauri/
├── src/
│   ├── lib.rs          # Rust backend with Tauri commands
│   ├── engine/         # Prompting, ChatGPT routing, and validation
│   ├── parsing.rs      # Question parsing/validation
│   ├── persistence.rs  # Local storage
│   └── quality.rs      # Question distinctness scoring
└── Cargo.toml          # Rust dependencies

reports/                # VCAA examiners' reports (PDFs excluded from git)

Architecture

The app follows a hybrid architecture:

  • React Frontend: UI, state management, routing
  • Tauri Backend: File system access, PDF I/O, and local sidecar lifecycle
  • ChatGPT: Account authentication and model inference through Login with ChatGPT
  • Local-first: Persistent storage via Tauri's filesystem APIs
  • Optional Cloud: Supabase for realtime sync and private answer-image storage

Key Components

Question Generation Flow

  1. User selects topic, difficulty, question count, and type (MC/written)
  2. Optional: Attach exam PDFs for style reference
  3. Optional: Include examiners' reports for marking guidance
  4. Backend constructs prompt with VCE-specific rules and constraints
  5. The local ChatGPT sidecar requests a structured response
  6. Questions are parsed, validated, and scored for distinctness
  7. Results are stored locally and optionally synced to Supabase, including answer images

Quality Assurance

  • Distinctness Scoring: Cosine similarity between question embeddings
  • Multi-step Detection: Identifies questions requiring multiple reasoning steps
  • Schema Validation: Strict JSON schema ensures consistent output format
  • Topic Compliance: Questions mapped to user-selected topics/subtopics only

License

Private - All rights reserved

About

VCE Question Generator

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages