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.

This page explains how to connect Panahashi to your own backend and Firebase project, install optional dependencies, and understand which screens call which endpoints.

Backend URL configuration

All API calls in Panahashi flow through a single constant defined at the top of services/api.js:
export const BASE_URL = 'http://10.0.2.2:8080/api/v1';
Change this value to match your target environment:
EnvironmentValue
Android emulatorhttp://10.0.2.2:8080/api/v1
iOS simulator / webhttp://127.0.0.1:8080/api/v1
Productionhttps://your-domain.com/api/v1
Replace BASE_URL with your real domain before publishing. Shipping an app that points to 10.0.2.2 or 127.0.0.1 will cause all API calls to fail for users on physical devices.

Firebase setup

Panahashi uses the Firebase JavaScript SDK for authentication. The configuration lives in context/AuthContext.js:
const firebaseConfig = {
  apiKey:            "AIzaSyAgvCRHhhxFRI6T5xmczblP8AGpA1bzKG8",
  authDomain:        "panahashi-backend.firebaseapp.com",
  projectId:         "panahashi-backend",
  storageBucket:     "panahashi-backend.firebasestorage.app",
  messagingSenderId: "981410583680",
  appId:             "1:981410583680:web:a6b4be94c6a473d0800265",
};
Replace every value with the credentials from your own Firebase project. You can find them in the Firebase console under Project settings → Your apps → SDK setup and configuration. For native (non-Expo) builds you also need to add google-services.json (Android) and GoogleService-Info.plist (iOS) to your project root and reference them in app.json.

Optional dependencies

QR code display

OrderConfirmationScreen can render a scannable QR code for the customer to present at the bakery. This requires two packages:
npm install react-native-qrcode-svg react-native-svg
Once installed, replace the plain <Text> element in OrderConfirmationScreen.js with the QRCode component:
import QRCode from 'react-native-qrcode-svg';

<QRCode value={qrCode} size={150} />
The qrCode value is returned by the backend when an order is created.

Screens and their endpoints

The table below shows which backend endpoint each screen calls:
ScreenMethodEndpoint
HomeScreenGET/api/v1/bakeries
BakeriesScreenGET/api/v1/bakeries
BakeryDetailScreenGET/api/v1/bakeries/:id
BakeryDetailScreenGET/api/v1/products?bakeryId=
BakeryDetailScreenGET/api/v1/reviews?bakeryId=
BakeryDetailScreenGET/api/v1/promotions?bakeryId=
BakeryDetailScreenGET/api/v1/favorites/:bakeryId/status
SearchScreenGET/api/v1/search
CartScreenGET/api/v1/cart
CartScreenPOST/api/v1/orders
OrdersScreenGET/api/v1/orders/me
OrderDetailScreenGET/api/v1/orders/:id
PaymentScreenPOST/api/v1/payments
LoyaltyScreenGET/api/v1/loyalty
FavoritesScreenGET/api/v1/favorites
ProfileScreenGET/api/v1/users/me
ProfileScreen (edit)PATCH/api/v1/users/me

Build docs developers (and LLMs) love