It provides command‑line interfaces for:
- Student/User management
- Tutor management
- Course management
- Enrollment management
- Payment tracking
project/
│
├── app/
│ └── app.py # Main CLI application
│
├── core/
│ ├── validators.py # Pure validation functions
│ └── storage.py # Data storage utilities
│
├── infrastructure/
│ ├── user_manager.py # CRUD operations for users
│ ├── tutor_manager.py # CRUD operations for tutors
│ ├── course_manager.py # CRUD operations for courses
│ ├── enrollment_manager.py # CRUD operations for enrollments
│ └── payment_manager.py # CRUD operations for payments
│
└── README.md
The project follows a three‑layer functional architecture:
- Displays menus
- Collects user input
- Validates input
- Calls infrastructure functions
- Shows results to the user
validators.py— input validationstorage.py— persistent storage abstraction
- Domain‑specific CRUD operations
- Searching, filtering, updating, deleting
- Business logic implemented with pure functions
Pure functions that validate:
- Names
- Emails
- Passwords
- Contact numbers
- Student levels
The CLI uses ask_until_valid() to repeatedly prompt until valid input is provided.
Handles:
- Reading data
- Writing data
- Managing in‑memory or file‑based storage
Infrastructure modules rely on this layer for persistence.
Each manager contains pure functions for CRUD operations.
create_user()get_all_users()update_user()delete_user()report_active_users_by_category()
create_course()get_course_by_name()search_courses_by_level()
create_payment()update_payment_status()total_revenue_report()
Features:
- Main menu and submenus
- Input validation
- Error messages
- Re‑prompting on invalid input
- Empty‑list reporting (e.g., “No users found.”)
- Clean, interactive user experience
User Input
↓
Validators (core.validators)
↓
Managers (infrastructure.*)
↓
Storage (core.storage)
↓
Output to CLI
From the project root:
python app/app.py