Code
How mhsanaei/3x-ui is laid out, and where to start for common changes.
There is no import map for this report yet.
Where to start reading
- Repository root
- Repository root
- Suggested starting pointAI
- Suggested starting pointAI
- Suggested starting pointAI
- Suggested starting pointAI
- Suggested starting pointAI
- Suggested starting pointAI
Find files for a task
AIAdd a new protocol handler
- Create protocol manager in internal/{protocol}/manager.go with lifecycle hooks (Start, Stop, Reload)
- Register protocol in config schema at internal/config/config.go under appropriate protocol section
- Emit StateChanged events via internal/eventbus/bus.go when protocol state mutates
- Add REST endpoints in internal/web/controller/api.go to expose protocol-specific operations
Add a new database table or client field
- Define schema changes in internal/database/db.go as migration functions with version tracking
- Add field to relevant struct in internal/config/config.go or create new model file
- Expose via REST in internal/web/controller/api.go or internal/web/controller/client.go
Add a new REST API endpoint
- Add handler function to internal/web/controller/api.go following existing Gin patterns (c *gin.Context receiver)
- Emit relevant event via internal/eventbus/bus.go if mutation affects protocol state
- Add auth middleware check in internal/web/controller/base.go if endpoint requires authentication
Add or update tests
Change build or automation
RepoPilot lists up to 500 files, so a file missing here may still exist.
- No public API or start-up file could be picked out from the file names.
- The file list is newer than the written guide, so descriptions and suggested changes may describe older code.