API Reference - hokumcangus/taste-of-aloha GitHub Wiki

🔌 Backend API Reference

Last updated: March 24, 2026

🌐 API Base

  • Backend URL: http://localhost:3000
  • Primary Path: /api/menu

🛤️ Routes & Endpoints

Method Endpoint Description
GET /health Service health check
GET /api/menu List all menu items (Supports ?category= filter)
GET /api/menu/:id Get single item details
POST /api/menu Create new menu item
PUT /api/menu/:id Update existing item
DELETE /api/menu/:id Remove an item

🛠️ Implementation Details

  • Entry Point: apps/backend/index.js
  • Schema: apps/backend/prisma/schema.prisma
  • Logic: Follows Controller/Model pattern in apps/backend/src/.

💻 PowerShell Verification

Use these commands to verify the API is running correctly after startup:

# Check Health (Expected: 200)
(Invoke-WebRequest -Uri "http://localhost:3000/health" -UseBasicParsing).StatusCode

# Check Menu Data & Count
$response = Invoke-WebRequest -Uri "http://localhost:3000/api/menu" -UseBasicParsing
$items = $response.Content | ConvertFrom-Json
"Status: $($response.StatusCode) | Total Items: $($items.Count)"