Absolutely! Here's a clean and professional README.md for your Django REST Framework project.
You can customize the project name and author as needed.
# 🧾 Invoice & Subscription API
This is a Django REST Framework (DRF)-based API for managing user subscriptions and invoices. It includes user filtering, invoice generation, active/expired subscription tracking, and email functionality.
---
## 🚀 Tech Stack
- **Backend:** Django + Django REST Framework (DRF)
- **Database:** MySQL
- **Email Service:** SMTP with TLS
- **Auth:** Token-based (SimpleJwt `IsAuthenticated`)
---
## 📦 Features
- ✅ User subscriptions (with plans, start/end dates)
- ✅ Invoices auto-linked to subscriptions
- ✅ Filter invoices by `user_id`
- ✅ Filter subscriptions by `is_active` and `user_id` flag
- ✅ JWT / Token-based authentication
- ✅ SMTP email support
- ✅ Super Admin-only and user-specific views
- ✅ Clean and extendable architecture using DRF `ViewSet` and `ListAPIView`
---
## 📁 Project Structure (Important Apps / Files)
project/ ├── api/ │ ├── models.py │ ├── serializers.py │ ├── views.py │ ├── urls.py │ └── email.py ├── settings.py ├── urls.py └── manage.py
---
## 🛠️ Installation
### 1. Clone the repository
```bash
git clone https://github.com/Kislayraj-ai/SaasBill.git sassbillrepo-api
cd sassbillrepo-api
python -m venv venv
source venv/bin/activate # On Mac
venv\Scripts\activate # On Windowspip install -r requirements.txtCreate a .env file (or use Django settings directly) with your MySQL and SMTP credentials or
as per your convenience:
DB_NAME=yourdbname
DB_USER=youruser
DB_PASSWORD=yourpassword
DB_HOST=localhost
DB_PORT=3306 (port according to you system)
EMAIL_HOST=smtp.yourprovider.com
EMAIL_PORT=587
EMAIL_HOST_USER=your-email@example.com
EMAIL_HOST_PASSWORD=yourpassword
EMAIL_USE_TLS=TrueOr set those in settings.py.
python manage.py makemigrations
python manage.py migratepython manage.py createsuperuserpython manage.py runserverUse Token-based authentication or JWT (if implemented).
For each API call, add the token in the header:
Authorization: Token Installation here
```bash
pip install djangorestframework-simplejwt
The project is configured to send emails using SMTP + TLS. Make sure your credentials are correct and the email service allows SMTP access.
You can find the .json file of the collection in the postman folder
project/ ├── postman/ ├── sassBill.json
- Only authenticated users can access endpoints (
IsAuthenticatedused) - Admin-only views are protected with custom
@is_superadmindecorators
For support or questions, reach out at: [kislayrajai@gmail.com]