Label editing
This commit is contained in:
@@ -44,15 +44,17 @@ On Windows PowerShell, activate the environment with:
|
||||
|
||||
The SQLite database is created automatically at `backend/data/linklog.db` when the application starts or when the auth router is imported. The starter accounts are:
|
||||
|
||||
The database schema is versioned with SQLite `PRAGMA user_version`. Application startup applies all pending migrations in order, so updating the application does not require deleting an existing database. New schema changes should be added as a new numbered migration in `backend/app/database.py`; existing migration entries must remain unchanged.
|
||||
|
||||
|
||||
| Username | Password | Role |
|
||||
| --- | --- | --- |
|
||||
| `alice` | `secret123` | administrator |
|
||||
| `bob` | `secret123` | standard user |
|
||||
|
||||
|
||||
These credentials are for development only. Change the authentication and seeding design before deploying publicly.
|
||||
|
||||
The database schema is versioned with SQLite `PRAGMA user_version`. Application startup applies all pending migrations in order, so updating the application does not require deleting an existing database. New schema changes should be added as a new numbered migration in `backend/app/database.py`; existing migration entries must remain unchanged.
|
||||
## Run The Backend
|
||||
|
||||
Activate the virtual environment, then run uvicorn from the repository root:
|
||||
@@ -67,6 +69,7 @@ Open these URLs:
|
||||
- Public feed: <http://localhost:8000/>
|
||||
- User feed: <http://localhost:8000/alice>
|
||||
- Profile settings: <http://localhost:8000/profile>
|
||||
- Labels: <http://localhost:8000/labels>
|
||||
- Admin page: <http://localhost:8000/admin>
|
||||
- Web login: <http://localhost:8000/login>
|
||||
- Health check: <http://localhost:8000/health>
|
||||
@@ -147,9 +150,9 @@ docker compose up --build
|
||||
|
||||
The services are available at:
|
||||
|
||||
- LinkLog through Traefik: <http://localhost/>
|
||||
- LinkLog through Traefik: <http://example.com/>
|
||||
- Direct application port: <http://localhost:8000/>
|
||||
- Traefik dashboard: <http://localhost:8080/dashboard/>
|
||||
|
||||
|
||||
The Compose configuration routes the hostname `localhost` through Traefik. The SQLite database is stored in the named Docker volume `linklog_data`, mounted at `/app/backend/data`.
|
||||
The application runs as a non-root user and reports container health through `/health`; Traefik waits for the application health check before starting.
|
||||
@@ -209,6 +212,7 @@ Feed items also expose `is_owner`; it is `true` only for entries owned by the au
|
||||
Links support zero to ten tags. Tags are trimmed, deduplicated case-insensitively, and retain their original casing for display. The Firefox capture popup shows existing server tags as checkboxes and accepts new comma-separated tags. The home page displays tags and provides a case-insensitive tag filter; editing a link replaces its complete tag set.
|
||||
The inline link editor also allows multiple existing tags to be selected and new tags to be entered. New tag values receive a leading `#` automatically, and the interface prevents saving more than ten tags.
|
||||
The installation seeds these available tags: `#Internet`, `#Cybersecurity`, `#Fediverse`, `#Food`, `#Photography`, `#Music`, and `#AI`.
|
||||
Users can create, edit, and delete their own labels from `/labels`. Administrators can delete any label from `/admin`; system-seeded labels have no user owner.
|
||||
|
||||
Admin plugin requests must include the administrator's token:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user