1. Package Overview & Folder Architecture
Thank you for purchasing SuperJobs24! Your download package contains all 4 synchronized applications plus Firebase security rules, composite indexes, and a single-command build & deploy runner:
| Directory / File | Technology | Purpose |
|---|---|---|
superjobs24-flutter/ |
Flutter 3.x + Dart 3 + flutter_stripe |
Customer & Provider native mobile app for Android & iOS |
superjobs24-nextjs/ |
Next.js 16 + React 19 + Tailwind CSS | Customer & Provider responsive web marketplace |
superjobs-admin/ |
Next.js 16 + React 19 + Tailwind CSS | SuperAdmin & Moderator control center + Support Helpdesk |
firebase-functions/ |
Cloud Functions v2 (Node.js 22, TS) | 31 serverless functions for Stripe Escrow, PINs, Ratings, Coupons, Seed & FCM |
firestore.rules, firestore.indexes.json & storage.rules |
Firebase Rules & Composite Indexes | Role-based access control, query indexes & cloud storage security |
package.json & scripts/deploy-all.mjs |
Node.js Deploy Orchestrator | Single-command typecheck, lint, static Next.js build & full Firebase Hosting + Rules + Functions deploy |
2. Prerequisites
- Node.js 20 or 22 LTS &
npm(required for Next.js Web, Admin Panel, and Cloud Functions v2) - Flutter SDK 3.24+ (Dart 3.x), Android Studio / Xcode for mobile builds
- Firebase Account with a project upgraded to the Blaze (Pay-as-you-go) plan (required by Google Cloud to deploy Cloud Functions v2 and reach Stripe's external API)
- Stripe Account (Optional during initial setup — SuperJobs24 includes a zero-key Sandbox Escrow Mode out of the box!)
3. Branding, Colors & White-Label Customization (All in One Place!)
SuperJobs24 is engineered so you can rebrand the entire platform in minutes using two complementary methods:
Method A: Zero-Code Live Cloud Branding (Recommended)
Once your Admin Console is running, open Platform Settings → 1. General & Branding (/settings):
- Change App Name, Tagline, Logo URL, and Favicon URL.
- Pick your Primary Brand Color (default
#4FA6F3) and Secondary Accent Color (default#F47839). - Set your Currency Code & Symbol (
USD $,EUR €,GBP £,INR ₹,AED, etc.), Commission %, and Home Promo Banners. - Click Save Changes — Firestore
settings/publicimmediately streams your new colors, monogram badge, app name, and currency to the Web Marketplace, Admin Console, Flutter Mobile App, and Transactional Emails in real time without rebuilding!
Method B: Single-File Static Code Defaults (1 File Per Workspace)
To permanently bake your brand defaults into the source code before compiling release builds, edit the single brand_config file in each workspace:
| Workspace | Single Branding & Config File | Controls |
|---|---|---|
| Flutter App | superjobs24-flutter/lib/config/brand_config.dart |
BrandConfig: App Name, Monogram Badge, Bundle ID, Primary/Accent/Dark Colors, Currency, Contact URLs, Default Map Lat/Lng & Google Maps fallback key |
| Web Marketplace | superjobs24-nextjs/src/config/brand.config.ts |
BRAND_CONFIG: App Name, Short Name, Monogram Badge, Hex Palette, SEO Meta, Currency, Support Contact & Map Defaults |
| Admin Console | superjobs-admin/src/config/brand.config.ts |
ADMIN_BRAND_CONFIG: Console Name, Badge, Primary/Accent Hex Colors, Currency & Marketplace URL |
| Cloud Functions | firebase-functions/src/config/brand.config.ts |
BACKEND_BRAND_CONFIG: Default App Name, Email Brand Color, Currency, Commissions & Production URLs |
Changing Mobile Package / Bundle ID, App Icon & Native Splash
- Replace
superjobs24-flutter/assets/logo/logo.png(1024x1024 PNG) with your brand icon, and replacesuperjobs24-nextjs/public/logo.svg&superjobs-admin/public/logo.svgfor web. - To rename the Android/iOS package ID across the Flutter project:
cd superjobs24-flutter dart pub global activate change_app_package_name dart pub global run change_app_package_name:main com.yourcompany.yourapp - Regenerate Android & iOS launcher icons and native splash screens:
flutter pub get dart run flutter_launcher_icons dart run flutter_native_splash:create
4. Step 1 — Create Firebase Project & Environment Files
- Open the Firebase Console, click Add project, and upgrade billing to the Blaze (Pay-as-you-go) plan (required for Cloud Functions v2 and Stripe webhooks).
- Under Build → Authentication → Sign-in method, enable Email/Password and Google.
- Under Build → Firestore Database, click Create database in Production mode.
- Under Build → Storage, click Get started in Production mode.
- Under Build → Hosting, click Get started once if Hosting has not yet been activated on your project (classic Firebase Hosting requires zero GitHub linking and zero App Hosting setup).
- Under Project Settings → General → Your apps, register a Web App and copy your
firebaseConfigvalues (apiKey,authDomain,projectId,storageBucket,messagingSenderId,appId). - Link the root repository to your Firebase project:
npx firebase-tools@latest login npx firebase-tools@latest use --add - Create your environment files from the templates inside all 3 backend/web workspaces before building or deploying:
Fill in your# 1) Cloud Functions v2 cp firebase-functions/.env.example firebase-functions/.env # 2) Customer & Provider Next.js Web Marketplace cp superjobs24-nextjs/.env.example superjobs24-nextjs/.env.local # 3) SuperAdmin & Moderator Next.js Console cp superjobs-admin/.env.example superjobs-admin/.env.localNEXT_PUBLIC_FIREBASE_*keys inside bothsuperjobs24-nextjs/.env.localandsuperjobs-admin/.env.local, and ensureNEXT_PUBLIC_DEMO_MODE=false.
superjobs24-nextjs and superjobs-admin export directly to standard Firebase Hosting static CDN sites (https://<your-site>.web.app), with /api/getLatLng and /api/getFormattedAddress handled automatically by Cloud Functions v2 rewrites.
5. Step 2 — 1-Command Build, Check & Full Firebase Deploy (Custom Site Names)
The root workspace links all 6 Firebase deployment targets — superjobs24-nextjs (Hosting target web), superjobs-admin (Hosting target admin), firestore:rules, firestore:indexes, storage, and functions — into a single orchestrated command that builds and checks everything locally first before publishing anything to Firebase.
What the Unified Deploy Command Checks Before Deploying
- Validates
firebase.json,.firebaserc,firestore.rules,firestore.indexes.json, andstorage.rules. - Auto-installs
node_modulesif missing acrossfirebase-functions,superjobs-admin, andsuperjobs24-nextjs. - Runs TypeScript check & build in
firebase-functions/(tsc --noEmit+tsc). - Runs
next typegen,tsc --noEmit, ESLint & static Next.js export (out/) insuperjobs-admin/(automatically baking your live Customer site URL intoNEXT_PUBLIC_WEB_APP_URL). - Runs
next typegen,tsc --noEmit, ESLint & static Next.js export (out/) insuperjobs24-nextjs/. - Aborts cleanly before touching Firebase if any typecheck, lint, or production export fails.
- Creates any missing Firebase Hosting sites for your custom names, binds them to the
webandadminHosting targets in.firebaserc, and deploys everything together viafirebase deploy --only "hosting,firestore:rules,firestore:indexes,storage,functions".
Deploy Commands (Choose Custom Names for Both Sites)
# Option A: Interactive mode — prompts for Project ID, Customer Site Name & Admin Site Name
npm run deploy:custom
# Option B: Pass custom site names directly via CLI flags
npm run deploy -- --web-site mybrand-marketplace --admin-site mybrand-admin
# Option C: Deploy using the currently saved site names in .firebaserc
# (Default names: "<project-id>.web.app" for Customer Web and "<project-id>-admin.web.app" for Admin)
npm run deploy
# Option D: Run all local typechecks, lints & static builds ONLY (no Firebase deployment)
npm run check
# Option E: Run local builds & checks + Firebase dry-run validation
npm run deploy:dry-run
| Flag / Script | Description |
|---|---|
--web-site <name> |
Custom Firebase Hosting site ID for superjobs24-nextjs → https://<name>.web.app |
--admin-site <name> |
Custom Firebase Hosting site ID for superjobs-admin → https://<name>.web.app |
--project <projectId> |
Override the target Firebase Project ID from .firebaserc |
--install |
Force fresh npm install across all 3 Node workspaces before building |
a-z), digits (0-9), and hyphens (-). After deployment finishes, open Firebase Console → Authentication → Settings → Authorized domains and verify both <web-site>.web.app and <admin-site>.web.app (plus any custom domains) are listed, and update APP_BASE_URL / ADMIN_BASE_URL in firebase-functions/.env so Stripe redirects land on your production URLs.
Deploying to Vercel, Netlify, or Your Own Node.js VPS Instead of Firebase Hosting
FIREBASE_STATIC_EXPORT): Both Next.js apps default to static export (FIREBASE_STATIC_EXPORT=true) for zero-config Firebase Hosting deploys. If you prefer deploying superjobs24-nextjs or superjobs-admin as a standard Node.js / Next.js server app on Vercel, Netlify, Railway, Render, or a VPS (npm run build && npm run start), simply add:
FIREBASE_STATIC_EXPORT=false
to your hosting provider's Environment Variables (or .env.local). Geocoding and address autocomplete automatically route through your deployed Firebase Cloud Functions (getLatLngApi & getFormattedAddressApi) with OpenStreetMap Nominatim fallback. Still deploy Firebase Rules, Indexes, Storage Rules & Cloud Functions once with npx firebase-tools@latest deploy --only "firestore:rules,firestore:indexes,storage,functions".
Running Locally During Development
To run both Next.js apps locally against your live Firebase backend during development:
cd superjobs24-nextjs && npm run dev # http://localhost:3000
cd superjobs-admin && npm run dev # http://localhost:3001
<PROJECT_NUMBER>-compute@developer.gserviceaccount.com, grant it the Cloud Build Service Account (roles/cloudbuild.builds.builder) role, and re-run npm run deploy.
6. Step 3 — Initial Admin Dashboard Access Setup
On a fresh Firebase project, no Admin user exists yet. SuperJobs24 includes a cryptographically enforced First-Run Admin Setup gate inside Cloud Functions so only the very first person to bootstrap a clean database can claim owner admin privileges.
How Initial Admin Access Works (Step-by-Step)
- Open your deployed Admin Dashboard URL (e.g.
https://<your-admin-site>.web.app/login) or localhttp://localhost:3001/login. - On mount, the login screen calls the
checkAdminBootstrapStatusCloud Function to check whether any user withrole == "admin"exists in Firestoreusers/. - When zero admins exist, you will see a green banner titled First-Run Admin Setup Available and a toggle button labeled First-Run Admin Setup (Create First Admin). Click that button to switch the form into setup mode (or use Continue with Google (Staff Account) on first run).
- Enter your Admin Display Name, Staff Email, and Password (minimum 6 characters), then click Create Admin & Bootstrap.
- Behind the scenes, the app creates your Firebase Auth account and invokes the
bootstrapPlatformCloud Function, which automatically:- Verifies zero existing admins exist (returns
permission-deniedif an admin already exists). - Sets Firebase Auth custom claim
{ role: "admin" }via Admin SDK and writes your profile inusers/{uid}withrole: "admin",accountStatus: "active", andkycStatus: "verified". - Initializes
settings/public(settingadminInitialized: true) andsettings/secrets, plus seeds your clean production baseline (8 categories, 3 subscription plans, and 2 coupons). - Refreshes your Firebase ID token so Firestore & Storage Rules immediately recognize your Admin role, logs you into
/dashboard, and permanently locks First-Run Admin Setup.
- Verifies zero existing admins exist (returns
admin@superjobs24.com / moderator@superjobs24.com) on /login will return an invalid-credential error until the starter demo accounts are seeded in Step 4. Always use First-Run Admin Setup (Create First Admin) first on a fresh database!
Adding More Admins or Moderators Later
- From Admin UI (Recommended): Sign in as your Admin, navigate to Users & KYC (
/users), and click Add User (adminCreateUserCloud Function) — or change an existing user's role dropdown tomoderatororadmin(adminSetUserRoleAndStatusCloud Function). Both Firestoreusers/{uid}.roleand Firebase Auth custom claims are updated atomically. - Last-Admin Protection: Cloud Functions & Firestore rules forbid deleting, banning, suspending, or demoting the final remaining active Admin account, preventing accidental lockout.
- Staff-Only Gate: Customer (
customer) and Provider (provider) accounts are blocked with Access Denied on the Admin Console — they sign in exclusively on the Customer/Provider Web Marketplace and Flutter Mobile App.
7. Step 4 — Initial Seeding to Firestore
SuperJobs24 separates clean production bootstrapping from optional sample/demo marketplace seeding so you never accidentally launch to real customers with fake bookings or test passwords.
Stage 1: Clean Production Baseline (Automatic During Step 3)
Completing First-Run Admin Setup automatically seeds only the essential marketplace skeleton into Firestore (with zero fake bookings or test users):
| Firestore Collection / Doc | Seeded Documents | Contents |
|---|---|---|
settings/public & settings/secrets |
2 docs | Branding defaults from BACKEND_BRAND_CONFIG, adminInitialized: true, commission rules, banners & secrets placeholders |
categories/ |
8 docs | cat-cleaning, cat-repairing, cat-painting, cat-laundry, cat-appliance, cat-plumbing, cat-shifting, cat-more |
subscriptionPlans/ |
3 docs | plan-starter (Free, 15% fee), plan-pro-growth ($29/mo, 8% fee), plan-elite-agency ($79/mo, 3% fee) |
coupons/ |
2 docs | PROMO30 (30% off) & WELCOME15 ($15 off first booking) |
Stage 2: Optional 1-Click Starter Marketplace & Sample Listings Seed
Want realistic services, reviews, sample bookings, and test accounts immediately for staging or previewing all 4 apps? Once signed into the Admin Console:
- Open Platform Settings (
/settings) and click tab 7. Buyer Setup & Tools. - Under Config Backup & System Tools, choose one of the two server-side Cloud Function seed actions:
- Re-Seed Starter Catalog (Safe / Non-Destructive): Keeps your personal owner Admin account intact and runs
bootstrapPlatform+seedMarketplaceData(purgeExtraUsers: false) to populate:- 8 taxonomy services under
services/andcategories/{catId}/services/ - 8 approved sample listings under
userServices/+ verifiedreviewssubcollections - Provider verification record (
verification/user-provider) & active Pro Growth subscription (subscriptions/sub_user_provider) - 4 sample bookings (
SJ24-BK100201–SJ24-BK100204) covering completed, upcoming (<1km & >1km), and disputed states with 4-digitstartPins - 1 live customer–provider chat thread (
chats/chat-customer-provider) with messages - The 4 canonical role test accounts below (created in both Firebase Auth & Firestore
users/)
- 8 taxonomy services under
- Reset to 4 Canonical Role Test Accounts (Danger Zone →
purgeExtraUsers: true): Permanently deletes all other Firebase Auth accounts and clearsusers,verification,subscriptions,bookings,userServices, andchatsbefore cleanly recreating only the 4 canonical role accounts and starter catalog. Ideal for resetting a public demo environment.
- Re-Seed Starter Catalog (Safe / Non-Destructive): Keeps your personal owner Admin account intact and runs
Seeded Canonical Role Accounts (QA & Demo Reference)
| Role | Password | Where Used | |
|---|---|---|---|
admin |
admin@superjobs24.com |
Admin@123456 |
Admin Console (full system control & settings) |
moderator |
moderator@superjobs24.com |
Mod@123456 |
Admin Console (KYC, disputes, support tickets, listings) |
provider |
provider@superjobs24.com |
Pro@123456 |
Web Marketplace & Flutter App (8 seeded services) |
customer |
customer@superjobs24.com |
Customer@123456 |
Web Marketplace & Flutter App (4 sample bookings) |
admin / moderator roles.
8. Step 5 — Configure Flutter iOS & Android Mobile App
- Generate Firebase platform bindings (
lib/firebase_options.dart,android/app/google-services.json, andios/Runner/GoogleService-Info.plist) automatically with FlutterFire CLI:cd superjobs24-flutter dart pub global activate flutterfire_cli flutterfire configure --project=your-project-id - Android Google Sign-In SHA Fingerprints: Run
cd android && ./gradlew signingReport, copy your debug and release SHA-1 and SHA-256 fingerprints, and add them in Firebase Console → Project Settings → Your Android App, then re-downloadgoogle-services.json. - Native Stripe Android Requirements (Already Pre-Configured!):
MainActivity.ktalready extendsFlutterFragmentActivityand all 4 Androidstyles.xmlfiles (values,values-night,values-v31,values-night-v31) useTheme.MaterialComponentsas required byflutter_stripe. - Run on an emulator/device or build store binaries:
flutter pub get flutter run flutter build appbundle --release flutter build ipa --release
9. Step 6 — Link Live Stripe Escrow, Subscriptions & Connect
- Open your Stripe Dashboard → Developers → API Keys and copy your Publishable Key (
pk_test_...orpk_live_...) and Secret Key (sk_test_...orsk_live_...). - Under Stripe Dashboard → Developers → Webhooks, click Add endpoint pointing to your deployed
stripeWebhookCloud Function URL and select these events:payment_intent.succeeded&payment_intent.payment_failedcharge.refundedcheckout.session.completedcustomer.subscription.created,customer.subscription.updated,customer.subscription.deletedinvoice.paid&invoice.payment_failed- (Optional Connect endpoint):
account.updated
whsec_...). - Under Stripe Dashboard → Settings → Billing → Customer portal, click Activate link / Save once so Stripe initializes your hosted Billing Portal configuration.
- Open SuperAdmin Console → Platform Settings → 3. Stripe & Payments, paste your Publishable Key, Secret Key, and Webhook Secret, and click Save Changes!
- Open SuperAdmin Console → Subscriptions & Plans and edit/save each plan & coupon once — Cloud Functions automatically create matching Stripe Products, Monthly/Yearly Prices, and Promotion Codes in your Stripe account!
10. 4-Role Architecture & Test Accounts
SuperJobs24 enforces 4 distinct roles (customer, provider, moderator, admin):
- Customer — Browses & searches services, books via Stripe Escrow or Cash, views 4-digit Start PIN, tracks provider GPS distance & live timer, rates completed services, and opens Support Tickets. Cannot switch to Provider.
- Provider — Lands directly on the Pro Dashboard, lists services, completes Government ID KYC, accepts bookings, swipes to start with Customer's 4-digit PIN, completes jobs, upgrades subscriptions, and manages payouts. Cannot switch to Customer.
- Moderator — Accesses the Admin Console to verify/reject Provider KYC, arbitrate booking disputes, reply to Support Tickets, and moderate listings (cannot modify secret Platform Settings or Admin roles).
- Admin — Full platform control across all modules, Stripe refunds/payouts, role assignments, and Platform Settings. Protected by Last-Admin safeguards so at least one active Admin always remains.
11. Support Tickets & Pronto-Style Live Bookings
- Creating Support Tickets: Both Customers and Providers can open tickets from Profile → Help Center & Support Tickets or tap the Help / Get Help button on any booking card or Live Booking Tracker (which automatically links the
bookingId). - Responding from Admin: Staff open Support Tickets (
/support) in the Admin Console to filter by role/priority/booking, assign tickets, and send real-time replies or click Reply & Resolve.
12. Troubleshooting & FAQ
- Maps not loading or want zero Google Maps billing? Keep Map Provider set to
Free OpenStreetMap (Leaflet)in Admin Settings — it works worldwide with zero API keys or billing! - Android Stripe PaymentSheet fails to open? Ensure
MainActivity.ktextendsFlutterFragmentActivity(already configured) and a validpk_test_...orpk_live_...key is saved in Admin/settings. - 1-Click Test Login fails on a brand-new Firebase project? Fresh databases start with zero users. Click First-Run Admin Setup (Create First Admin) on
/loginto create your Admin account first, then go to Platform Settings → 7. Buyer Setup & Tools → Re-Seed Starter Catalog if you want the canonical demo accounts created. - Admin Console says "Access Denied"? Only users whose Firestore
users/{uid}.roleisadminormoderatorcan sign into the Admin Console; Customer and Provider accounts sign in on the Web Marketplace or Mobile App.