This document provides everything needed to deploy, seed, and verify the GreenGuard platform in a production-ready environment.
- Node.js: v20 or higher
- Supabase: Access to a project (URL + Anon Key + Service Role Key)
- Environment Variables: Ensure
.envfiles are configured in bothbackend/andfrontend/directories.
cd backend
npm install
npm run devcd frontend
npm install
npm run devcd flora-genius-consultant
npm install
npm run devGreenGuard microservices are deployed on Hugging Face Spaces for high availability and free persistent hosting.
- Backend API: Deployed as a Docker container.
- AI Consultant: Decoupled service for RAG and image identification.
Ensure the following Secrets are set in Hugging Face:
SUPABASE_URL,SUPABASE_SERVICE_ROLE_KEYGEMINI_API_KEYPORT(Default: 7860)
To quickly populate the platform with high-fidelity test data (Admins, NGOs, Plants, and Posts), run the following command from the backend directory:
# Populate the database
node scripts/seed.js| Role | Password | |
|---|---|---|
| Admin | admin@greenguard.in |
@rrm$2026 |
| Approved NGO | greenearth@ngo.org |
Password123! |
| Pending NGO | rootsofhope@ngo.org |
Password123! |
| Adopter | test_adopter@gmail.com |
Password123! |
- NGO Onboarding: Register as NGO -> Submit Darpan ID -> Wait for Admin Approval.
- Admin Verification: Role-based access to the verification portal to approve/reject NGOs.
- Plantation Mapping: NGOs tagging location on social posts to show reforestation impact on the global map.
- AI Identification: Uploading leaf photos to identify species and health.
- Auth Sync: Verify registration automatically creates a Supabase profile row.
- Role RLS: Attempt to delete another user's post via API (Should fail with 403).
- Map Layering: Verify color-coded pins for available, pending, and adopted plants.
- PostGIS: Ensure the
locationcolumn inpostsandplantsuses thePOINTgeography type. - Cleaning: To clear test data, you can use the Supabase SQL editor or extend the
seed.jsscript with aclear()function.
Build Status: Production-Ready Documentation Version: 1.2