Skip to main content

Documentation Index

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

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

The favorites resource lets authenticated users save and manage their preferred bakeries. All endpoints operate on the currently logged-in user’s favorites list and require Firebase authentication.
Every favorites endpoint requires an Authorization: Bearer <token> header. Calls made without a valid Firebase token will be rejected.

GET /favorites — fetchFavorites()

Returns all bakeries the authenticated user has marked as a favorite.

Response fields

Returns an array of bakery objects with the same shape as fetchBakeries() (id, name, address, isOpen, openTime, closeTime, rating).

Example

import { fetchFavorites } from './services/api';

const favorites = await fetchFavorites();

POST /favorites/:bakeryId — toggleFavorite(bakeryId)

Toggles the favorite status of a bakery. If the bakery is not yet favorited it is added; if it is already favorited it is removed.

Request parameters

bakeryId
string
required
ID of the bakery to toggle.
Use fetchFavoriteStatus() first if you need to know the current state before toggling.

Example

import { toggleFavorite } from './services/api';

await toggleFavorite('bakery-id-123');

GET /favorites/:bakeryId/status — fetchFavoriteStatus(bakeryId)

Returns whether a specific bakery is currently in the authenticated user’s favorites.

Request parameters

bakeryId
string
required
ID of the bakery to check.

Response fields

isFavorite
boolean
true if the bakery is in the user’s favorites, false otherwise.

Example

import { fetchFavoriteStatus } from './services/api';

const { isFavorite } = await fetchFavoriteStatus('bakery-id-123');

DELETE /favorites/:bakeryId — removeFavorite(bakeryId)

Removes a bakery from the authenticated user’s favorites. Does nothing if the bakery was not already favorited.

Request parameters

bakeryId
string
required
ID of the bakery to remove from favorites.

Example

import { removeFavorite } from './services/api';

await removeFavorite('bakery-id-123');

Build docs developers (and LLMs) love