autokanban/README.md

80 lines
2 KiB
Markdown
Raw Permalink Normal View History

2025-10-20 22:41:13 +02:00
# AutoKanban
A minimal FastAPI webapp for a physical kanban workflow with a 58mm Arduino thermal printer.
> **Tested on macOS, designed for deployment on Raspberry Pi 4 (Raspbian/Debian-based).**
---
## Features
- 📝 Users submit tasks as cards via the web UI
- ✅ Admins approve tasks and print them to a 58mm thermal printer (ESC/POS, Arduino-based)
- 📌 Printed cards are pinned to an analogue kanban board
---
## Kanban Workflow
```mermaid
flowchart TD
A[User submits task via web UI] --> B[Task appears as pending]
B -->|Admin approves| C[Task marked as approved]
C -->|Admin prints| D[Card printed on 58mm thermal printer]
D --> E[Card is pinned to physical kanban board]
```
---
## Quickstart
### 1. Install system dependencies (Raspberry Pi)
```sh
sudo apt update
sudo apt install python3 python3-venv python3-pip python3-serial
```
### 2. Set up Python environment and install packages
```sh
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
```
### 3. Run the app
```sh
uvicorn app.main:app --reload
```
### 4. Open [http://localhost:8000](http://localhost:8000) in your browser
---
## Printer Integration
- The app uses `python-escpos` to print to a serial-connected 58mm Arduino thermal printer.
- **On macOS for testing:** Use a USB-serial adapter and check your device path (e.g., `/dev/tty.usbserial-*`).
- **On Raspberry Pi:** Default device is `/dev/ttyUSB0` (update in `app/printer.py` if needed).
- The printer must support ESC/POS commands and be accessible via serial.
- For Arduino-based printers, ensure the correct baudrate (default: 19200) and permissions (`sudo usermod -a -G dialout $USER`).
---
## Project Structure
- `app/main.py` — FastAPI app, task logic, printer integration
- `app/printer.py` — Printer abstraction for cross-platform serial printing
- `app/models.py` — Task model
- `app/templates/index.html` — Web UI
- `app/static/` — Static files (optional)
---
## License
See `LICENSE` (CC BY-NC 4.0)