lao-python-learn / docs /1-plan.md
bounthong
fix: read PORT env for Render deployment
667bab7
|
Raw History Blame Contribute Delete
4.52 kB

A newer version of the Gradio SDK is available: 6.32.0

Upgrade

Lao Python Learning Platform - Development Plan

Target Audience: Lao secondary school students (no programming background)
Language: Lao + English code
Status: Phase 1 Complete | Phase 2, 3 Ready


Overview

A web-based Python learning platform designed for Lao students. Built with AI-assisted development, focusing on simplicity and gradual complexity.

Current Status:

  • Phase 1 (Gradio): Running at http://localhost:7860
  • Phase 2 (Tkinter): Code complete, not yet tested
  • Phase 3 (Flask): Code complete, not yet tested

Phase 1: Web Platform (Current)

What's Built

  • Gradio web interface with 5 basic lessons
  • Interactive code execution (Python runs in browser)
  • Lao language interface
  • Dark mode UI
  • Pre-loaded code examples

Files

  • app.py - Main Gradio application (340 lines)
  • requirements.txt - Dependencies
  • venv/ - Python virtual environment

URL

Lesson Coverage (Basic)

  1. Python Basics (print, variables, types, arithmetic)
  2. Conditional Logic (if/elif/else)
  3. Loops (for, while)
  4. Lists (creation, access, modification)
  5. Functions (definition, parameters, return)

TODO: Expand Lessons Later

  • Add more examples per lesson
  • Add exercises/quizzes
  • Add progress tracking
  • Add video explanations
  • Add Lao keyboard support hints

Phase 2: Desktop Application

Goal

Build simple desktop apps using Tkinter to teach OOP and GUI concepts.

Files

  • phase2_tkinter.py - Complete lesson code (303 lines)

Lessons Planned

  1. Creating a Window (basic Tkinter setup)
  2. Widgets and Layouts (buttons, labels, entries)
  3. Event Handling (clicks, keyboard, functions)
  4. Building a To-Do List App (OOP introduction)
  5. Calculator App (complete desktop application)

How to Run

source venv/bin/activate
python phase2_tkinter.py

TODO Before Teaching

  • Test all 5 lessons
  • Add screenshots/screenshots guide
  • Create exercise sheets
  • Add common errors section

Phase 3: Web Application

Goal

Build a web app using Flask to teach backend concepts and APIs.

Files

  • phase3_flask.py - Complete lesson code (326 lines)

Lessons Planned

  1. Basic Routes and Responses
  2. Templates (Jinja2)
  3. API Endpoints (REST)
  4. Full Web App - Task Manager
  5. Integration and Best Practices

How to Run

pip install flask -q
python phase3_flask.py

Access

TODO Before Teaching

  • Install Flask dependency
  • Test all routes
  • Add error handling examples
  • Create deployment guide (Hugging Face Spaces, Render)

Phase 4: Future Enhancements

Advanced Topics

  • Object-Oriented Programming (OOP) in depth
  • File Handling (read/write)
  • Error Handling (try/except)
  • Introduction to Data Science (pandas basics)
  • Simple Games (Turtle graphics)

Platform Features

  • User accounts and progress tracking
  • Achievement badges
  • Leaderboard (optional)
  • Mobile-responsive design
  • Offline mode (PWA)

Technical Improvements

  • Deploy to Hugging Face Spaces (free hosting)
  • Add real-time code execution backend
  • Add automated grading
  • Add discussion/forum feature

Development Workflow

AI-Assisted Approach

  1. I write the code with your guidance
  2. You test and provide feedback
  3. We iterate until it works
  4. Save as skill for future reference

Current Workflow

  • Project location: /home/bounthong/elearning-python/lao-python-learn/
  • Virtual env: /home/bounthong/elearning-python/lao-python-learn/venv/
  • Docs: /home/bounthong/elearning-python/lao-python-learn/docs/

Next Steps (Your Choice)

  1. Expand Phase 1 lessons with more content
  2. Test Phase 2 (Tkinter)
  3. Test Phase 3 (Flask)
  4. Deploy Phase 1 to Hugging Face Spaces
  5. Add quizzes/exercises to Phase 1

Quick Reference

Run Phase 1

cd /home/bounthong/elearning-python/lao-python-learn
source venv/bin/activate
python app.py

Run Phase 2

python phase2_tkinter.py

Run Phase 3

pip install flask
python phase3_flask.py

Verify Everything

python /tmp/hermes-verify-lao-python-platform.py

Notes

  • All code is in Lao language for student-facing content
  • Code snippets use English (standard Python)
  • Platform is free and open source
  • Can be hosted on Hugging Face Spaces for free
  • No database required (uses in-memory storage for now)