API application made for Filmpolitiet's reviews.
  • Go 74.4%
  • templ 22.4%
  • Makefile 2.1%
  • Dockerfile 1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Tim Hårek Andreassen 43dd65e473 feat: Rewrite application in Go
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.
2026-04-06 17:04:49 +02:00
cmd feat: Rewrite application in Go 2026-04-06 17:04:49 +02:00
internal feat: Rewrite application in Go 2026-04-06 17:04:49 +02:00
web feat: Rewrite application in Go 2026-04-06 17:04:49 +02:00
.air.toml feat: Rewrite application in Go 2026-04-06 17:04:49 +02:00
.build.yaml feat: Rewrite application in Go 2026-04-06 17:04:49 +02:00
.containerignore Add Containerfile 2025-01-26 18:53:28 +01:00
.env.example feat: Rewrite application in Go 2026-04-06 17:04:49 +02:00
.gitignore feat: Rewrite application in Go 2026-04-06 17:04:49 +02:00
compose.yaml feat: Rewrite application in Go 2026-04-06 17:04:49 +02:00
Dockerfile feat: Rewrite application in Go 2026-04-06 17:04:49 +02:00
go.mod feat: Rewrite application in Go 2026-04-06 17:04:49 +02:00
go.sum feat: Rewrite application in Go 2026-04-06 17:04:49 +02:00
go.tool.mod feat: Rewrite application in Go 2026-04-06 17:04:49 +02:00
go.tool.sum feat: Rewrite application in Go 2026-04-06 17:04:49 +02:00
LICENSE.md chore: Add license 2023-06-16 09:08:26 +02:00
Makefile feat: Rewrite application in Go 2026-04-06 17:04:49 +02:00
README.md feat: Rewrite application in Go 2026-04-06 17:04:49 +02:00

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.