This guide walks you through cloning SansiStore, wiring up the Firebase emulators, seeding the local database with test data, and launching the dev server. The entire process takes under five minutes on a fresh machine.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ProcesosAgilesUMSS/sansistore/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before you begin, make sure you have the following installed:- Bun — the JavaScript runtime and package manager used throughout the project (
bun,bunx) - Java 21 — required by the Firebase Firestore emulator (the emulator is a JVM process)
- Node.js ≥ 22.12.0 — some tooling in the build pipeline requires Node; the version constraint is declared in
package.json
Setup Steps
Clone the repository and install dependencies
bun install reads package.json and installs all runtime and dev dependencies, including firebase-tools (the CLI that drives the emulators) and playwright.Copy the environment file
.env.example ships with safe placeholder values that work out of the box against the local emulators:PUBLIC_APP_ENV=development is already set and the Firebase SDK will automatically connect to the local emulators instead of the cloud.For production, replace all PUBLIC_FIREBASE_* values with your real Firebase project credentials and set PUBLIC_APP_ENV=production. The Admin SDK fields (FIREBASE_SERVICE_ACCOUNT_KEY or the FIREBASE_CLIENT_EMAIL / FIREBASE_PRIVATE_KEY pair) are required for server-side API routes. These secrets are held in Vercel project settings — ask the team.Start the Firebase emulators
firebase emulators:start --only firestore,auth,functions,pubsub and brings up:| Emulator | Port |
|---|---|
| Auth | 9099 |
| Firestore | 8080 |
| Functions | 5001 |
| Pub/Sub | 8085 |
| Emulator UI | auto (check terminal output) |
PUBLIC_APP_ENV=development and automatically connects to these local ports instead of the live Firebase project.Seed the local database
Open a new terminal (keep the emulators running) and run:This executes
node ./seed/index.mjs, which populates the local Firestore emulator with categories, products, inventory records, test users (with various roles), and sample orders so you can exercise every part of the UI immediately.Start the development server
@umss.edu domain restriction).The dev server supports hot module replacement for React components and instant page reloads for Astro files.Running Tests
- Unit Tests
- Playwright E2E Tests
- Docker (CI-equivalent)
Unit tests are powered by Vitest:
The emulators must be running before you execute E2E tests. Start them with
bun run emu in a separate terminal and ensure PUBLIC_APP_ENV=development is set in .env.