Repository navigation
CHANGELOG
github-actions[bot] edited this page Jul 20, 2026
·
10 revisions
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
-
Day's absentee call list (
/absentees): principals and school admins see every student marked absent today, grouped by class, with tap-to-call parent phone numbers, a printable view, and a date picker. The list refreshes automatically every minute while teachers are still marking. A sidebar "Absentees" link makes it reachable without typing the URL. - School data export: download attendance (with optional date range) and fee records as Excel-compatible CSV files — vernacular names open correctly in Excel, and exported cells are hardened against spreadsheet formula injection.
- Usage instrumentation: attendance and report page visits by staff are now recorded, powering the weekly adoption metrics.
- Attendance page copy is now honest about parent notifications: no automation claims while automated WhatsApp alerts remain off. Server-side alert dispatch is additionally gated behind an explicit
WHATSAPP_ALERTS_ENABLEDflag so configuring credentials alone can never silently enable messages to parents. - Weekly metrics now count attendance by the school day it describes (not the day it was typed), and exclude internal/founder and test activity from adoption numbers.
- Admin-marked attendance no longer saves rows without a school code — the school is derived from the students being marked, and unresolvable writes are rejected instead of silently orphaned.
- Attendance notes are no longer wiped by a routine re-save: saving a class's register with statuses only (the web marking page) now preserves any note already stored on a student's record (e.g. entered from the mobile app) instead of silently erasing it.
- Principals and school admins who joined a school can now send invites (principals and school admins: teachers; school admins additionally: staff): previously only the account that originally set the school up could send invites — everyone else hit a "Complete school setup first" error. School resolution now falls back to the admin's own linked school (admin roles only), and the pending-invite list no longer exposes the raw invite tokens.
- Attendance and export date inputs reject impossible dates (e.g. 2026-02-31) and inverted ranges (
fromafterto) with a clear error instead of a server failure or a silently empty file. - CSV export buttons now show an error message when a download fails instead of silently saving a corrupt file.
- "Today" on the absentees page now uses the device's local date — previously it showed yesterday's list until 5:30 AM IST.
- The weekly adoption report's 50% threshold now arms against the first week with real teacher activity — anchoring on a zero-activity launch week would have left the alert permanently disarmed.
-
Complete Admin Dashboard — Teachers and admins now have a unified control center for user management, class organization, and system settings. Supports bulk actions, academic calendar setup, and granular institution profile management via
client/src/pages/admin-dashboard.tsx. -
Pilot School Seeding — New script
server/scripts/seed-pilot.tsfor instant institutional environment setup. Creates a pre-configured school with admin (nitish_admin), classes, tests, and mock engagement data. -
AI Predictive Reporting — Initial implementation of predictive learning analytics for estimating student outcomes based on historical assessment performance in
pilot-school-predictive-report.md. -
New Admin API Endpoints — Enhanced routers for
users.tsandtests.tswith bulk management capabilities and deep SIS integration.
- Gamified Onboarding Quest Panel — Slide-in quest interface for new teachers to guide them through activation (create test, set up class, invite student). Features celebratory confetti and persistence in localStorage.
-
Domain-Driven Modular Routing — Refactored the monolithic 92KB
server/routes.tsinto 10 domain-specific routers (ocr, analytics, tests, users, chat, tasks, notifications, upload, timetable, ai). -
Persistent AI Job Queue — Migrated core AI operations (Tutor, WHITEBOARD orchestration) to Redis/BullMQ to prevent state loss on server restarts via
server/services/study-arena/job-queue.ts. -
Stripe Billing Integration — Implemented end-to-end billing flow with customer portal, checkout sessions, and secure webhook handling via
server/lib/stripe.tsandserver/routes/billing.ts. -
AI Quota Middleware — New
checkAIQuotaguard enforces feature-specific monthly usage limits based on subscription tiers (Free/Pro/Enterprise). -
Period-Based Timetable Engine — Dynamic scheduling system for Period 1-8 logic with conflict detection in
server/routes/timetable.ts. -
Parent WhatsApp Automation — Background worker for automated parent nudges triggered by student inactivity or low scores in
server/services/whatsapp-automation.ts. -
Principal "Demo Mode" — High-fidelity simulated data toggle in
client/src/pages/principal-dashboard.tsxfor investor presentations and sales demos.
-
Centralized Auth Middleware — Migrated
authenticateTokentoserver/middleware.tswith improved cross-test resilience and session/cookie dual-path extraction. - Enhanced Indian EdTech Logic — Deep alignment with CBSE/ICSE contexts, LKG-12 grade mapping, and Lakhs/Crores currency formatting.
-
JWT Verification in Tests — Standardized
JWT_SECRETacross middleware and vitest configuration to resolve multi-suite auth failures. -
Router Mounting Order — Unified
/api/authand/apiroot mounts to support legacy and mobile compatibility paths.
-
Google OAuth 2.0 (Server-Side) — New server-driven sign-in flow via
server/lib/google-signin.ts. Routes:GET /api/auth/google/start(redirect to Google) andGET /api/auth/google/callback(exchange code → session cookie). Bypasses all browser popup/redirect issues (COOP, MetaMask, Safari ITP, in-app browsers). Reuses the same OAuth Web client as Google Classroom. -
Dynamic SIS — Flexible, workspace-scoped Student Information System. Teachers can create custom bases, tables, fields, records, and views entirely in PostgreSQL. Routes in
server/routes/dynamic-sis.ts, queries inserver/lib/pg-dynamic-sis.ts, AI enrichment inserver/services/dynamic-enrichment.ts. -
Google Classroom LMS Integration — OAuth-based connection to import courses and students from Google Classroom. Routes in
server/routes/lms.ts, API client inserver/lib/lms/googleClassroom.ts. Stores OAuth tokens inlms_connectionsPostgreSQL table. -
WhatsApp Notifications — Outbound WhatsApp messaging service via
server/services/whatsapp.ts. -
OTP Brute-Force Protection —
attemptscolumn added tootpstable; failed OTP verifications increment the counter and lock out after threshold. -
Canonical Domain Redirect — Production server redirects non-canonical hostnames to
CANONICAL_DOMAINenv var (301 redirect).
-
Primary DB: PostgreSQL only — Tests, questions, test attempts, and answers are now stored in PostgreSQL (
scripts/pg-schema.sql). MongoDB is fully optional (legacy fallback only). -
POSTGRESQL_URLenv var — Renamed fromDATABASE_URLtoPOSTGRESQL_URLto match GCP Secret Manager naming. Update your.envaccordingly. - Google OAuth client reuse — Google Sign-In and Google Classroom now share the same OAuth 2.0 Web client. Both redirect URIs must be registered in GCP Console.
-
userstable — Addedauth_provider,auth_subjectcolumns for multi-provider identity.UNIQUE (auth_provider, auth_subject)constraint added.
-
OTP attempts column — Added
ALTER TABLE otps ADD COLUMN IF NOT EXISTS attemptsmigration for existing databases. -
Dynamic SIS workspace isolation — All SIS queries enforce
workspace_idscoping to prevent cross-tenant data access.
- Workspace-based Local Authentication — Migrated core identity from Firebase to a self-hosted, PostgreSQL-backed authentication system. Supports multi-tenant "Workspaces" where users can be owners, admins, or members.
-
Secure Session Management — Implemented a dual-token system (JWT Access Tokens + PostgreSQL-backed Refresh Tokens) delivered via
HttpOnly,Secure,SameSite=Laxcookies. Access tokens expire in 15 minutes, with seamless background rotation using refresh tokens. -
Multi-Tenant Workspace Architecture — New PostgreSQL tables:
workspaces(containers),workspace_memberships(RBAC join table), andworkspace_invites(secure enrollment). - Invitation System — Secure, tokenized email invitations for onboarding workspace members and students. Includes SHA-256 token hashing and 7-day expiration logic.
- Email Verification & Password Reset — Native implementations for email verification and secure password resets using transactional emails via Nodemailer.
-
Workspace Auth Middleware — New server-side guards:
requireWorkspaceRole,requireActiveWorkspace, andrequireVerifiedEmail.
-
authenticateTokenmiddleware — Significant overhaul to support cookie-based JWT verification, automatic session refreshing, and active workspace context injection intoreq.userandreq.workspace. -
Firebase Auth Bridge — Firebase is no longer in the critical path for authentication. Legacy
/api/auth/firebaseendpoint remains for backward compatibility but is disabled by default viaENABLE_FIREBASE_AUTH_COMPAT. -
Frontend Auth Context —
FirebaseAuthContextrefactored toAuthProvider, providing a seamless transition from Firebase to local workspace auth without breaking existing UI components. - Signup Flow — New users now create a personal/business workspace upon registration, defaulting to the "Workspace Owner" role.
- Session Persistence — Fixed issues where users were frequently logged out due to Firebase token expiration; the new local refresh system maintains sessions for up to 30 days.
-
Database Tenancy — Resolved data leakage risks by enforcing
workspaceIdchecks at the middleware and query levels.
-
IniClaw rewritten as lightweight LLM proxy — Replaced the NVIDIA NemoClaw / OpenShell sandbox runtime with a pure Node.js HTTP proxy (
features/ai-classroom/ini_claw/gateway.js). Zero npm dependencies; uses only Node.js built-in modules. Deleted:bin/(nemoclaw CLI),docs/(Sphinx),nemoclaw-blueprint/(Python orchestration),nemoclaw/(compiled TS dist),scripts/,Dockerfile(old NVIDIA-based). Added: minimalDockerfilefor the new gateway, updatedpolicies/study-arena.yaml(removed NVIDIA hosts, kept only OpenAI/Gemini/Anthropic). -
IniClaw gateway LLM routing — New gateway calls LLM providers directly (Gemini → OpenAI → Anthropic fallback chain) instead of shelling out to
openshell sandbox exec. Keeps concurrency semaphore, body size limits, rotating audit log, CORS, and Bearer auth. -
authenticateTokenmiddleware — Now sets(req as any).user = { id, role, email }in addition toreq.session. Fixesbilling.ts,gdpr.ts,educator.ts,parent.ts, andgrading.tsroutes which readreq.user.idbut previously receivedundefined, causing silent 401s on all authenticated billing/GDPR requests. -
archiverv8 compatibility (server/routes/gdpr.ts) — v8 removed the factory-function API (archiver("zip")) in favour of named classes. Fixed:import archiver from "archiver"→createRequire+new ZipArchive(). GDPR data export now works correctly.
-
Email validation on registration (
POST /api/auth/register) — Added RFC-style email regex check. Previously, strings like"notanemail"were accepted and stored; now returns400 Invalid email address. -
study-arena-integration.test.ts—StudyArenaClientimport was broken (module didn't exist). Createdserver/services/study-arena-client.tswrapping the/api/ai-classroom/*routes. Replaced silentif (!client) returnguard withdescribe.skipIf(!isConfigured). -
ai_classroom.test.ts— Mock targetedstudy-arena-client(unused by the route); route usesstudyArenaInternalServicedirectly. Replaced mock target, fixed poll URL (/job/→/status/), fixedmy-classroomsresponse shape assertion (res.body→res.body.classrooms). -
microservices-integration.test.ts—INICLAW_URLrenamed toINICLAW_GATEWAY_URLto match rest of codebase. -
gateway.test.js— Server was not closed after tests, leaving port 17071 occupied on re-runs. Exportedserverfromgateway.js; addedafter(() => server.close()). -
smoke-test.sh— Removed check foropenshell: command not founderror (no longer applicable). Updated test route from/agent(deleted) to/tutor/chat. -
docs/STUDY_ARENA_INTEGRATION.md— Updated manual IniClaw start command fromnpm run dev:gatewaytoBRIDGE_SECRET=<secret> INICLAW_PORT=7070 node gateway.js.
-
server/services/study-arena-client.ts— HTTP client that wraps the native/api/ai-classroom/*routes. Used by integration tests. -
features/ai-classroom/ini_claw/Dockerfile— Minimal Alpine-based image for the new lightweight gateway (node gateway.js, exposes 7070).
-
GCP Cloud Run deployment live — Service running at
https://personallearningpro-wuo7arhpla-uc.a.run.app(projectplp-prod-2026, regionus-central1). -
Secret Manager — 13 secrets provisioned and bound to the Cloud Run compute SA:
MONGODB_URL,GOOGLE_API_KEY,FIREBASE_SERVICE_ACCOUNT_JSON,SESSION_SECRET,JWT_SECRET,REFRESH_SECRET,STRIPE_SECRET_KEY,OPENAI_API_KEY,DAILY_API_KEY,SMTP_HOST,SMTP_USER,SMTP_PASS,BRIDGE_SECRET. -
Cloud Build CI/CD pipeline —
cloudbuild.yamltriggers image build → Artifact Registry push → Cloud Run deploy on everymainpush.
-
AI provider: Vertex AI → Gemini — Removed
@google-cloud/vertexaiand@anthropic-ai/vertex-sdk. All AI features (study plans, tutor, classroom generation, answer evaluation) now use@google/generative-ai(Gemini 2.0 Flash) exclusively viaGOOGLE_API_KEY. OpenAI remains an optional fallback for non-grading paths. -
Grading engine: OpenAI GPT-4o → Gemini 2.0 Flash —
gradingService.tsmigrated togeminiChat()with JSON mode (responseMimeType: application/json). Essay few-shot examples are now appended to the system prompt. -
Stripe: disabled until configured — Billing routes (
/checkout,/portal,/webhook) return503 Billing not yet configuredwhenSTRIPE_SECRET_KEYis not a realsk_live_/sk_test_key. Routes auto-activate when a valid key is set in Secret Manager. Replaced broken CommonJSrequire("stripe")with conditional ESMimport. - Cloud Run resource limits — Memory upgraded from default 256Mi to 1Gi, CPU from 1 to 2. Min instances set to 1 (eliminates cold starts).
-
CORS —
*.run.appadded to the production origin allowlist inserver/index.ts.CORS_ORIGINenv var includes both Cloud Run URL variants so Vite'scrossoriginasset tags resolve correctly.
-
cloudbuild.yamldeploy step — Added--platform managed,--port 5001,--allow-unauthenticatedtogcloud run deploy; without these the build hung and health checks failed on port 8080. -
MongoDB URL — Added
/eduai?retryWrites=true&w=majoritydatabase path to the Atlas connection string stored in Secret Manager; bare SRV URIs causedbad auth: authentication failed. -
server/routes/gdpr.ts— Removed duplicateimport { Request }that caused a TypeScript unused-import error during build. -
Blank white page — Static assets (JS/CSS) were returning
500 application/jsonbecause Vite'scrossoriginattributes caused browsers to sendOriginon every asset fetch, which the CORS middleware rejected. Fixed by adding*.run.appto the allowlist and updatingCORS_ORIGIN.
- AI Classroom Features: Enhanced classroom player with interactive quizzes, keyboard navigation, PBL (Project-Based Learning) support, and real-time SSE progress tracking.
- Job Management: Implemented job cancellation via API and UI, including AbortSignal support during classroom generation.
- Whiteboard Integrations: Added whiteboard clear/erase actions, limited ledger size, and incorporated UI controls for managing whiteboard state.
- API Enhancements: Added endpoints for deleting classrooms, cancelling jobs, and pagination support for classroom listings.
- Memory Management: Added maximum buffer size to the orchestrator chunk parser and limited whiteboard ledger size to prevent OOM errors.
- Generation Pipeline: Implemented parallel scene generation, LLM timeouts, and HTML sanitization for stability.
- Background Tasks: Implemented job cleanup and staleness tracking in the StudyArena service.
-
Security & Authorization: Fixed classroom access authorization and enforced authentication checks on the
my-classroomsroute.
- Caching: Implemented in-memory caching for study arena prompts and snippets.
-
Dockerization: Comprehensive Docker setup including
Dockerfile,docker-compose.yml, and.dockerignorefor easier environment setup and containerized deployment. -
Project Documentation: Added
CONTRIBUTING.md,LOCAL_SETUP.md,CLA.md, andCODE_OF_CONDUCT.mdto prepare for open-source contributions. - Environment Management: Improved handling of environment variables with documented optional dependencies for Firebase and OpenAI.
-
Tailwind CSS Integration: Resolved issues with
@tailwindand@applydirectives inindex.css. -
TypeScript Compliance: Fixed numerous TypeScript errors across the codebase, particularly in
ocr-upload.tsx,create-test.tsx, androutes.ts. -
Frontend Hygiene: Removed redundant layout components (
Sidebar,Header,MobileNav) from individual pages now covered byAppLayout.
- UI Refinement: Established a cohesive design system with updated color palettes, typography, and enhanced dark mode support.
- Code Structure: Refactored various frontend components and backend logic for better modularity and stability.
- Dependencies: Updated numerous library versions for better compatibility and security.
- Initial release of the AI-Powered Personalized Learning Platform.
- Core features: AI Tutor, AI Test Generation, OCR Test Scanning, and Performance Analytics.