TheGroove is a mobile-first application backed by Firebase that enables location-based groups ("grooves"), real-time chat, and targeted notifications. This repository contains the mobile client (Expo/React Native), server functions (Firebase Cloud Functions), shared utilities, and helper scripts used to run and deploy the system.
Table of contents
- Overview
- Architecture
- Directory layout
- Prerequisites
- Environment variables
- Local setup
- Development workflow
- Testing
- Deployment
- Useful scripts
- Contributing
- Troubleshooting
TheGroove connects users into location-based groups where they can chat and coordinate in real time. The mobile app (Expo) communicates with Firebase services and Cloud Functions for authentication, messaging, and background tasks.
- Client: Expo React Native app in
src/client. - Server: Firebase Cloud Functions in
functions(TypeScript/JavaScript compiled tolib). - Firestore: primary datastore for users, grooves, messages.
- Notifications: FCM via functions utilities.
functions/— Cloud Functions source, build outputlib/, and function-specificpackage.json.src/client/— Expo app source, assets, and client package manifest.src/— shared TypeScript sources used by server and client (if any).scripts/— helper scripts (e.g.,reset-project.js).
- Node.js 16+ (LTS recommended)
- npm or yarn
- Firebase CLI (
npm install -g firebase-tools) - Expo CLI when developing the client (
npm install -g expo-clior usenpx)
Create environment files from the examples added to the repo:
functions/.env.example— server-side secrets (service account, project id, API keys).src/client/.env.example— client Firebase config and optional API keys.
Never commit real secret values. Use CI/secret stores or firebase functions:config:set for sensitive server configuration.
- Install root and workspace dependencies:
npm install- Install per-package dependencies (if you prefer, use a single command for both):
# from repo root
cd functions && npm install
cd ../src/client && npm install- Add configuration and secrets:
- Copy
functions/.env.example->functions/.envand fill values. - Copy
src/client/.env.example->src/client/.envand fill values.
- Firebase service account / local credentials (server):
- Place your service account JSON where your functions code expects it, or configure
GOOGLE_APPLICATION_CREDENTIALSto point to it.
Start the Firebase emulators (recommended for development):
cd functions
firebase emulators:start --only functions,firestore,authStart the Expo client:
cd src/client
npx expo startWhen using emulators, configure the client to point to the local Firestore emulator if your code supports it (look for emulator connection code in src/client or shared utilities).
- There are no automated tests in the repo by default. Add unit and integration tests under
functions/testandsrc/client/__tests__as needed.
Deploy server functions and hosting with the Firebase CLI:
firebase deploy --only functions,hostingReview functions/package.json for any build steps (TypeScript compilation) before deploying. If functions use TypeScript, run the build step first:
cd functions
npm run buildnpm run reset-project— moves starter code toapp-exampleand creates a blankappdirectory (project-specific script).- Check
functions/package.jsonandsrc/client/package.jsonfor additional scripts such asbuild,lint,serve.
- Fork the repository and open a pull request with a clear description.
- Run linters and tests (if present) before submitting.
- For infrastructure/secret changes, provide instructions and do not commit secrets.
- If builds fail, run
npm cito reset dependencies. - For Firebase auth or Firestore errors, ensure emulator is running or that your production config matches the Firebase console.
- Add example env files and a short developer checklist (I will add these files now).
- Populate
functions/package.jsonandsrc/client/package.jsonscript references into this README.
Files added: functions/.env.example, src/client/.env.example, DEV_CHECKLIST.md.