Phase 2.1: HTTP server foundation and game session management #13

Open
opened 2026-06-07 22:44:14 -06:00 by ppreeper · 0 comments
Owner

Description

Set up the HTTP server with session handling for the web game. Each player gets a game session identified by a session ID. The server manages the game state lifecycle.

Tasks

  • Create cmd/server/main.go entry point
  • Set up HTTP router with route groups
  • Implement session middleware (cookie or token-based)
  • Create GameSession struct holding GameState per session
  • Implement GET / POST for save/load
  • Add graceful shutdown and signal handling
  • Serve static assets (CSS, HTMX JS)

Depends On

  • Issue #5 (web dependencies)

Acceptance Criteria

  • Server starts and accepts connections
  • Multiple concurrent game sessions work independently
  • Game state persists across requests within a session
  • Save/load round-trips correctly
## Description Set up the HTTP server with session handling for the web game. Each player gets a game session identified by a session ID. The server manages the game state lifecycle. ## Tasks - [ ] Create `cmd/server/main.go` entry point - [ ] Set up HTTP router with route groups - [ ] Implement session middleware (cookie or token-based) - [ ] Create `GameSession` struct holding `GameState` per session - [ ] Implement GET / POST for save/load - [ ] Add graceful shutdown and signal handling - [ ] Serve static assets (CSS, HTMX JS) ## Depends On - Issue #5 (web dependencies) ## Acceptance Criteria - Server starts and accepts connections - Multiple concurrent game sessions work independently - Game state persists across requests within a session - Save/load round-trips correctly
ppreeper added this to the Phase 2 milestone 2026-06-07 22:50:42 -06:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ppreeper/bygfoot#13
No description provided.