The backend of Blood Aid serves as the backbone of the platform, enabling seamless communication between donors and recipients. It provides robust authentication, role-based access control, and efficient management of donation requests, users, and content through RESTful APIs.
- User Role Management:
- Admin:
- Manages users, donation requests, blogs, and funding data.
- Volunteer:
- Handles donation requests and updates their status.
- Donor:
- Creates and responds to donation requests and manages their profile.
- Admin:
- Donation Requests:
- Enables users to create, update, delete, and view donation requests.
- Supports pagination and filtering for better data management.
- Funding Management:
- Secure integration with Stripe to allow donations.
- Tracks total funds raised and logs each funding transaction.
- Content Management:
- Admins can create, publish, and unpublish blogs.
- Blogs can be viewed publicly by users.
- Role-Based Middleware:
- Implements secure and restricted access for specific routes based on user roles.
- Data Validation:
- Ensures secure and consistent storage with input validation.
- Search Functionality:
- Provides APIs for searching donors by blood group, district, and upazila.
- Node.js: Runtime environment for building scalable server-side applications.
- Express.js: Web framework for handling RESTful APIs.
- MongoDB: NoSQL database for efficient data storage and querying.
- Mongoose: Object Data Modeling (ODM) for MongoDB.
- Stripe: Payment processing for funding management.
- bcrypt: Password hashing for secure user authentication.
- JsonWebToken (JWT): Token-based authentication for secure API access.
- Dotenv: Manages environment variables for configuration.
- Cors: Enables secure cross-origin resource sharing.
- Clone the repository:
git clone <repository_url> cd blood-aid-server