chore(*): adopt project templates

This commit is contained in:
hh
2026-09-09 01:17:12 +02:00
parent 5ec0212af5
commit ccbc167005
33 changed files with 409 additions and 220 deletions
+8 -9
View File
@@ -19,7 +19,7 @@ Nothing is ever deleted from the archive.
- `backend/` - `userbot` (kurigram, the capture loop and jobs) and `api` (FastAPI: the web API, the MCP server, and the built frontend as static files).
- `frontend/` - SvelteKit, `adapter-static`; a chat client over the archive: folders, chat list, thread with media, versions and the deleted messages inline, search, stories, presence graphs.
- `docker-compose.yml` - Postgres with TimescaleDB, `userbot`, `api`; profiles `db,userbot,api`.
- `docker-compose.yml` - includes `backend/` (Postgres with TimescaleDB, `userbot`, `api`) and `frontend/` (the dev server); profiles `external` and `services`.
## MCP
@@ -28,18 +28,17 @@ Read-only: `search_messages_tool`, `list_chats`, `get_chat_history` (with delete
## Run
```sh
cp .env.example .env # DB__*, STORAGE__ROOT, profiles
cp backend/.env.example backend/.env # TG__*, API__*, AUTH__TOKEN
make session-create # log the account in once; the session file stays in backend/sessions
make migrate upgrade head
make deploy # build the frontend, build and start the containers
make env # .env and docker-compose.override.yml from the examples
make -C backend session # log the account in once; the session file stays in backend/sessions
make deploy # build what changed, migrate, start the containers
```
The web client and the MCP endpoint are served by `api`; the bearer for both is `AUTH__TOKEN`.
`COMPOSE_PROFILES` in `.env` selects what runs on the machine, `docker-compose.override.yml` in each part holds the published ports and the `caddy` network aliases. The web client and the MCP endpoint are served by `api`; the bearer for both is `AUTH__TOKEN`.
## Develop
```sh
cd backend && uv sync && uv run ruff check && uvx ty check src
cd frontend && bun install && bun run dev && bun run check
make fmt
make check
make -C frontend dev
```