원클릭으로
api-generation
// Generate TypeScript API client from Swagger/Go comments. Use when updating API endpoints, adding new routes, or regenerating the frontend API client after backend changes.
// Generate TypeScript API client from Swagger/Go comments. Use when updating API endpoints, adding new routes, or regenerating the frontend API client after backend changes.
Manage database migrations and Better Auth schema. Use when adding tables, modifying schema, running migrations, or resetting the database.
Generate full-stack features. Backend = hand-written bounded-context aggregates (DDD); frontend = FSD slices with HydrationBoundary. Use when creating new features, adding CRUD operations, or scaffolding new pages.
Access local technical documentation before searching the internet. Use FIRST when researching any tech stack question.
Create and manage authentication pages with server-side session handling. Use when adding login, register, or protected pages WITHOUT flicker/skeleton.
Server-Side + Client-Side Data Fetching with Orval + TanStack Query HydrationBoundary Pattern. ALWAYS use Orval - NEVER manual fetch()!
Feature-Sliced Design architecture for frontend. Use when creating new features, slices, or understanding the FSD layer structure.
| name | api-generation |
| description | Generate TypeScript API client from Swagger/Go comments. Use when updating API endpoints, adding new routes, or regenerating the frontend API client after backend changes. |
| allowed-tools | Read, Edit, Write, Bash, Glob, Grep |
Generate typed TypeScript API client from Go Swagger comments using swag + Orval.
Go Handler → swag init → swagger.json → Orval → TypeScript Hooks
just api
This executes:
swag init → Generates backend/docs/swagger.json from Go commentsorval → Generates TypeScript Hooks in frontend/src/shared/api/// internal/<ctx>/interfaces/http/handler.go
// (handlers live inside each bounded context — see CLAUDE.md)
// GetProducts godoc
// @Summary List all products
// @Description Get all products for the authenticated user
// @Tags products
// @Accept json
// @Produce json
// @Success 200 {array} ProductResponse
// @Failure 401 {object} ErrorResponse
// @Security BearerAuth
// @Router /products [get]
func (h *ProductHandler) GetProducts(w http.ResponseWriter, r *http.Request) {
// Implementation
}
// CreateProduct godoc
// @Summary Create a product
// @Description Create a new product
// @Tags products
// @Accept json
// @Produce json
// @Param request body CreateProductRequest true "Product data"
// @Success 201 {object} ProductResponse
// @Failure 400 {object} ErrorResponse
// @Failure 401 {object} ErrorResponse
// @Security BearerAuth
// @Router /products [post]
func (h *ProductHandler) CreateProduct(w http.ResponseWriter, r *http.Request) {
// Implementation
}
// In handler or separate types.go
type ProductResponse struct {
ID string `json:"id" example:"prod_123"`
Name string `json:"name" example:"Widget"`
Price float64 `json:"price" example:"29.99"`
}
type CreateProductRequest struct {
Name string `json:"name" example:"Widget"`
Price float64 `json:"price" example:"29.99"`
}
just api
import { useGetProducts, usePostProducts } from "@/api/endpoints/products/products"
function ProductsPage() {
const { data, isLoading } = useGetProducts()
const createProduct = usePostProducts()
const handleCreate = () => {
createProduct.mutate({ data: { name: "New", price: 10 } })
}
return (...)
}
| Annotation | Description |
|---|---|
@Summary | Short description |
@Description | Detailed description |
@Tags | Grouping (becomes folder in endpoints/) |
@Accept | Request Content-Type |
@Produce | Response Content-Type |
@Param | Parameter (body, query, path) |
@Success | Success response |
@Failure | Error response |
@Security | Auth requirement |
@Router | HTTP path and method |
frontend/src/shared/api/
├── endpoints/
│ ├── products/ # Grouped by @Tags
│ │ └── products.ts # useGetProducts, usePostProducts, etc.
│ └── users/
│ └── users.ts
├── models/ # TypeScript Types
└── custom-fetch.ts # Fetch Wrapper with Auth
just api after handler changes@Tags products → endpoints/products/