Migrate HTTP Layer to Gin + Middleware Modernization #2

Open
opened 2025-10-23 21:38:22 +00:00 by H3ALY · 0 comments
Owner

Bootstrap Gin router

  1. Create cmd/api/main.go wiring Gin (empty routes).
  2. Add global recovery, logging, and CORS middleware.

Integrate SCS session manager

  1. Add platform/session package.
  2. Middleware to load/store session context.

Integrate nosurf CSRF

  1. Add platform/csrf package using justinas/nosurf.
  2. Wrap Gin engine with CSRF handler.

Replace Gorilla stack

  1. Remove Gorilla Mux, Sessions, CSRF.
  2. Migrate routes to Gin syntax.

Acceptance Criteria

  1. App boots using Gin only.
  2. Session cookies created by SCS.
  3. CSRF token validated on POST.
  4. No Gorilla dependencies remain.
**Bootstrap Gin router** 1. Create cmd/api/main.go wiring Gin (empty routes). 2. Add global recovery, logging, and CORS middleware. **Integrate SCS session manager** 1. Add platform/session package. 2. Middleware to load/store session context. **Integrate nosurf CSRF** 1. Add platform/csrf package using justinas/nosurf. 2. Wrap Gin engine with CSRF handler. **Replace Gorilla stack** 1. Remove Gorilla Mux, Sessions, CSRF. 2. Migrate routes to Gin syntax. **Acceptance Criteria** 1. App boots using Gin only. 2. Session cookies created by SCS. 3. CSRF token validated on POST. 4. No Gorilla dependencies remain.
H3ALY added the backend label 2025-10-23 21:38:22 +00:00
H3ALY added this to the 🛠 In Progress project 2025-10-23 21:38:22 +00:00
Sign in to join this conversation.