refactor: split nats-chatroom into modules with profile, layout, and auth

Extract chat, profile, types, and user data into separate files.
Embed CSS via go:embed. Add a layout with nav, session-based profile
persistence, and a middleware guard that redirects to /profile when
no identity is set.
This commit is contained in:
Ryan Hamamura
2026-02-13 10:55:04 -10:00
parent 1384e49e14
commit 719b389be6
7 changed files with 499 additions and 227 deletions

1
.gitignore vendored
View File

@@ -48,6 +48,7 @@ internal/examples/plugins/plugins
internal/examples/realtimechart/realtimechart
internal/examples/shakespeare/shakespeare
internal/examples/nats-chatroom/nats-chatroom
/nats-chatroom
# NATS data directory
data/