LocEngine is a "System-First" authoring platform that decouples Pedagogical Logic (Math/Science tasks) from Narrative Skin (Themes/Characters). It uses Generative AI (Gemini Pro) to orchestrate lessons based on strict schemas.
We do not build "pages"; we build a linear Task Stream. A lesson is simply a JSON array of Task Objects. The Player component indiscriminately renders these objects based on their template ID.
- Teacher Intent: User selects constraints via the Lesson Wizard (Grade, Topic, Theme, Characters).
- AI Orchestration: The "Prompt Engineer" middleware constructs a strict prompt for Gemini Pro.
- JSON Generation: Gemini returns a valid JSON array adhering to the
Task Schema. - The Editor: The teacher polishes the raw AI output.
- The Player: A dedicated route (
/play/:id) renders the lesson for students.
- Framework: React + Vite
- Styling: Tailwind CSS (Cyberpunk/Glassmorphism Theme)
- Icons: Lucide React
- AI Engine: Google Gemini Pro (via API)
- Persistence: LocalStorage (MVP) -> Firestore (V2)
We currently support 4 core templates for the MVP Math Module:
| Template ID | Description | Usage |
|---|---|---|
readonly |
Static content (Text/Image/Video) | Story setting, introductions, explanations. |
activity-conversation |
Character Dialogue | Concept building through narrative (e.g., Hero teaching Sidekick). |
activity-mcq |
Multiple Choice Question | Assessments, logic checks. |
activity-input |
Text/Number Input | Practice problems requiring specific answers. |
{
"taskId": "uuid-1234",
"type": "activity-conversation",
"config": {
"theme": "space_exploration",
"background": "mars_surface_day"
},
"content": {
"script": [
{ "speaker": "hero", "text": "Captain! We have 1/2 tank of fuel left." },
{ "speaker": "sidekick", "text": "We need 3/4 to reach orbit. How much more do we need?" }
]
}
}
- Registry Engine: Dynamic component rendering based on JSON.
- Editor UI: Split-screen (Code + Preview) editing.
- Dashboard: Project management and archives.
- Visual System: Cyberpunk styling and typography.
- Lesson Wizard: UI for selecting Grade, Topic, Theme, Characters.
- Prompt Engineer Service: Logic to convert UI selections into Gemini prompts.
- Schema Validator: Ensure AI output matches our
registry.jsx.
- Player Route: Read-only view (
/play/:id) hiding all editor tools. - Deployment: Public access via GitHub Pages.
# Install dependencies
npm install
# Run Development Server
npm run dev
# Build for Production
npm run build
# Deploy to GitHub Pages
npm run deploy
- Font: JetBrains Mono (Code/UI), Inter (Body).
- Colors: Deep Cyber Black (
#02040a), Cyan (#22d3ee), Fuchsia (#d946ef). - Effects: Glassmorphism, Neon Glows, Antialiased Typography.
Shall I proceed with creating the "Lesson Wizard" (Phase 2) now that we have locked the scope?