Skip to content

Latest commit

 

History

History
85 lines (58 loc) · 1.98 KB

File metadata and controls

85 lines (58 loc) · 1.98 KB

NeoPark Smart Finder

Android + Node.js Express app migrated to Firebase.

Firebase Services

  • Firebase Authentication for email/password and Google Sign-In
  • Cloud Firestore for users, parking spots, slots, bookings, payments, reviews, and community posts
  • Firebase Realtime Database for live parking availability
  • Firebase Storage for parking images and user avatars
  • Firebase Cloud Messaging for booking notifications
  • Firebase Hosting placeholder under firebase/public

Android Setup

  1. Create a Firebase project.

  2. Add an Android app with package name com.neopark.smartfinder.

  3. Download google-services.json.

  4. Place it at:

    android/app/google-services.json

  5. Enable Authentication providers:

    • Email/Password
    • Google
  6. In Android Studio, sync Gradle and run the app.

The app keeps demo fallbacks so screens still render before Firebase data is seeded, but real login/data requires google-services.json.

Backend Setup

  1. Create a Firebase service account: Firebase Console > Project Settings > Service Accounts > Generate new private key

  2. Copy backend/.env.example to backend/.env.

  3. Set:

    FIREBASE_PROJECT_ID=your-firebase-project-id
    FIREBASE_DATABASE_URL=https://your-firebase-project-id-default-rtdb.firebaseio.com
    FIREBASE_STORAGE_BUCKET=your-firebase-project-id.appspot.com
    FIREBASE_SERVICE_ACCOUNT_PATH=C:\absolute\path\to\service-account.json
  4. Install backend dependencies:

    cd backend
    npm.cmd install
  5. Seed Firestore:

    npm.cmd run seed
  6. Start backend:

    npm.cmd start

Firebase Rules

Deploy rules from the firebase folder:

cd firebase
firebase deploy --only firestore:rules,storage,database

Demo Flow

Search Parking -> View Details -> Book Slot -> Pay -> Get QR Ticket

The booking flow writes to:

  • bookings
  • payments
  • slots
  • parking_spots
  • parking_availability in Realtime Database