- Issue #14: Plan CRUD API Endpoints
- Issue #15: Structured Output Prompting for Plan Generation
- Issue #16: Plan Calendar View
- Issue #17: Session Detail Cards
- Issue #18: Plan Modification via Chat
- Added plan CRUD routes:
POST/GET /api/plans,GET/PUT/DELETE /api/plans/:id - Added plan generation endpoint:
POST /api/generate-plan - Implemented structured output prompting with detailed JSON schema for Claude
- Extended chat endpoint to support plan modification via
active_planfield - Added
extractModifiedPlanhelper for parsing plan modifications from chat - Updated CORS middleware to allow PUT/DELETE methods
- Added tabbed interface: Chat, Generate Plan, My Plans
- Implemented plan generation form with goal, race date, duration selection
- Created plan list view with summary cards
- Built calendar view with 7-day grid and week navigation
- Added color-coded session cards by type (easy_run, long_run, speed_work, etc.)
- Implemented modal for full session details
- Added plan selector in chat tab for modification mode
- Added pending modification UI with apply/discard actions
main.go- Backend API endpoints and handlers for plan managementpublic/index.html- Frontend UI components for calendar, cards, and chat integration
type Plan struct {
ID string `json:"id"`
UserID string `json:"user_id"`
Name string `json:"name"`
Goal string `json:"goal"`
StartDate string `json:"start_date"`
EndDate string `json:"end_date"`
Weeks []Week `json:"weeks"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
type Week struct {
WeekNumber int `json:"week_number"`
Focus string `json:"focus"`
Sessions []Session `json:"sessions"`
}
type Session struct {
Day string `json:"day"`
Type string `json:"type"`
Duration string `json:"duration"`
Distance string `json:"distance,omitempty"`
Description string `json:"description"`
Goals string `json:"goals"`
}- Network issues prevented full
go buildverification during session - Used
gofmtto verify Go syntax correctness - Frontend changes verified through code review
- Used
===MODIFIED_PLAN_JSON===markers for plan extraction from chat responses - Used claude-sonnet-4-20250514 model for plan modification (larger context)
- Stored plans in memory map with session-based user authentication
- Session types: easy_run, long_run, speed_work, tempo_run, rest, cross_training, race