feat: bootstrap MediaStationGo (Go + React rewrite of MediaStation)

Adopt the cropflre/nowen-video tech stack and rebuild the project from
scratch:

  - Backend: Go 1.25 + Gin + GORM + SQLite (WAL) + JWT + WebSocket hub.
    Layered packages config / database / model / repository / service /
    middleware / handler. Default admin (admin/admin123) seeded on first
    run; /api routes for auth, libraries, media, stream and admin
    panels. WebSocket scan-progress events at /api/ws.
  - Frontend: React 18 + Vite 5 + Tailwind 3.4 + Zustand + axios +
    react-router 6 + lucide-react + framer-motion + hls.js. Pages for
    Login / Home / Library / Search / MediaDetail / Player / Admin
    (Library, Users, Settings tabs).
  - Distribution: multi-arch Dockerfile (frontend -> backend -> Alpine
    runtime), docker-compose.yml, GitHub Actions for CI and GHCR
    publish, Makefile, env-prefixed config (MEDIASTATION_*).
  - Docs: README, CONTRIBUTING, .env.example, config.example.yaml.

Backend builds, vets and tests pass. Frontend builds via tsc -b && vite
build (250 kB JS / 16 kB CSS, gzipped 84 / 4 kB).
This commit is contained in:
Kiro
2026-05-14 15:26:29 +00:00
commit d5cf5fb4b2
60 changed files with 7592 additions and 0 deletions
+74
View File
@@ -0,0 +1,74 @@
// Domain types mirrored from the Go backend (internal/model).
export interface User {
id: string
username: string
role: 'admin' | 'user'
email?: string
avatar_url?: string
force_password_reset: boolean
last_login_at?: string
created_at: string
updated_at: string
}
export interface Library {
id: string
name: string
path: string
type: string
enabled: boolean
created_at: string
updated_at: string
}
export interface Media {
id: string
library_id: string
series_id?: string
title: string
original_name?: string
path: string
size_bytes: number
duration_sec: number
width: number
height: number
video_codec?: string
audio_codec?: string
container?: string
poster_url?: string
backdrop_url?: string
overview?: string
rating: number
year: number
season_num: number
episode_num: number
scrape_status: string
tmdb_id: number
bangumi_id: number
nsfw: boolean
created_at: string
updated_at: string
}
export interface ScanResult {
library_id: string
visited: number
added: number
}
export interface Setting {
key: string
value: string
updated_at: string
}
export interface AccessLog {
id: string
user_id: string
action: string
target: string
ip: string
detail: string
created_at: string
}