mirror of
https://github.com/truewhile/MeBox.git
synced 2026-09-28 03:06:38 +08:00
d5cf5fb4b2
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).
1.3 KiB
1.3 KiB
Contributing to MediaStationGo
Thanks for taking the time to contribute! This document is intentionally short — prefer asking in an issue/PR over re-reading rules.
Local development
# Backend (Go 1.25+ required)
make dev # MEDIASTATION_APP_DEBUG=true go run ./cmd/server
# Frontend (Node 20+ required)
make dev-web # vite dev server on :3000, proxies /api -> :8080
Default admin: admin / admin123 — change it after first login.
Code style
- Go: keep packages small, services thin, errors wrapped with
%w. Rungo vet ./...andgo test ./...before pushing. - TypeScript:
strict: trueis on. Preferinterfaceovertypefor object shapes. Components live next to their page when not reused. - Comments should explain why, not what. Avoid emoji in code.
Commit / PR conventions
- Conventional commits encouraged:
feat:,fix:,docs:,refactor:,chore:. - One concern per PR. Update the README/docs when behaviour changes.
- CI must pass:
go vet,go test, frontendtsc -b && vite build.
Issue triage
When filing a bug please include:
- The steps to reproduce.
- The expected and actual behaviour.
- Logs from
docker logs mediastation-go(or stdout if running locally). - Your deployment context (NAS model, OS, Docker version).
Thanks for keeping the project healthy!