# arpitmurailya18/cp-assistant-backend architecture

> Architecture diagram of the GitHub repository arpitmurailya18/cp-assistant-backend, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/arpitmurailya18/cp-assistant-backend
- Repository: https://github.com/arpitmurailya18/cp-assistant-backend

## Overview

#### 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`](https://github.com/arpitmurailya18/cp-assistant-backend/blob/main/main.py) (Application Controller), [`solved_count.txt`](https://github.com/arpitmurailya18/cp-assistant-backend/blob/main/solved_count.txt) (Solved Progress), [`requirements.txt`](https://github.com/arpitmurailya18/cp-assistant-backend/blob/main/requirements.txt) (Dependencies), [`practice.txt`](https://github.com/arpitmurailya18/cp-assistant-backend/blob/main/practice.txt) (Practice Content)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["CLI Runtime"]
  node_user(("User<br/>actor"))
  node_main["Application Controller<br/>Python CLI<br/>[main.py]"]
  node_requirements["Dependencies<br/>Python requirements<br/>[requirements.txt]"]
end

subgraph group_storage["Local Text Storage"]
  node_practice["Practice Content<br/>text data<br/>[practice.txt]"]
  node_solved_count["Solved Progress<br/>text state<br/>[solved_count.txt]"]
end

node_user -->|"launches and interacts"| node_main
node_requirements -.->|"declares runtime dependencies"| node_main
node_main -->|"reads prompts"| node_practice
node_main -->|"reads progress"| node_solved_count
node_main -->|"writes updated progress"| node_solved_count

click node_main "https://github.com/arpitmurailya18/cp-assistant-backend/blob/main/main.py"
click node_requirements "https://github.com/arpitmurailya18/cp-assistant-backend/blob/main/requirements.txt"
click node_practice "https://github.com/arpitmurailya18/cp-assistant-backend/blob/main/practice.txt"
click node_solved_count "https://github.com/arpitmurailya18/cp-assistant-backend/blob/main/solved_count.txt"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_user,node_main,node_requirements toneBlue
class node_practice,node_solved_count toneAmber
```

## Components

### CLI Runtime

- **User**: actor
- [Application Controller](https://github.com/arpitmurailya18/cp-assistant-backend/blob/main/main.py): Python CLI · Handles interaction and practice-state updates. · `main.py`
- [Dependencies](https://github.com/arpitmurailya18/cp-assistant-backend/blob/main/requirements.txt): Python requirements · `requirements.txt`

### Local Text Storage

Working-directory files provide durable application state.

- [Practice Content](https://github.com/arpitmurailya18/cp-assistant-backend/blob/main/practice.txt): text data · `practice.txt`
- [Solved Progress](https://github.com/arpitmurailya18/cp-assistant-backend/blob/main/solved_count.txt): text state · Persists completion count across runs. · `solved_count.txt`

## Connections

- 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
