🌟 North Star Learning Center

Supportive AI ecosystem for Malaysian small-class tuition centres

Gemini 2.0 Flash Function Calling (MCP-style) FastAPI SQLite Google Cloud Run Python 3.11

🎬 See It In Action

πŸ“‹ Project Overview & Problem Statement

Challenge: Malaysian tuition centres lost UPSR. The new PBD + UASA continuous assessment is far richer β€” but the tools centres have (Google Sheets, WhatsApp, paper) cannot synthesise that signal into early supportive action. By the time end-of-term reports surface a problem, three months are lost and the relationship between child, teacher, and parent has eroded.

Solution: North Star Learning Center is a three-role AI ecosystem. The centre manager sees critical escalations and AI-drafted parent communications. Each specialist teacher sees their class with per-child support suggestions and a Help-a-Colleague nudge when peer mentorship would help. Each parent receives a warm monthly story written by Gemini β€” never raw scores, only growth and rationale.

Key Benefits

πŸ–₯️ Application Features

🚨 Critical Escalation + AI Suggester

Manager Home auto-surfaces children needing attention. Click through and the AI proposes a specific support intervention β€” keep the current specialist, try a new approach, monitor in two cycles β€” with reasoning.

πŸ’› Teacher Wellbeing Pulse

Supportive signals only β€” workload, momentum, retention risk. Never a leaderboard. Teachers are protected from being ranked or scored.

πŸ‘¨β€πŸ« Class Care Board

The teacher's home view. Per-child 2-line support suggestions grounded in real dev notes. Plus a "Celebrate This" panel surfacing wins to acknowledge in class.

πŸ§ͺ Group Composition Recommender

For monthly Science lab sessions, the AI suggests 3 groups of 3-4 children based on past collaboration history. No child is ever placed alone. Includes a "Why this combo" reasoning line for each group.

🀝 Help-a-Colleague (the differentiator)

When a junior teacher's class shows gaps, the AI flags it on the senior teacher's screen and drafts a 2-sentence peer-mentor note in supportive Malaysian English. No ed-tech we know of does this.

πŸ“¨ Monthly Parent Story Drafter

Gemini drafts a warm monthly letter for every family. The manager reviews and edits before sending. Letters never contain raw scores β€” only growth, rationale, and one concrete way the family can help at home.

πŸ“Š Centre Snapshot

Manager-only week-at-a-glance: capacity (76 slots open by subject), 185 children, 22 specialists, 44 classes with a 10-child cap. One screen, no clutter.

πŸ“” Teacher Rationale & Why

On the parent view, a plain-English explanation of why their child was assigned to a particular specialist. Transparency without surveillance.

πŸ€– AI Integration & Intelligence

πŸ“ Parent Story Generation (Gemini 2.0 Flash)

For every featured family, Gemini drafts a warm 4-6 paragraph monthly story grounded in the child's recent dev-note observations. Hard constraints: never include numeric scores, never compare to other children, always mention one growth moment and one current focus area. Runs in ~2.5 seconds at temperature 0.4.

πŸ’¬ Peer-Mentor Note Drafting

When the AI suggests a senior teacher reach out to a junior colleague, Gemini drafts a 2-sentence supportive note in Malaysian English. Constraints: exactly 2 sentences, peer-tone (not lecturing), first name only, no formal sign-off. Runs in ~1.1 seconds at temperature 0.6.

πŸ”§ MCP-style Tool Architecture

Eight named, typed, deterministic tools handle all SQL queries and scoring logic β€” centre_snapshot, at_risk_children, teacher_wellbeing, teacher_home, centre_directory, student_profile, parent_story, draft_peer_note. Clean architectural split between deterministic math and warm narrative.

πŸ›‘οΈ Anti-Surveillance Guardrails

Wellbeing, discipline, cleanliness, and collaboration are NEVER scored. Children never access the platform directly. Teacher wellbeing is a supportive signal, never a leaderboard. These constraints are encoded in the data model itself β€” not a layer that can be turned off.

πŸ› οΈ Technical Architecture & Implementation

Frontend Stack

Vanilla HTML Vanilla CSS Vanilla JavaScript No framework Single-page role switcher

Backend Stack

FastAPI Python 3.11 google-generativeai SDK SQLite (sqlite3) Uvicorn

Deployment & Infrastructure

Google Cloud Run asia-southeast1 Docker (python:3.11-slim) Cloud Build Auto-scale to zero

System Architecture

πŸ“– Development Setup & Installation Guide

Prerequisites

Quick Start Installation

# Clone the repository git clone https://github.com/lyven81/north-star-learning-center.git cd north-star-learning-center # Install dependencies pip install -r requirements.txt # Prepare the dataset (idempotent β€” safe to re-run) python prepare_data.py # Configure your Gemini API key cp .env.example .env # Edit .env and paste your key from https://aistudio.google.com/apikey # Run locally python main.py # Open http://localhost:8080

Environment Configuration

# .env file GOOGLE_API_KEY=your_gemini_api_key_here

Available Scripts

πŸš€ Deployment on Google Cloud Run

# One command from the project root gcloud run deploy north-star-learning-center \ --source . \ --region asia-southeast1 \ --allow-unauthenticated \ --set-env-vars GOOGLE_API_KEY=YOUR_KEY_HERE

Production Notes

πŸ“Š Key Metrics

185
Children Across 44 Classes
22
Specialist Teachers
8
MCP-style Tools
~1.1s
Gemini Peer-Note Latency

Business Value