Sustain-Backend is the Node.js backend service that powers the Beacon Of Change and EcoVerse frontend applications. This backend service provides APIs for logging sustainability actions, sustainability challenges, earn badges, action and reward points as well as visualise real world measurable impact.
- Sustainable action logging API,s along with classification of actions into different categories.
- Sustainability challenges API's, that allows user's to join challenges and log challenge specific actions.
- Visualise real world measurable impact of various actions logged by users.
- Recommended Actions API, to send recommended actions to active users via firebase push notifications.
- Notifications API, to send reminder notifications to user's to increase engagement.
- Badge awarding API, to to award badges to user's based on ruleset and user actions logged.
Follow these steps to get the backend service running on your local machine.
Ensure you have the following installed:
- Node.js (>=14.x)
- npm (>=6.x)
Clone the repository:
git clone git@github.com:mondalbidisha/Sustain-Backend.git
cd Sustain-Backend
Install the dependencies:
npm install
Create a .env file in the root directory and add the following environment variables:
DATABASE_URL=your_database_url
JWT_SECRET=your_jwt_secret
GEMINI_API_KEY=your_gemini_api_key
FIREBASE_SERVICE_ACCOUNT_KEYS ...
- Ths project uses Prisma with Prisma Accelarate as an ORM with Supabase PostgreSQL. (Refer - https://supabase.com/partners/integrations/prisma).
- This project uses Firebase to send push notifications. Generate Firebase Service Account API Keys here - https://firebase.google.com/docs/admin/setup.
- This project uses Gemini AI API's. Generate your Gemini API Key here - https://ai.google.dev/gemini-api/docs/api-key.
Start the development server:
node server.js
The backend service will be running at http://localhost:4000.
Thank you for using Sustain-Backend! Your contribution helps us create a better world. 🌍🌱