diff --git a/README.md b/README.md index 03861d8..043a97e 100644 --- a/README.md +++ b/README.md @@ -34,8 +34,9 @@ cp .env.example .env docker compose up -d --build ``` -Then open `http://localhost:8000/api/docs` for the interactive API docs and -point the Android app at your server URL. +Then open `http://localhost:8000/docs` for the interactive API docs and +point the Android app at your server URL. (ReDoc at `/redoc`, raw schema at +`/openapi.json`.) The default compose stack is: API + worker + PostgreSQL + Redis, with audio stored on the local filesystem. No paid cloud service is required. @@ -84,7 +85,7 @@ you always know if your audio or text leaves your machine. ## Documentation - [docs/self-hosting.md](docs/self-hosting.md) — deployment, HTTPS, backups -- [docs/api.md](docs/api.md) — API overview (OpenAPI at `/api/docs`) +- [docs/api.md](docs/api.md) — API overview (OpenAPI at `/openapi.json`) - [docs/security.md](docs/security.md) — security model and honest limits - [docs/architecture.md](docs/architecture.md) — system design - [docs/recording-consent.md](docs/recording-consent.md) — legal notice diff --git a/backend/shonar/main.py b/backend/shonar/main.py index 6e937bf..cbf7575 100644 --- a/backend/shonar/main.py +++ b/backend/shonar/main.py @@ -34,15 +34,17 @@ async def lifespan(app: FastAPI): app = FastAPI( - title="S.H.O.N.A.R. API", + title="SHONAR API", description=( - "Self-hosted Oral Notes and Audio Recorder — REST API. All data stays on your server." + "SHONAR — Self-hosted Oral Notes and Audio Recorder. REST API. " + "All data stays on your server." ), version=__version__, lifespan=lifespan, - docs_url="/api/docs", - redoc_url="/api/redoc", - openapi_url="/api/openapi.json", + # Interactive docs at the conventional paths. + docs_url="/docs", + redoc_url="/redoc", + openapi_url="/openapi.json", ) app.state.limiter = limiter @@ -61,4 +63,4 @@ app.include_router(api_router) @app.get("/") async def root(): - return {"app": "S.H.O.N.A.R.", "docs": "/api/docs", "health": "/api/v1/healthz"} + return {"app": "SHONAR", "docs": "/docs", "health": "/api/v1/healthz"} diff --git a/shared/openapi.json b/shared/openapi.json index 63cec6f..f5712ea 100644 --- a/shared/openapi.json +++ b/shared/openapi.json @@ -327,8 +327,8 @@ } }, "info": { - "description": "Self-hosted Oral Notes and Audio Recorder \u2014 REST API. All data stays on your server.", - "title": "S.H.O.N.A.R. API", + "description": "SHONAR \u2014 Self-hosted Oral Notes and Audio Recorder. REST API. All data stays on your server.", + "title": "SHONAR API", "version": "0.1.0" }, "openapi": "3.1.0",