Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/AndrewwCO/Panahashi-Backend/llms.txt

Use this file to discover all available pages before exploring further.

The Panahashi Backend exposes a REST API versioned under /api/v1. Every response is wrapped in a consistent ApiResponse envelope, and protected endpoints require a Firebase ID token passed as a Bearer token. This page covers the base URL, authentication, response formats, and a full index of available resources.

Base URL

http://localhost:8080
All API routes are prefixed with /api/v1.

Authentication

Protected routes require a Firebase ID token in the Authorization header:
Authorization: Bearer <firebase-id-token>
See Authentication for how to obtain and refresh tokens.

Response format

All endpoints return JSON wrapped in ApiResponse<T>:
{
  "success": true,
  "data": { ... },
  "message": null
}
Errors return an ApiError:
{
  "code": "NOT_FOUND",
  "message": "Resource not found"
}

Pagination

Paginated endpoints accept page (1-indexed) and pageSize query parameters and return:
{
  "data": [...],
  "page": 1,
  "pageSize": 20,
  "total": 100,
  "hasMore": true
}

Endpoint index

ResourceMethodPath
HealthGET/health
BakeriesGET/api/v1/bakeries
BakeriesGET/api/v1/bakeries/nearby
BakeriesGET/api/v1/bakeries/
BakeriesPOST/api/v1/bakeries
BakeriesPATCH/api/v1/bakeries/
BakeriesDELETE/api/v1/bakeries/
BakeriesGET/api/v1/bakeries/me
BakeriesPATCH/api/v1/bakeries/me
BakeriesPATCH/api/v1/bakeries/me/open
ProductsGET/api/v1/products
ProductsGET/api/v1/products/
ProductsPOST/api/v1/products
ProductsPATCH/api/v1/products/
ProductsPATCH/api/v1/products//stock
ProductsDELETE/api/v1/products/
OrdersPOST/api/v1/orders
OrdersGET/api/v1/orders/me
OrdersGET/api/v1/orders/
OrdersPATCH/api/v1/orders//status
OrdersPOST/api/v1/orders/verify-qr
PaymentsPOST/api/v1/payments
PaymentsGET/api/v1/payments/order/
CartGET/api/v1/cart
CartPOST/api/v1/cart/items
CartPATCH/api/v1/cart/items
CartDELETE/api/v1/cart
UsersGET/api/v1/users/me
UsersPATCH/api/v1/users/me
ReviewsGET/api/v1/reviews
ReviewsPOST/api/v1/reviews
FavoritesGET/api/v1/favorites
FavoritesPOST/api/v1/favorites/
PromotionsGET/api/v1/promotions
PromotionsPOST/api/v1/promotions
LoyaltyGET/api/v1/loyalty
LoyaltyPOST/api/v1/loyalty/redeem
UploadPOST/api/v1/upload/product/
StatsGET/api/v1/stats/bakery
StatsGET/api/v1/stats/admin
SearchGET/api/v1/search

Bakeries & Products

Manage bakery listings, product catalogs, and stock.

Orders & Payments

Place orders, process payments, and track order status.

Users & Engagement

User profiles, reviews, favorites, promotions, and loyalty.

Admin & Monitoring

Statistics dashboards and health monitoring.

Build docs developers (and LLMs) love