Metadata-Version: 2.4
Name: algoflex
Version: 1.2.0
Summary: Algoflex - An algorithm practice TUI
Author-email: ndero <jnderoh@gmail.com>
License-Expression: MIT
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: textual[syntax]>=3.5.0
Dynamic: license-file

# Algoflex

**Sharpen your algorithm skills — right from the terminal.**

Algoflex is a lightweight, offline-first terminal application for practicing algorithms and data structures. It provides a curated collection of coding problems, fast local feedback, and persistent progress tracking — without requiring an account, server, or browser.

![Algoflex Home Screen](assets/homepage.png)

## Why Algoflex?

Algoflex is designed around a simple idea: algorithm practice should be fast, focused, and available anywhere a terminal is available.

## Features

* **Offline-first** — Practice without relying on an internet connection or remote services.
* **Cross-platform** — Runs on Linux, macOS, and Windows.
* **Keyboard-driven TUI** — Navigate and solve problems efficiently from the terminal. Mouse input is also supported.
* **Curated problem set** — A focused collection of algorithm and data-structure problems designed to strengthen fundamental problem-solving skills.
* **Multiple languages** — Solve problems using Python, Rust or SQL.
* **Automated testing** — Run problem-specific tests against your solution and receive immediate feedback.
* **Progress tracking** — Track solve times, recent activity, historical attempts, and areas for improvement.
* **Local persistence** — Problem attempts, drafts and language preferences are stored locally.

## Problem set

The curated problem set covers fundamental algorithms and data structures, and SQL fundamentals. These include:

* Arrays & Strings
* Stacks & Queues
* Linked Lists
* Trees & Binary Search Trees
* Heaps & Priority Queues
* Graphs
* Hashing
* Greedy Algorithms
* Dynamic Programming
* Backtracking
* Recursion
* Bit Manipulation
* SQL Queries, CTEs, partition windows & window functions. 

Problems are curated to reinforce core concepts and develop reusable problem-solving patterns across increasing levels of difficulty. Their order is randomized on each startup, encouraging independent problem-solving.

## Installation

Algoflex requires **Python 3.12 or later** and runs on **Linux, macOS, and Windows**.

Rust solutions additionally require **Rust 1.97 or later**.

SQL solutions use Python's SQLite3. 

### Using `uv`

Install Algoflex as a standalone tool with [uv](https://docs.astral.sh/uv/):

```bash
uv tool install algoflex
```

### Using `pip`

Alternatively:

```bash
pip install algoflex
```

## Getting Started

Launch Algoflex from your terminal:

```bash
algoflex
```

Choose a problem, write your solution, run the tests, and review your results.

## Supported Languages

* **Python 3.12+**
* **Rust 1.97+**
* **SQL** using Python's **SQlite3**

## Screenshots

### Attempt

![Algoflex Attempt Screen](assets/attempt.png)

### Search

![Algoflex Search Screen](assets/search.png)

### Dashboard

![Algoflex Dashboard](assets/dashboard.png)

## Development

Algoflex uses `uv` for project and dependency management, with pytest for testing, Ruff for linting and formatting, pre-commit hooks for local checks, and GitHub Actions for continuous integration, build validation, and tagged releases.

Clone the repository:

```bash
git clone https://github.com/ndero/algoflex.git
cd algoflex
```

Set up the development environment and install Git hooks:

```bash
make setup
```

Run the test suite:

```bash
make test
```

Run linting:

```bash
make lint
```

Check formatting:

```bash
make format-check
```

Build the package:

```bash
make build
```

Build and run the local application:

```bash
make run
```

Run the full project checks:

```bash
make check
```

## License

Algoflex is licensed under the **MIT License**.

See the [`LICENSE`](LICENSE) file for the full license text.
