概要
📫 基于 Go + Vue 开发的轻量匿名提问箱,极简界面,开箱即用 / Lightweight anonymous question box built with Go & Vue, minimal UI, ready to use out of the box.
Web・アプリ開発計測したスター増加
- 24時間
- +1
- 7日間
- +2
- 15日間
- +4
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナルNekoBox
匿名提问箱 / Anonymous Question Box
Architecture
Deployment
Deploy with an Agent
Copy this prompt into an Agent with terminal access to your deployment host.
Read the deployment guide at https://github.com/wuhan005/NekoBox/blob/master/README.md
and deploy NekoBox on the target server. Build and start the Go API, then build and serve the Vue frontend separately.
Ask me for any missing deployment settings.
Verify that the frontend loads and GET /api/config returns HTTP 200 with JSON,
then report the site URL.
Build from Source
| Component | Build directory | Toolchain | Output |
|---|---|---|---|
| Go API | Repository root | Go 1.27+ | NekoBox |
| Vue frontend | web/ |
Node.js 22.12+ and pnpm 9 | web/dist/ |
Backend
git clone https://github.com/wuhan005/NekoBox.git
cd NekoBox
go build -o NekoBox ./cmd
cp conf/app.sample.ini conf/app.ini
For Linux AMD64, prefix the build command with GOOS=linux GOARCH=amd64.
Edit conf/app.ini before starting the API. See the configuration template for other settings.
[app] external_urlis the public frontend URL.[app] icpoptionally sets the ICP registration number displayed in the footer.[captcha] typeselectsrecaptchaorgo_captcha. For reCAPTCHA, set[recaptcha] site_keyand its matchingserver_key. Setdomainto the script origin if you need to override the defaulthttps://recaptcha.net.- Set
[server] portto8080for the Docker example below. - Set
type(postgresormysql),host,port,user,password, andnameunder[database]. Setaddrunder[redis].
./NekoBox web
Frontend
Create web/.env.production.local to point the frontend at your API.
VITE_BASE_URL=/api
The frontend reads the site URL, ICP number, and public captcha settings at runtime from GET /api/config.
This replaces GET /api/captcha/config. When upgrading, move any values set only in VITE_EXTERNAL_URL,
VITE_ICP, or VITE_RECAPTCHA_SITE_KEY into the backend settings above before deploying the new frontend.
cd web
pnpm install --frozen-lockfile
pnpm build
Frontend Hosting
Serve web/dist/ with an index.html fallback for frontend routes.
- Same origin. Use
VITE_BASE_URL=/apiand proxy/api/and/service/to the backend with their paths intact. - Separate origins. Set
VITE_BASE_URLto the full API URL (e.g.https://api.example.com/api) and add the frontend host (e.g.box.example.com) to[app] cors_allow_domains.
Docker Deployment
Images are published for each Git tag.
- API —
ghcr.io/wuhan005/nekobox:<tag> - Frontend —
ghcr.io/wuhan005/nekobox-web:<tag>(built withweb/.env.production)
Self-Hosting
Build the backend image from the root of a fresh checkout.
docker build -t nekobox-api .
Prepare conf/app.ini and web/.env.production.local as above. Use database and Redis addresses reachable from the
backend container. Then run from the repository root.
docker build -t nekobox-web ./web
docker run -d --name nekobox-api -p 127.0.0.1:8080:8080 \
-v "$PWD/conf/app.ini:/home/app/conf/app.ini:ro" nekobox-api
docker run -d --name nekobox-web -p 127.0.0.1:8081:80 nekobox-web
For same-origin hosting, route /api/ and /service/ to 127.0.0.1:8080 and frontend traffic to 127.0.0.1:8081.
License
関連プロジェクトを探す
読み込み中…
