API application made for Filmpolitiet's reviews.
- Go 74.4%
- templ 22.4%
- Makefile 2.1%
- Dockerfile 1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Replace the Deno/Fresh stack with Go using huma.rocks, GORM, templ, HTMX, and Tailwind CSS. Adds migration tool for old SQLite data, Serum API scraper for NRK's new CMS, Atom feed, and web UI with filterable review cards. |
||
| cmd | ||
| internal | ||
| web | ||
| .air.toml | ||
| .build.yaml | ||
| .containerignore | ||
| .env.example | ||
| .gitignore | ||
| compose.yaml | ||
| Dockerfile | ||
| go.mod | ||
| go.sum | ||
| go.tool.mod | ||
| go.tool.sum | ||
| LICENSE.md | ||
| Makefile | ||
| README.md | ||
Filmpolitiet API
API and web UI for Filmpolitiet reviews.
Live version: filmpolitiet.wyd.no
Built with Go, huma, GORM, templ, HTMX, and Tailwind CSS.
Getting started
Prerequisites
- Go 1.24+
- SQLite
- Make
Development
cp .env.example .env # Edit as needed
make dev # Starts air with live reload on :3000
Building
make build # Outputs ./tmp/server
Data migration
To migrate data from the old SQLite database:
make migrate OLD_DB=path/to/old/data.db
Initial scrape
To scrape reviews from NRK's Serum API:
make scrape
Docker
docker build -t filmpolitiet-api .
docker run -v data:/data -p 8000:8000 filmpolitiet-api
The migration and scrape tools are also available in the container as
/bin/migrate and /bin/scrape.
License
See LICENSE.md.