mirror of
https://github.com/CJackHwang/ds2api.git
synced 2026-05-05 00:45:29 +08:00
1.4 KiB
1.4 KiB
Contributing Guide
Thanks for contributing to DS2API.
Development Setup
Backend (Go)
# 1. Clone
git clone https://github.com/CJackHwang/ds2api.git
cd ds2api
# 2. Configure
cp config.example.json config.json
# Edit config.json
# 3. Run backend
go run ./cmd/ds2api
Frontend (WebUI)
cd webui
npm install
npm run dev
WebUI locales are in webui/src/locales/.
Code Standards
- Go: run
gofmtand make surego test ./...passes before committing - JavaScript/React: follow existing project style (functional components)
- Commit messages: use semantic prefixes (
feat:,fix:,docs:)
Submitting a PR
- Fork the repo
- Create a branch (e.g.
feature/xxx) - Commit changes
- Push your branch
- Open a Pull Request
Build WebUI
./scripts/build-webui.sh
Project Structure
ds2api/
├── cmd/ds2api/ # Local/container entrypoint
├── api/index.go # Vercel serverless entrypoint
├── internal/ # Go backend implementation
├── webui/ # React WebUI source
├── static/admin/ # WebUI build output
├── Dockerfile
├── docker-compose.yml
└── vercel.json
Reporting Issues
Please use GitHub Issues with reproducible steps and logs.