Metadata-Version: 2.4
Name: squareberg-hub
Version: 0.1.2
Summary: Squareberg — local application hub
License: MIT
License-File: LICENSE
Keywords: api,dashboard,fastapi,hub,local
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: FastAPI
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.10
Requires-Dist: aiosqlite>=0.21
Requires-Dist: fastapi>=0.115
Requires-Dist: httpx>=0.28
Requires-Dist: tomli>=2.0; python_version < '3.11'
Requires-Dist: typer>=0.15
Requires-Dist: uvicorn[standard]>=0.34
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.25; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mkdocs-material>=9.5; extra == 'docs'
Requires-Dist: mkdocstrings[python]>=0.27; extra == 'docs'
Description-Content-Type: text/markdown

# Squareberg

A local application hub that aggregates personal productivity tools behind a unified API gateway. Each app is a standalone FastAPI backend with its own virtual environment, communicating over Unix domain sockets. Frontends are fully decoupled client-side SPAs.

## Features

- **Unified dashboard** — grid launcher showing all apps, status, and links
- **Decoupled frontends** — each app ships one or more Preact + daisyUI SPAs; no Node runtime at runtime
- **Per-app isolation** — separate process, venv, and SQLite database per app
- **OpenAPI introspection** — live spec exposure for human browsing and agentic discovery
- **`sqb` CLI** — install, start, stop, update apps; switch frontends
- **macOS + Linux** — Unix sockets, `uv`, `npm`; no Docker, no external database server

## Requirements

- Python ≥ 3.10
- Node.js ≥ 18
- [`uv`](https://docs.astral.sh/uv/)
- Git

## Quick start

```bash
git clone https://github.com/squareberg/squareberg-hub.git
cd squareberg-hub
uv venv --prompt sqb --python 3.12

# Build the dashboard
./build-hub.sh 

# Start the hub (port 9100)
sqb start
```

Open `http://127.0.0.1:9100` in your browser.

Install the hello-world example app to verify the pipeline:

```bash
sqb app add examples/hello
sqb app start hello
# → http://127.0.0.1:9100/apps/hello/
```

## CLI

```
sqb start / stop / status
sqb app add <url-or-path> [--as <name>]
sqb app remove / start / stop / logs / update <name>
sqb frontend list / switch <app> <frontend>
```

## Documentation

Full docs at [squareberg.github.io/squareberg-hub](https://squareberg.github.io/squareberg-hub) — or build locally:

```bash
./serve-docs.sh
```

## Project layout

```
squareberg/
├── hub/            # hub backend (FastAPI, proxy, registry, process manager)
│   └── dashboard/  # hub dashboard SPA (Preact + daisyUI + Tailwind)
├── examples/
│   └── hello/      # minimal example app
├── docs/           # mkdocs-material documentation source
└── tests/          # pytest unit and functional tests
```

## License

MIT
