53 lines
1.4 KiB
Markdown
53 lines
1.4 KiB
Markdown
# Film Intel
|
|
|
|
Reliable film age ratings, explained. Search any film and get a clear breakdown
|
|
of why it received its age rating, plus how that rating differs across
|
|
countries.
|
|
|
|
## Requirements
|
|
|
|
- Node.js 22
|
|
- A TMDB API key (https://www.themoviedb.org/settings/api)
|
|
- An LLM API key (OpenRouter or any OpenAI-compatible endpoint)
|
|
- PostgreSQL for caching generated rating cards (optional but recommended)
|
|
|
|
Copy `.env.example` to `.env` and fill in the keys.
|
|
|
|
## Development with Docker (recommended)
|
|
|
|
Starts the app (with live reload) and the database, and runs migrations
|
|
automatically on first start:
|
|
|
|
```bash
|
|
docker compose -f docker-compose.dev.yml up --build
|
|
```
|
|
|
|
- Open http://localhost:3000
|
|
- Source code is mounted for live reload (`npm run dev` inside the container)
|
|
- Stop with `docker compose -f docker-compose.dev.yml down`
|
|
|
|
## Development without Docker
|
|
|
|
```bash
|
|
npm install
|
|
npm run dev
|
|
```
|
|
|
|
> Without a database the rating cards will still generate (they just won't be
|
|
> cached), thanks to graceful cache handling. Run `npm run db:migrate` against a
|
|
> reachable Postgres to enable caching.
|
|
|
|
## Production
|
|
|
|
```bash
|
|
docker compose -f docker-compose.yml up --build
|
|
```
|
|
|
|
## Scripts
|
|
|
|
- `npm run dev` — start the Next.js dev server
|
|
- `npm run build` — production build
|
|
- `npm run start` — serve the production build
|
|
- `npm run lint` — run ESLint
|
|
- `npm run db:migrate` — apply database migrations
|