Skip to content

Kislayraj-ai/SaasBill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.


📝 README.md

# 🧾 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

2. Set up a virtual environment

python -m venv venv
source venv/bin/activate # On Mac
venv\Scripts\activate    # On Windows

3. Install dependencies

pip install -r requirements.txt

4. Configure environment

Create 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=True

Or set those in settings.py.


💾 Database Setup

python manage.py makemigrations
python manage.py migrate

👤 Create Superuser

python manage.py createsuperuser

▶️ Run the Server

python manage.py runserver

🔑 API Auth

Use 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 

📬 Email Sending

The project is configured to send emails using SMTP + TLS. Make sure your credentials are correct and the email service allows SMTP access.


📡 API Endpoints Overview

You can find the .json file of the collection in the postman folder

project/ ├── postman/ ├── sassBill.json


🔒 Permissions

  • Only authenticated users can access endpoints (IsAuthenticated used)
  • Admin-only views are protected with custom @is_superadmin decorators

📧 Contact / Support

For support or questions, reach out at: [kislayrajai@gmail.com]


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors