Skip to content

Backend/app chat logic - #14

Merged
Michal-Brzezinski merged 44 commits into
mainfrom
backend/app-chat-logic
May 26, 2026
Merged

Backend/app chat logic#14
Michal-Brzezinski merged 44 commits into
mainfrom
backend/app-chat-logic

Conversation

@Michal-Brzezinski

Copy link
Copy Markdown
Collaborator

Backend and cli ui done

…ers and logging

- Move Hub entrypoint to cmd/hub/main.go
- Convert hub/ into a proper Go package (no more package main)
- Add start.go with clean server bootstrap and QUIC initialization
- Add bootstrap.go with env loading and graceful shutdown
- Add constants.go with all Hub-level tunables (payload, rate limits, QUIC config)
- Add logger.go with structured RFC3339 logging
- Add errors.go with centralized protocol error frame sender
- Refactor dispatcher.go:
  - use protocol error constants
  - add format error counter
  - remove magic numbers
  - add production-grade comments
- Refactor router.go:
  - fix incorrect ERR_15 → ERR_08
  - fix incorrect ERR_10 → ERR_05
  - add comments and logging
- Refactor all handlers (HELLO, AUTH, REGISTER, DATA, PING, STATUS, BYE):
  - use protocol error constants
  - add comments
  - remove magic strings
  - unify logging
  - normalize target usernames
- Improve context.go cleanup logic
- Ensure globalSessions and globalAuth are initialized in Start()
- Make Hub fully frontend-ready (stable API, stable error codes)
@Michal-Brzezinski
Michal-Brzezinski merged commit 680b96c into main May 26, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant