How arpitmurailya18/cp-assistant-backend works
Purpose and Entry Point
This is a small command-line practice tracker, likely for recording or presenting solved practice problems. The executable entry point is main.py. Persistent state is stored in plain text files rather than a database.
Application Controller
main.py contains the application’s primary control flow: user interaction, reading stored counts, and updating practice-related state. It is the architectural boundary between terminal input/output and file-backed persistence.
Paths:
• main.py
Practice Content Store
Practice material is held as text content, separated from executable logic. The application likely reads this file to select, display, or manage practice prompts.
Paths:
• practice.txt
• main.py
Progress Persistence
Solved progress is persisted in a dedicated text file. This enables state to survive separate command-line runs without requiring external infrastructure or a service.
Paths:
• solved_count.txt
• main.py
Runtime and Dependencies
The project runs on Python, with package dependencies declared in requirements.txt. No web server, database, container configuration, cloud infrastructure, or external service integration is represented in the repository tree.
Paths:
• requirements.txt
• main.py
Primary Flow
1. A user launches the Python program through main.py.
2. The program accesses practice data in practice.txt.
3. It reads existing completion state from solved_count.txt.
4. Based on user interaction, it presents or records practice progress.
5. Updated progress is written back to solved_count.txt.
The key boundary is local filesystem persistence: the program depends on readable and writable working-directory text files.
Main entry points: main.py Application Controller · solved_count.txt Solved Progress · requirements.txt Dependencies · practice.txt Practice Content
Components 5
CLI Runtime
- User
- Application Controller · Handles interaction and practice-state updates.
main.py - Dependencies
requirements.txt
Local Text Storage
Working-directory files provide durable application state.
- Practice Content
practice.txt - Solved Progress · Persists completion count across runs.
solved_count.txt
Connections 5
- User → Application Controller: launches and interacts
- Dependencies → Application Controller: declares runtime dependencies
- Application Controller → Practice Content: reads prompts
- Application Controller → Solved Progress: reads progress
- Application Controller → Solved Progress: writes updated progress