Metadata-Version: 2.4
Name: lattice-meetbot-admin
Version: 0.1.0
Summary: Mountable FastAPI admin router for lattice-meetbot captures. Constructor-DI, MeetbotAdminRepo protocol, SQLite reference impl.
Author: CodeWarrior4Life
License: Apache-2.0
Project-URL: Homepage, https://github.com/CodeWarrior4Life/lattice-meetbot-admin
Project-URL: Issues, https://github.com/CodeWarrior4Life/lattice-meetbot-admin/issues
Keywords: lattice,meeting,admin,transcription,diarization,personas
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
Classifier: Topic :: Office/Business :: Groupware
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastapi>=0.110
Requires-Dist: pydantic>=2.0
Requires-Dist: pydantic-settings>=2.0
Requires-Dist: httpx>=0.27
Requires-Dist: python-multipart>=0.0.9
Requires-Dist: sqlalchemy>=2.0
Requires-Dist: alembic>=1.13
Requires-Dist: typer>=0.12
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Requires-Dist: mypy>=1.5; extra == "dev"
Requires-Dist: uvicorn>=0.27; extra == "dev"
Requires-Dist: httpx>=0.27; extra == "dev"
Provides-Extra: server
Requires-Dist: uvicorn[standard]>=0.27; extra == "server"
Dynamic: license-file

# lattice-meetbot-admin

Mountable FastAPI admin router for [lattice-meetbot](https://github.com/CodeWarrior4Life/lattice-meetbot) captures.

## Installation

```bash
pip install lattice-meetbot-admin
```

With dev server support:

```bash
pip install 'lattice-meetbot-admin[server]'
```

## Quick Start

### Mount into a FastAPI host

```python
from fastapi import FastAPI
from lattice_meetbot_admin import create_router, MeetbotAdminConfig

config = MeetbotAdminConfig(
    db_url="sqlite:///./meetbot_admin.db",
    # auth_dependency=require_admin_auth,  # optional: your FastAPI auth callable
)

app = FastAPI()
app.include_router(create_router(config), prefix="/api/meetbot-admin")
```

Then hit `http://localhost:8000/api/meetbot-admin/health` to confirm it's live.

### Migrations

```bash
lattice-meetbot-admin migrate --db-url sqlite:///./meetbot_admin.db
```

### Dev server (standalone)

```bash
lattice-meetbot-admin dev-server --db-url sqlite:///./meetbot_admin.db
# API at http://127.0.0.1:5557/api/meetbot-admin/docs
```

## Architecture

`lattice-meetbot-admin` is a **constructor-DI** package -- no global state. Pass your config once at mount time:

- `MeetbotAdminConfig` -- Pydantic v2 settings model (env-var overrides via `MEETBOT_ADMIN_*` prefix)
- `MeetbotAdminRepo` -- `typing.Protocol`; implement against your storage backend or use the bundled `SqliteMeetbotAdminRepo`
- `create_router(config, repo=...)` -- returns an `APIRouter`; mount under any prefix
- `create_admin_app(config, repo=...)` -- returns a `FastAPI` sub-application for `app.mount()`

## REST API (v0.1)

| Method | Path | Description |
|--------|------|-------------|
| GET | `/health` | Health check |
| GET | `/meetings` | List meetings (paginated, filterable) |
| GET | `/meetings/{id}` | Meeting detail (segments + speakers) |
| GET | `/meetings/{id}/segments` | Transcript segments |
| GET | `/meetings/{id}/speakers` | Per-speaker stats |
| GET | `/personas` | List personas |
| GET | `/personas/autocomplete?q=` | Ranked autocomplete |
| GET | `/personas/{name}` | Persona detail |
| PATCH | `/personas/{name}` | Update persona fields |
| GET | `/voicenotes` | List voicenote profiles |
| GET | `/voicenotes/{persona_name}` | Voicenote profile |
| PUT | `/voicenotes/{persona_name}` | Upsert voicenote (idempotent) |

## Deferred (M.1b+)

`/chat`, `/search`, `/clips`, `/webhooks` -- not included in v0.1.

## License

Apache-2.0. Author: CodeWarrior4Life.
