GitHub - nontech/luna: Empowering teachers with an interactive web tool for custom Python exercises

Empowering teachers with an interactive web tool for in-browser Python exercises.

Create, manage, and run Python exercises without leaving your browser.

Share it with your students.

Live Demo

Target Audience

  • Computer Science Educators
  • Programming Instructors
  • Teaching Assistants

Use Cases

  • Create custom Python exercises with test cases
  • Track student progress and submissions
  • Provide detailed feedback

Python input() cases currently supported


1. Basic Input
name = input("Enter name: ")

2. Input with Method Chaining
# Single method
text = input("Enter text: ").strip()
name = input("Enter name: ").upper()

# Multiple methods
name = input("Enter name: ").strip().title()
command = input("Enter command: ").lower().strip()

3. Input with Type Conversion
age = int(input("Enter age: "))
price = float(input("Enter price: "))

# Conversion with strip
number = int(input("Enter number: ").strip())
amount = float(input("Enter amount: ").strip())

4. Input in Control Structures
while True:
    choice = input("Continue? (y/n): ").lower().strip()
    if choice == 'n':
        break

5. Input with Nested Function Calls
# List comprehension with input
numbers = [int(input(f"Number {i}: ").strip()) for i in range(3)]

# Conditional with input
result = "Valid" if input("Check: ").strip().isdigit() else "Invalid"

Tech Stack

Frontend

  • Next.js
  • TypeScript

Backend

  • Django REST Framework
  • PostgreSQL

Architecture

Conceptual Model

Conceptual Model


Database Schema

ERD Diagram


Authentication Flow

Auth Flow


Deployment Architecture

Luna uses a modern cloud deployment setup:

  • Frontend: Hosted on Vercel for optimal Next.js performance
  • Backend: Django REST API deployed on Railway
  • Database: PostgreSQL instance managed by Railway

Deployment

API Documentation

View API Documentation

Contributing

Contributions are welcome! Please feel free to submit a PR.