Skip to content

Latest commit

 

History

History
92 lines (70 loc) · 2.52 KB

README.md

File metadata and controls

92 lines (70 loc) · 2.52 KB

Street Scout Backend

Setup

Copy environment variables to the .env file

cp .env.example .env

Start the services

docker compose up -d
  • POST /auth/register - Register user
  • POST /auth/login - Login with credentials
  • GET /api/vendors - List all vendors
  • GET /api/vendors/:id - Get vendor details
  • POST /api/vendors - Create new vendor
  • PUT /api/vendors/:id - Update vendor details
  • DELETE /api/vendors/:id - Deactivate vendor
  • POST /api/vendors/:id/menu - Add item to menu
  • DELETE /api/vendors/:id/menu - Remove item from menu
  • GET /api/customers/profile - Get customer profile
  • PUT /api/customers/profile - Update customer profile
  • POST /api/customers/favorites - Add vendor to favorites
  • DELETE /api/customers/favorites/:vendorId - Remove vendor from favorites
  • GET /api/vendors/:id/reviews - List reviews for a vendor
  • POST /api/vendors/:id/reviews - Add a review
  • PUT /api/vendors/:id/reviews/:reviewId - Update a review
  • DELETE /api/vendors/:id/reviews/:reviewId - Delete a review
  • GET /api/search?q=query&lat=latitude&lng=longitude - Search vendors by query and location

(back to top)


Database Schema

  • id: number;
  • name: string;
  • description: string;
  • location:
    • latitude: number;
    • longitude: number;
  • operatingHours:
    • open: string;
    • close: string;
  • photos: string[];
  • menu: MenuItem[];
  • reviews: Review[];
  • id: number
  • name: string
  • email: string
  • favoriteVendors: string[]
  • id: number
  • reviewer: Customer
  • vendor: Vendor
  • rating: number
  • text: string
  • createdAt: Timestamp
  • isEnabled: boolean
  • id: number;
  • name: string;
  • description: string;
  • price: number;

(back to top)