https://github.com/rayeesac/medibillz
MediBillz β Medical Shop Billing API (Django + DRF + PostgreSQL+ Docker)
https://github.com/rayeesac/medibillz
django django-framework django-rest-framework docker dockerfile drf postgresql python resful-api
Last synced: 2 months ago
JSON representation
MediBillz β Medical Shop Billing API (Django + DRF + PostgreSQL+ Docker)
- Host: GitHub
- URL: https://github.com/rayeesac/medibillz
- Owner: Rayeesac
- Created: 2025-03-17T09:43:32.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2025-03-17T10:34:33.000Z (2 months ago)
- Last Synced: 2025-03-17T11:27:25.716Z (2 months ago)
- Topics: django, django-framework, django-rest-framework, docker, dockerfile, drf, postgresql, python, resful-api
- Language: Python
- Homepage:
- Size: 50.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# π₯ MediBillz-Medical Shop Billing API (Django,DRF,PostgreSQL)
## π Overview
MediBillz is a **Django REST Framework (DRF) API** for managing a **Medical Shop Billing System**.
It includes **user authentication, medicine management, billing, stock tracking, and reports**.---
## π Features
β **JWT Authentication** (Login, Logout, Role-based Access)
β **Medicine Management** (Add, Update, Delete, Track Stock)
β **Billing System** (Auto Price Calculation, Invoice Generation)
β **Real-time Notifications** (Low Stock & Expiry Alerts)
β **Admin Dashboard** (Sales Reports & Performance Metrics)---
## π₯ **Postman Collection**
[](https://www.postman.com/grey-equinox-143107/medibillz/collection/cazzzdu/medibillz-medical-shop-billing-api)1οΈβ£ Click the **"Run in Postman"** button.
2οΈβ£ Import the **Postman Collection** and set the environment variables:
```
base_url = http://127.0.0.1:8000
token =
```
3οΈβ£ Send requests and test APIs.---
## π οΈ Get Started to Setup.
### **πΉ Step 1: Clone the Repository**
To get started, clone the project from GitHub:
```sh
git clone https://github.com/Rayeesac/MediBillz.git
cd MediBillz
```### **πΉ Step 2: Run the Application Using Docker**
MediBillz comes with Docker support, making it easy to set up dependencies like PostgreSQL and Django in isolated containers.πΉStart the Application
Run the following command to build and start the services in detached mode (-d):```sh
docker-compose -f docker-compose.yml up -d --build
```
To check running containers, use:
```sh
docker ps
```
### **πΉ Step 3: Restore the Database**
If you have a database backup (medibillz.sql), you can restore it into the running PostgreSQL container.πΉ Run the Command
```sh
cat medibillz.sql | docker exec -i medi_postgres psql -U postgres
```### **πΉ Step 4: Restart Docker Services**
```sh
docker-compose -f docker-compose.yml down && docker-compose -f docker-compose.yml up -d
```---
Admin credentials
---------
username : medi-billz-admin
password : MBMBiz@Admin2025---
## π API Endpoints
### **1οΈβ£ Authentication APIs**
| Method | Endpoint | Description |
|--------|-------------|--------------------|
| `POST` | `/api/auth/register/` | Register a new user (Admin, Staff, Inventory Manager) |
| `POST` | `/api/auth/login/` | Get JWT access & refresh tokens |
| `POST` | `/api/auth/logout/` | Invalidate JWT token |---
### **2οΈβ£ User Management APIs (Admin Only)**
| Method | Endpoint | Description |
|--------|-------------|--------------------|
| `GET` | `/api/users/` | Get all users |
| `GET` | `/api/users/{id}/` | Get a specific user |
| `PUT` | `/api/users/{id}/` | Update user details |
| `DELETE` | `/api/users/{id}/` | Delete a user |---
### **3οΈβ£ Medicine Management APIs (Inventory Manager Only)**
| Method | Endpoint | Description |
|--------|-------------|--------------------|
| `POST` | `/api/medicines/` | Add a new medicine |
| `GET` | `/api/medicines/` | List all medicines |
| `GET` | `/api/medicines/{id}/` | Get medicine details |
| `PUT` | `/api/medicines/{id}/` | Update medicine details |
| `DELETE` | `/api/medicines/{id}/` | Delete a medicine |---
### **4οΈβ£ Billing APIs (Staff Only)**
| Method | Endpoint | Description |
|--------|-------------|--------------------|
| `POST` | `/api/billing/` | Create a bill (Auto price calculation) |π **Example Request:**
```json
{
"items": [
{ "medicine": 2, "quantity": 2, "packaging_type": "box" },
{ "medicine": 1, "quantity": 1, "packaging_type": "pack" }
]
}
```---
### **5οΈβ£ Dashboard APIs (Admin Only)**
| Method | Endpoint | Description |
|--------|-------------|--------------------|
| `GET` | `/api/dashboard/stock/` | Get available stock |
| `GET` | `/api/dashboard/reports/?start_date=YYYY-MM-DD&end_date=YYYY-MM-DD` | Get sales reports |---
## π§ **Contact & Support**
For issues, feel free to open a GitHub issue or contact:
π© Email: **[email protected]**
π GitHub: [GitHub Repo](https://github.com/Rayeesac/MediBillz)