Skip to content

Mastercard-Code-For-Change-2-0/Team-4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎯 Donation Management System

A comprehensive full-stack donation management platform built with modern web technologies.

πŸš€ Features

πŸ”’ Authentication System

  • Separate donor and receiver authentication
  • JWT-based session management
  • Role-based access control

πŸ’ Donation Management

  • Multi-category donation system (clothes, stationary, food, furniture, electronics)
  • Image upload with Cloudinary integration
  • Real-time status tracking
  • Automatic request-donation matching

πŸ“‹ Request Management

  • Request creation and tracking
  • Automatic fulfillment detection
  • Status management (pending, approved, fulfilled, rejected)

πŸ‘¨β€πŸ’Ό Admin Panel

  • Real-time dashboard with statistics
  • Complete donation and request history
  • Status management for matched donations
  • Comprehensive reporting

πŸ› οΈ Tech Stack

Backend

  • Node.js with Express.js
  • MongoDB with Mongoose ODM
  • JWT for authentication
  • Multer + Cloudinary for file uploads
  • bcrypt for password hashing

Frontend

  • React with Vite
  • Tailwind CSS for styling
  • Axios for API calls
  • React Router for navigation

Admin Panel

  • React with modern UI components
  • Lucide React for icons
  • Responsive design with Tailwind CSS

πŸ“ Project Structure

MasterCard CFC/
β”œβ”€β”€ Backend/
β”‚   β”œβ”€β”€ Controllers/          # Business logic
β”‚   β”œβ”€β”€ Models/              # Database schemas
β”‚   β”œβ”€β”€ Routes/              # API endpoints
β”‚   β”œβ”€β”€ Config/              # Passport configuration
β”‚   β”œβ”€β”€ Middlewares/         # Authentication middleware
β”‚   β”œβ”€β”€ Services/            # Business services
β”‚   β”œβ”€β”€ Utils/               # Utility functions
β”‚   └── index.js             # Server entry point
β”œβ”€β”€ Frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/      # React components
β”‚   β”‚   β”œβ”€β”€ hooks/           # Custom hooks
β”‚   β”‚   └── assets/          # Static assets
β”‚   └── package.json
β”œβ”€β”€ admin/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/      # Admin UI components
β”‚   β”‚   β”œβ”€β”€ pages/           # Admin pages
β”‚   β”‚   β”œβ”€β”€ services/        # API services
β”‚   β”‚   └── utils/           # Helper functions
β”‚   └── package.json
└── README.md

πŸš€ Getting Started

Prerequisites

  • Node.js (v14 or higher)
  • MongoDB
  • Cloudinary account (for image uploads)

Backend Setup

  1. Navigate to Backend directory:

    cd Backend
  2. Install dependencies:

    npm install
  3. Create .env file with:

    MONGODB_URI=your_mongodb_connection_string
    JWT_SECRET=your_jwt_secret
    CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
    CLOUDINARY_API_KEY=your_cloudinary_api_key
    CLOUDINARY_API_SECRET=your_cloudinary_api_secret
  4. Start the server:

    npm start

Frontend Setup

  1. Navigate to Frontend directory:

    cd Frontend
  2. Install dependencies:

    npm install
  3. Start development server:

    npm run dev

Admin Panel Setup

  1. Navigate to admin directory:

    cd admin
  2. Install dependencies:

    npm install
  3. Start development server:

    npm run dev

🌐 API Endpoints

Authentication

  • POST /api/donor/signup - Donor registration
  • POST /api/donor/signin - Donor login
  • POST /api/receiver/signup - Receiver registration
  • POST /api/receiver/signin - Receiver login

Donations

  • POST /api/donation/donate - Create donation
  • GET /api/donation/all - Get all donations

Requests

  • POST /api/request/create - Create request
  • GET /api/request/all - Get all requests

Admin

  • GET /api/admin/dashboard - Dashboard statistics
  • GET /api/admin/history - Complete history
  • GET /api/admin/matched-donations - Matched donations
  • PUT /api/admin/donations/:id/status - Update donation status

🎯 Key Features

Automatic Matching

  • Smart algorithm matches donations with requests
  • Real-time status updates
  • Automatic fulfillment detection

File Upload

  • Secure image uploads to Cloudinary
  • Category-based file organization
  • Image optimization and transformation

Admin Dashboard

  • Real-time statistics and analytics
  • Complete transaction history
  • Status management interface

πŸ” Security Features

  • JWT token-based authentication
  • Password hashing with bcrypt
  • Protected API routes
  • Input validation and sanitization
  • CORS configuration

🎨 UI/UX Features

  • Responsive design for all screen sizes
  • Modern and intuitive interface
  • Loading states and error handling
  • Smooth animations and transitions
  • Accessibility considerations

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License.

πŸ™ Acknowledgments

  • Built for MasterCard CFC (Code for Change) initiative
  • Inspired by the need for efficient donation management systems
  • Thanks to all contributors and supporters

Happy Coding! πŸš€

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors