Read-only API powering product search, filtering, and category browsing for the storefront.
Runtime
Next.js 14
Database
Neon PostgreSQL
Cache
Upstash Redis
Hosting
Vercel
All routes are GET-only except cache invalidation.
/api/search30s HTTPFull-text product search with filters and pagination
/api/search?q=white+shaker&limit=12/api/search/filtersRedis 5minDynamic filter options with contextual counts
/api/search/filters?category_id=1796/api/search/suggest30s HTTPAutocomplete suggestions (products, categories, SKUs)
/api/search/suggest?q=shaker/api/preview60s HTTPProduct quick-view with related product data
/api/preview?id=62143/api/productsRedis 5minRaw paginated products by category
/api/products?category=1796&limit=12/api/filtersRedis 5minCategory products with dynamic filter options (composite)
/api/filters?category=1796&limit=12&Color=White/api/categories5min HTTPAll non-hidden categories with product counts
/api/categories/api/categories/[id]NoneLegacy category products API
/api/categories/27263/api/categories/[id]/settingsRedis 10minCategory display configuration
/api/categories/27263/settings/api/cacheN/AInvalidate all Redis cache keys
POST /api/cache