mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-02-27 20:53:01 +00:00
1.5 KiB
1.5 KiB
07. Dev and Testing Workflow
Local dev philosophy
Keep all local mutable state inside repo tmp/:
tmp/dbtmp/logstmp/bintmp/cookies
Fast dev run (without air)
mkdir -p tmp/db tmp/logs
XUI_DB_FOLDER="$PWD/tmp/db" XUI_LOG_FOLDER="$PWD/tmp/logs" XUI_DEBUG=true \
go run . setting -port 2099 -username admin -password admin
XUI_DB_FOLDER="$PWD/tmp/db" XUI_LOG_FOLDER="$PWD/tmp/logs" XUI_DEBUG=true \
go run . run
Panel:
- URL:
http://127.0.0.1:2099 - Login:
admin/admin(fresh DB)
Air live-reload
Config file:
.air.toml
Run:
air -c .air.toml
Behavior:
- Builds to
tmp/bin/3x-ui-dev - Runs with tmp db/log env vars
- Bootstraps fresh DB credentials/port when DB absent
Justfile commands
just init-devjust runjust airjust buildjust checkjust api-loginjust api-clients-inboundsjust api-clients-listjust clean-tmp
Validation checklist for custom clients feature
- Login and open
/panel/clients. - Create master client with one inbound assignment.
- Confirm row appears in clients table.
- Confirm assignment visible in list API.
- Update policy fields and assignment set.
- Confirm synced result in list API.
- Delete master client and confirm list is empty.
Notes from local test run
- Build and startup validated on local SQLite paths.
- API + UI flows for custom clients feature validated.
- Xray API nil-client panic path was fixed and replaced with explicit errors.