Skip to content

An advanced Django REST API for managing vaccine campaigns, doctors, patients, and dose centers — with authentication, role-based access, filters, search, secure payments (SSLCommerz) and admin control.

License

Notifications You must be signed in to change notification settings

anis191/vaxplus-backend

Repository files navigation

VaxPlus - REST API for a Vaccination Management System

Django DRF JWT

VaxPlus is a secure and scalable RESTful API built using Django and Django REST Framework. This system allows users to register, book vaccination slots, view vaccine details, and manage appointments efficiently. It also includes admin-level capabilities to manage vaccine centers, doses, and more.


🌐 Live Deployment


🚀 Key Features

  • JWT Authentication – Secure, token-based login and access management
  • Email Activation – Automatic account activation via email upon registration
  • User Management – Register, log in, and manage user profiles
  • Campaign Management – Full CRUD operations for vaccination campaigns
  • Vaccination Centers – Create, update, and manage vaccine center details
  • Booking System – Book, reschedule, or cancel vaccination appointments
  • Payment Integration (SSLCommerz) – Secure online payments for vaccination booking
  • Admin Panel – Manage users, vaccine info, and appointment data
  • Advanced Filters – Filter campaigns by category, date, status, and more
  • Search & Ordering – Search by campaign or vaccine title and description; order by date or relevance
  • API Documentation – Integrated Swagger and ReDoc for easy API exploration

🛠️ Technologies Used

  • Backend: Django 5.2.1
  • REST Framework: DRF 3.16.0
  • Authentication: JWT (SimpleJWT), Djoser
  • Docs: drf-yasg (Swagger/ReDoc)
  • Database: SQLite (development)
  • Image Handling: Pillow
  • Filtering: django-filter
  • Payment Gateway: SSLCommerz
  • Dependencies: See requirements.txt

📚 API Documentation


🔧 Installation & Local Setup

  1. Clone the repository
    git clone https://github.com/anis191/vaxplus-backend.git
     cd vaxplus-backend
  2. Create & activate virtual environment
    python -m venv .example_env
    # For Windows
    source .example_env/Scripts/activate
    # For macOS/Linux
    source .example_env/bin/activate
  3. Install dependencies
    pip install -r requirements.txt
  4. Run migrations
    python manage.py migrate
  5. Start development server
    python manage.py runserver

🔐 Authentication

This API uses JWT (JSON Web Tokens) for secure, stateless user authentication.

📌 Endpoints

Base URL: http://127.0.0.1:8000/api/v1 (Localhost)

🔑 Endpoints

Method Endpoint Description
POST /auth/jwt/create/ Login – Obtain access & refresh tokens
POST /auth/jwt/refresh/ Refresh access token
POST /auth/users/ Register a new user (Sign up)

💡 Note: After registration, use the /auth/jwt/create/ endpoint to log in and receive your JWT tokens.

💳 Payment Integration (SSLCommerz)

Payments are required only for premium vaccination campaigns.

📌 Payment Flow

  1. User selects a premium vaccination campaign.
  2. At checkout, the system redirects to the SSLCommerz hosted payment page.
  3. Upon successful payment, SSLCommerz notifies the system via IPN (Instant Payment Notification).
  4. The campaign booking is confirmed and marked as Paid.

📂 Project Structure

vaxplus-backend/
 ├── vaxplus/ – Django settings & core configs
 │ ├── __init__.py
 │ ├── settings.py
 │ ├── urls.py
 │ └── wsgi.py
 │
 ├── api/ – Manage all core APIs
 │ ├── views.py
 │ ├── urls.py – All API endpoints
 │ └── models.py
 │
 ├── bookings/ – Slot booking logic
 │ └── (models, views, serializers)
 │
 ├── campaigns/ – Manage all campaigns related logic
 │ └── (models, views, serializers)
 │
 ├── fixtures/ – Demo/sample data for the project
 │ └── campaigns_data.json (project demo data)
 │
 ├── media/ – Uploaded images or files
 │
 ├── users/ – Custom user logic, registration, user profiles
 │ └── (models, views, serializers, urls)
 │
 ├── requirements.txt – Project dependencies
 ├── manage.py – Django management script
 └── README.md – Project documentation

🤝 Contributing

Contributions help make this project better and are always welcome!

How to Contribute

  • ⭐ Star the repo
  • 🍴 Fork the project
  • 📥 Clone your fork
  • 💡 Create a feature branch: git checkout -b feature/awesome-feature
  • ✅ Commit your changes: git commit -m 'Add some feature'
  • 📤 Push your branch: git push origin feature/awesome-feature
  • 🛠️ Open a Pull Request

Ensure your code follows the project standards and passes all tests.


💻 Author

Anisul Alam
Full-Stack Developer | Django | React | PostgreSQL

LinkedIn Portfolio


About

An advanced Django REST API for managing vaccine campaigns, doctors, patients, and dose centers — with authentication, role-based access, filters, search, secure payments (SSLCommerz) and admin control.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published