Initial commit: Dostalgia — DOS game hub

- Go backend (single binary) with embedded Svelte frontend
- JSON-per-game storage (no database)
- .jsdos bundle creation on upload
- Dark phosphor-green theme (#33FF33)
- js-dos v8 emulator integration
- Sockdrive support for games >80MB
- IGDB placeholder for future artwork scraping
- Docker deployment ready
This commit is contained in:
David Alvarez
2026-05-23 11:18:41 +02:00
parent c3c154ec65
commit 1efd10f81f
24 changed files with 3314 additions and 2 deletions
+60 -2
View File
@@ -1,3 +1,61 @@
# dostalgia
# Dostalgia
A nostalgic DOS game hub — upload, scrape artwork, and play your classic games in the browser
A nostalgic DOS game hub — upload, scrape artwork, and play classic DOS games directly in the browser via js-dos.
## Quick Start (Docker)
```bash
docker build -t dostalgia .
docker run -p 8765:8765 -v $(pwd)/data:/data dostalgia
```
## Development
Terminal 1 — Go API:
```bash
DOSTALGIA_DEV=1 go run .
```
Terminal 2 — Frontend dev server:
```bash
cd frontend && npm install && npm run dev
```
Open http://localhost:5173
## Architecture
- **Backend**: Single Go binary. No database — each game is a directory with a `game.json` file.
- **Frontend**: Svelte SPA, embedded in the Go binary at build time.
- **Emulation**: js-dos v8 loaded from CDN, runs DOSBox in WebAssembly.
- **Storage**: `/data/games/{id}/` — contains `game.json`, `.jsdos` bundle, and cover art.
## API
| Method | Path | Description |
|--------|------|-------------|
| GET | `/api/games` | List all games |
| GET | `/api/games/:id` | Get game details |
| PATCH | `/api/games/:id` | Update game metadata |
| DELETE | `/api/games/:id` | Delete a game |
| POST | `/api/upload` | Upload a game ZIP (multipart) |
| POST | `/api/games/:id/cover` | Upload cover art |
| GET | `/api/igdb/search?q=` | Search IGDB (placeholder) |
## Game JSON Schema
```json
{
"id": "doom",
"title": "Doom",
"year": 1993,
"genre": "FPS",
"developer": "id Software",
"publisher": "id Software",
"description": "The iconic first-person shooter...",
"bundle_type": "standard",
"bundle_file": "doom.jsdos",
"has_cover": true,
"ready": true
}
```