An open API service indexing awesome lists of open source software.

https://github.com/ajfx-01/sharebite_backend


https://github.com/ajfx-01/sharebite_backend

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# Donation Management API

## Overview
This API provides endpoints for managing donations, users, receipts, and drop-off sites. It allows users to register, log in, donate items, reserve donations, upload proof of donations, and manage receipts.

## Features
- User authentication (Register, Login, Edit Profile, Reset Password)
- Manage donations (Create, Retrieve, Update, Reserve, Cancel)
- Upload proof of donations and receipts
- Track donation history and reserved donations
- Retrieve non-admin users

## API Endpoints

### Authentication & User Management
| Endpoint | Method | Description |
|----------|--------|-------------|
| `/register/` | POST | Register a new user |
| `/login/` | POST | Login user |
| `/edituser/` | PATCH | Edit user details |
| `/resetpassword/` | POST | Reset user password |
| `/members/` | GET | Retrieve a list of non-admin users |

### Donations
| Endpoint | Method | Description |
|----------|--------|-------------|
| `/donations/` | GET, POST | Retrieve all donations / Create a new donation |
| `/donations//status/` | PATCH | Update donation status |
| `/donations/mine/` | GET | Retrieve user’s own donations |
| `/donations//` | GET | Retrieve a specific donation’s details |
| `/donations//reserve/` | POST | Reserve a donation |
| `/donations/reserved/` | GET | Retrieve donations reserved by the user |
| `/donations//cancel/` | POST | Cancel a reserved donation |

### Proof & Receipts
| Endpoint | Method | Description |
|----------|--------|-------------|
| `/donations//proof/` | POST | Upload proof for a donation |
| `/receipts/` | GET | Retrieve receipt history |
| `/donations//receipt/` | POST | Upload a receipt for a donation |

### Drop-off Sites
| Endpoint | Method | Description |
|----------|--------|-------------|
| `/dropoff-sites/` | GET | Retrieve list of drop-off sites |

## Installation & Setup
1. Clone the repository:
```bash
git clone https://github.com/AJFX-01/sharebite_backend.git
cd your-repo
```
2. Install dependencies:
```bash
pip install -r requirements.txt
```
3. Run database migrations:
```bash
python manage.py migrate
```
4. Start the development server:
```bash
python manage.py runserver
```

## Configuration
- Ensure that your `.env` file is correctly set up with required environment variables.
- Configure CORS settings to allow frontend access.
- Set up media file handling for proof and receipts storage.

## License
This project is licensed under the MIT License.

## Contribution
Feel free to submit issues or pull requests to improve the project.

## Contact
For questions or collaboration, contact [[email protected]].