veyra

VEYRA — Beauty, Styling & Creative Services Marketplace

Tagline: Discover. Connect. Create.
Core Proposition: One request. Multiple professionals. Better choices.
Brand Attribution: A product of Damayanti Network (division of Damayanti Crest).


1. Platform Overview

VEYRA is a full-stack Next.js (App Router) + TypeScript + Tailwind CSS + Firebase marketplace platform connecting customers with independent beauty, styling, and creative professionals across 10 dynamic categories:

Key Capabilities Implemented


2. Explicit Scope & Integration Disclosures


3. Prerequisites & Installation

git clone <your-github-repo-url>
cd veyra
npm install

Create your local environment file from the safe template:

cp .env.example .env.local

4. Firebase Configuration Setup

  1. Create a Firebase project in the Firebase Console.
  2. Enable Authentication -> Email/Password (and optionally Phone if your project billing & authorized domains are configured).
  3. Enable Cloud Firestore and Firebase Storage.
  4. Register a Web App in Project Settings and copy the NEXT_PUBLIC_FIREBASE_* values into .env.local.
  5. For server-side trusted routes (/api/proposals/accept, /api/bookings/[id]/transition, /api/reviews, /api/requests/distribute, /api/account/delete, /api/admin/*) and CLI scripts:
    • Generate a Service Account key in Firebase Project Settings -> Service accounts (keep it outside Git!) and set FIREBASE_PROJECT_ID, FIREBASE_CLIENT_EMAIL, and FIREBASE_PRIVATE_KEY in .env.local.
  6. Deploy Firestore rules, indexes, and Storage rules:
npx firebase login
npx firebase use <your-project-id>
npx firebase deploy --only firestore:rules,firestore:indexes,storage

Optional Cloud Functions (Firebase Blaze Plan)

cd functions
npm install
npm run build
cd ..
npx firebase deploy --only functions

(Note: All critical transactional flows also run via authenticated Next.js API Route Handlers on Vercel without requiring Blaze Cloud Functions.)

Optional Web Push (FCM) & App Check


5. Secure Admin Initialization & Category Seeding

VEYRA does not include a public admin signup page and does not hardcode admin credentials.

  1. First register a regular account via /auth/register (or create the user in Firebase Console -> Authentication).
  2. Grant super_admin Custom Claims and create the adminRoles document using the trusted server script:
npm run init:admin -- --email admin@yourdomain.com --level super_admin
  1. Seed the initial 10 categories, subcategories, and default platform settings into Firestore:
npm run seed:categories
  1. Sign out and sign back in on the web app so the user’s Firebase ID token refreshes with the new admin: true custom claim, then open /admin.

6. Local Development & Testing

Start Development Server

npm run dev

Run Typecheck, Lint & Production Build

npm run typecheck
npm run lint
npm run build

Run Unit Tests

npm test

Run Firebase Emulator Suite & Security Rules Tests

Ensure Java 21+ is on your PATH, then run:

npm run test:rules

To run the full app locally against Firebase Emulators:

  1. Set NEXT_PUBLIC_USE_FIREBASE_EMULATORS=true in .env.local.
  2. Start emulators: npm run emulators
  3. Start Next.js: npm run dev

7. Deployment (Vercel + GitHub)

  1. Push your repository to GitHub (verify .env.local and service-account JSONs are excluded by .gitignore).
  2. Import the repository into Vercel.
  3. Configure all environment variables from .env.example in Vercel Project Settings (keep FIREBASE_PRIVATE_KEY without NEXT_PUBLIC_ prefix).
  4. Add your Vercel production domain to Firebase Console -> Authentication -> Settings -> Authorized domains.
  5. Deploy!

8. Future Android App (Capacitor)

VEYRA is structured with mobile-first views, safe-area inset CSS, custom modals (no window.alert/confirm), and a capacitor.config.ts template (com.damayantinetwork.veyra).

To wrap the deployed production platform into an Android shell later:

npm install @capacitor/core @capacitor/cli @capacitor/android
npx cap add android
npx cap sync android
npx cap open android

Update capacitor.config.ts server.url to your production HTTPS domain (or set CAPACITOR_BUILD=true for static asset bundling if exporting static routes).