Ground is a map-first data collection platform which seamlessly connects the offline world with cloud-based storage and computation. It addresses the needs of non-technical local community members, smallholder farmers, and professionals and researchers working in the areas of climate, sustainability, and humanitarian aid. It consists of a web app for survey management, and an Android app for offline data collection backed by Firebase.
Note: Ground is not an officially supported product; it is being developed and maintained on a best-effort basis.
This repo contains Ground's hosted components and related docs:
| Directory | Component |
|---|---|
| docs/ | Public documentation, including Ground homepage |
| firestore/ | Firestore config defining Firebase rules and other database settings |
| functions/ | Firebase Cloud Functions, used to sync with Google Sheets and import/export data to/from other data sources |
| lib/ | Ground TypeScript libs, used by both web and functions |
| proto/ | Ground data model, shared between web and mobile apps and used to infer the structure of data in Firestore |
| storage/ | Firebase Storage config for offline imagery and user photo storage |
| web/ | Ground web console used to set up and manage surveys, and to view, edit, and analyze collected data online |
Read through our contributing guidelines to learn about our submission process, coding rules and more.
- Install nvm
- Install Node.js:
nvm install 20- Install Firebase CLI and Nx:
npm install -g firebase-tools nx- Install dependencies:
npm install- Build and start local Firebase emulator and Angular dev server:
nx start- Once started, the app will be available at http://localhost:4200. For development, and testing, the Firebase Emulator Suite UI is accessible at http://localhost:4000. Changes to the web app in
web/and to the Cloud Functions infunctions/are automatically rebuilt and reloaded on save.
Note: The local build variant doesn't require API keys to run, but warnings related to missing Maps API keys will appear in the console. Authentication is also disabled.
The local emulator is preloaded with a demo survey. Run nx export to save the updated demo data to the local filesystem for use on the next run.
Members of the core maintainers team can run the app against the live staging environment with:
nx run web:serve:stagingTo build and deploy to staging, first sign into Firebase with:
npx firebase loginYou can then deploy to prod with:
nx run deploy:stagingTo deploy to your own production Firebase:
- Override
firebaseConfigin environment.production.ts with your Firebase project config. - Update the project ID placeholder in package.json.
- Run
nx run deploy:production.
For instructions on how to deploy to your own production Firebase project, see the Ground Developer's Guide.