Skip to content

Repository files navigation

header

CSE226  Cloud Run  Flutter  OCR

CLI  Web  Flutter  API


🌐 Live URLs

Component URL Description
Web App ocr.nsunexus.app Frontend UI on Vercel
Backend API ocrapi.nsunexus.app Cloud Run API
Health Check ocrapi.nsunexus.app/health API status & OCR limits

About

NSU Degree Audit Engine scans university transcripts via OCR and provides:

  • Level 1: Credit Tally (earned, failed, progress)
  • Level 2: CGPA Calculation & Waiver Eligibility
  • Level 3: Full Degree Audit with Graduation Verdict

Architecture

┌─────────────────────────────────────────────────────────────┐
│                    SINGLE BACKEND API                        │
│              ocrapi.nsunexus.app (Cloud Run)                │
│         backend/api.py + src/ (shared logic)                │
└───────────────────────────┬─────────────────────────────────┘
                            │
        ┌───────────────────┼───────────────────┐
        ▼                   ▼                   ▼
  ┌──────────┐       ┌──────────┐       ┌──────────┐
  │   CLI    │       │   Web    │       │ Flutter  │
  │ Terminal │       │ Browser  │       │  Mobile  │
  └──────────┘       └──────────┘       └──────────┘
   cli_app/          ocr.nsunexus.app   flutter_app/

All 3 frontends call the same backend API — only the UI differs:

Platform Location Technology
🖥️ CLI cli_app/main.py Python + Rich
🌐 Web ocr.nsunexus.app (Vercel) HTML/CSS/JS
📱 Flutter flutter_app/ Dart + Flutter

Project Structure

Project 2/
│
├── backend/                    # 🚀 SINGLE BACKEND (Cloud Run: ocrapi.nsunexus.app)
│   ├── app/                    #   FastAPI application
│   │   ├── main.py             #   App entry point
│   │   ├── config.py           #   Configuration with Pydantic
│   │   └── api/v1/             #   API endpoints
│   ├── core.py                 #   Grade mapping, CGPA, credit logic
│   ├── ocr_web.py              #   OCR via Google Vision / Azure Doc Intelligence
│   ├── ocr_azure.py            #   Azure Document Intelligence module
│   └── ocr_engine.py           #   PDF text extraction
│
├── web_app/                    # 🌐 WEB FRONTEND (ocr.nsunexus.app)
│   ├── app.py                  #   FastAPI server (Vercel)
│   ├── templates/index.html    #   Main page
│   └── static/                 #   CSS, JS, SVG assets
│
├── cli_app/                    # 🖥️ CLI APPLICATION
│   └── main.py                 #   Terminal UI (Rich library)
│
├── flutter_app/                # 📱 FLUTTER MOBILE APP
│   ├── lib/main.dart           #   Full Flutter app
│   └── pubspec.yaml            #   Dependencies
│
├── mcp_server/                 # 🔌 MCP SERVER (Model Context Protocol)
│   ├── server.py               #   MCP server for AI assistants
│   └── tools.py                #   Available tools
│
├── docs/                       # 📚 DOCUMENTATION
│   ├── API_DOCUMENTATION.md    #   API reference
│   ├── backend_migration.md    #   Migration guide
│   └── knowledge_base.md       #   Program requirements
│
├── samples/                    # 📄 SAMPLE FILES
│   └── *.pdf                   #   Sample transcript PDFs
│
├── supabase/                   # 🗄️ DATABASE
│   └── migrations/             #   SQL migrations
│
├── Dockerfile                  # 🐳 Cloud Run container config
├── requirements.txt            # Python dependencies
└── .env.example                # Environment variable template

Quick Start

CLI App (connects to Cloud API)

pip install -r requirements.txt
python cli_app/main.py --cloud    # Uses ocrapi.nsunexus.app

Flutter App

cd flutter_app
flutter pub get
flutter run                       # Connects to ocrapi.nsunexus.app

Local Development (Optional)

cp .env.example .env              # Add your OCR API keys
uvicorn backend.app.main:app --reload  # Local API at localhost:8000

Environment Variables

Create .env file (see .env.example):

GOOGLE_CLOUD_VISION_KEY=your_key_here
AZURE_DOC_INTELLIGENCE_KEY=your_key_here
AZURE_DOC_INTELLIGENCE_ENDPOINT=https://your-instance.cognitiveservices.azure.com/

NSU Grading Scale

Grade Points Grade Points
A 4.00 C 2.00
A- 3.70 C- 1.70
B+ 3.30 D+ 1.30
B 3.00 D 1.00
B- 2.70 F 0.00
C+ 2.30

Tuition Waiver (Merit Scholarship)

CGPA Waiver Name
≥ 3.97 100% Chancellor's Award
≥ 3.75 50% Vice-Chancellor's Scholarship
≥ 3.50 25% Dean's Scholarship

footer

CSE226 • Project 2 • NSU Spring 2026

# Build trigger

About

This is the public repository for CSE226 (Vibe Coding) at North South University. It contains all course-related projects in an open-source format. The repository is maintained to ensure transparency, collaboration, and accessibility. Anyone can explore, learn from, and contribute to the projects shared here.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages