This commit is contained in:
2026-05-10 19:12:02 +02:00
commit 3398982ca8
19 changed files with 2152 additions and 0 deletions

54
README.md Normal file
View File

@@ -0,0 +1,54 @@
# Dune API
Node.js API for Dune: Awakening Questlog data. It imports items, skills, recipes, placeables, and NPCs in English and German into MongoDB, then exposes them through REST endpoints and Swagger UI.
## Quick Start
```powershell
npm install
npm run import:smoke
npm start
```
Open Swagger UI at `http://localhost:3030/docs`.
## Docker
```powershell
docker compose up --build
```
The API listens on `http://localhost:8030` by default when run through Docker Compose. Set `API_HOST_PORT=3031` if your machine needs the alternate host port.
## Import All Data
```powershell
npm run import
```
You can also call the script directly with filters:
```powershell
node scripts/import.js --datasets=items,skills --languages=en,de --max-pages=1
```
or call `POST /api/import` from Swagger UI with an empty JSON body:
```json
{}
```
The importer pulls every page for all configured datasets and both supported languages by default.
## Endpoints
- `GET /health`
- `GET /docs`
- `GET /openapi.json`
- `GET /api/{dataset}`
- `GET /api/{dataset}/{id}`
- `GET /api/search?q=...`
- `POST /api/import`
- `GET /api/import/status`
Datasets: `items`, `skills`, `recipes`, `placeables`, `npcs`.