{"id":24478795,"url":"https://github.com/salmanfxrsi/causebridge-backend","last_synced_at":"2026-04-11T04:33:48.474Z","repository":{"id":271905264,"uuid":"909333649","full_name":"salmanfxrsi/causebridge-backend","owner":"salmanfxrsi","description":"Backend for the CauseBridge platform, built with Node.js and Express. It handles user authentication, CRUD operations for volunteer posts, and MongoDB data storage. Uses JWT for secure routes and environment variables for sensitive data management. Provides a RESTful API with CORS support.","archived":false,"fork":false,"pushed_at":"2025-01-10T16:20:08.000Z","size":19,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-04T14:19:27.947Z","etag":null,"topics":["api-development","api-security","backend","cors","crud-operations","environment-variables","express","firebase","jwt-authentication","mongodb","mongodb-atlas","node-api","nodejs","rest-api","user-authentication","volunteer-management"],"latest_commit_sha":null,"homepage":"https://cause-bridge-server-side.vercel.app/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/salmanfxrsi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-28T11:45:58.000Z","updated_at":"2025-01-10T16:20:11.000Z","dependencies_parsed_at":"2025-01-18T20:31:59.217Z","dependency_job_id":null,"html_url":"https://github.com/salmanfxrsi/causebridge-backend","commit_stats":null,"previous_names":["salmanfxrsi/causebridge-backend"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/salmanfxrsi/causebridge-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salmanfxrsi%2Fcausebridge-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salmanfxrsi%2Fcausebridge-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salmanfxrsi%2Fcausebridge-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salmanfxrsi%2Fcausebridge-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/salmanfxrsi","download_url":"https://codeload.github.com/salmanfxrsi/causebridge-backend/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salmanfxrsi%2Fcausebridge-backend/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260629597,"owners_count":23038955,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-development","api-security","backend","cors","crud-operations","environment-variables","express","firebase","jwt-authentication","mongodb","mongodb-atlas","node-api","nodejs","rest-api","user-authentication","volunteer-management"],"created_at":"2025-01-21T10:13:37.022Z","updated_at":"2025-12-30T22:29:42.325Z","avatar_url":"https://github.com/salmanfxrsi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CauseBridge - Server Side\n\nCauseBridge is a volunteer management platform designed to streamline the creation and management of volunteer opportunities. This repository contains the server-side logic and API endpoints for the platform.\n\n## Purpose\nThe server-side application provides the backend support for the CauseBridge platform, including database interactions, authentication, and API endpoints for managing volunteer posts and user actions.\n\n## Frontend Repository\n[Visit CauseBridge Frontend Repository](https://github.com/salmanfxrsi/causebridge-frontend)\n\n## Live Server URL\n[Deployed Server URL](https://cause-bridge-server-side.vercel.app/)\n\n## Key Features\n- **User Authentication**:\n  - Email/password-based authentication.\n  - JWT-based private route protection.\n- **Volunteer Post Management**:\n  - Create, read, update, and delete volunteer posts.\n  - Search functionality for volunteer posts.\n- **Volunteer Requests**:\n  - Handle user requests to join volunteer opportunities.\n  - Automatically decrement available slots for volunteers.\n- **Secure Configuration**:\n  - Firebase and MongoDB credentials secured with environment variables.\n- **Dynamic Data Handling**:\n  - Pagination and sorting of volunteer posts.\n  - Status updates for volunteer requests.\n\n## Technology Stack\n- **Runtime Environment**: Node.js\n- **Framework**: Express.js\n- **Database**: MongoDB (Mongoose for ORM)\n- **Authentication**: Firebase Auth, JSON Web Token (JWT)\n- **Environment Management**: dotenv\n- **Deployment**: Vercel\n\n## API Endpoints\n### Authentication\n- **POST** `/api/auth/register` - Register a new user.\n- **POST** `/api/auth/login` - Log in a user and return a JWT.\n\n### Volunteer Posts\n- **GET** `/api/posts` - Retrieve all volunteer posts (supports pagination and sorting).\n- **GET** `/api/posts/:id` - Retrieve a specific volunteer post.\n- **POST** `/api/posts` - Create a new volunteer post (protected route).\n- **PUT** `/api/posts/:id` - Update a volunteer post (protected route).\n- **DELETE** `/api/posts/:id` - Delete a volunteer post (protected route).\n\n### Volunteer Requests\n- **POST** `/api/requests` - Submit a new volunteer request.\n- **GET** `/api/requests` - Retrieve user-specific volunteer requests.\n- **DELETE** `/api/requests/:id` - Cancel a volunteer request.\n\n## Environment Variables\nEnsure you have a `.env` file in the root directory with the following keys:\n```env\nPORT=5000\nMONGO_URI=your-mongodb-connection-string\nJWT_SECRET=your-jwt-secret\nFIREBASE_API_KEY=your-firebase-api-key\nFIREBASE_AUTH_DOMAIN=your-firebase-auth-domain\n```\n\n## NPM Packages Used\n- **express**: Web framework for building APIs.\n- **mongoose**: MongoDB object modeling for Node.js.\n- **jsonwebtoken**: Implementation of JWT for secure authentication.\n- **dotenv**: Loads environment variables from `.env` file.\n- **cors**: Middleware for enabling CORS.\n- **bcryptjs**: For hashing passwords securely.\n- **firebase-admin**: Firebase integration for authentication.\n\n## Contact\nFor any queries or support, feel free to contact the developer at [salmanxprivate@gmail.com].\n\n---\nThank you for watching **CauseBridge Server Side Repository**!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalmanfxrsi%2Fcausebridge-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsalmanfxrsi%2Fcausebridge-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalmanfxrsi%2Fcausebridge-backend/lists"}