Skip to content

pytechlady/HeliumX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HeliumX Admin Dashboard (Backend)

  • HeliumX is the largest healthcare digital platform in the country. This project implements the backend for an Admin Dashboard designed to automate the day-to-day management of the platform with strict role-based access control (RBAC) using Django REST Framework.

🚀 Features

  • User Management with role-based permissions
  • Newsletter System for community engagement
  • Subscription System for premium members
  • Session Booking for doctor-patient interactions
  • Support Ticket Management
  • Admin Role Management (Create, Update, Delete Admins & Assign Roles)
  • DRF-based API with secure authentication and authorization
  • Admin interface via Django admin panel

🏗️ Roles & Permissions

Role Permissions
Community Manager - Send daily newsletters
- View & modify user details
Accountant - View & modify subscription details
IT Support - Book sessions manually
- Confirm bookings
- Resolve support tickets
CEO - Full control over users and admins
- Assign roles
- Add/edit/delete users and admins
  • Unauthorized actions by any role (e.g., IT Support trying to delete users) will return a 403 Not Authorized response.

🧱 Tech Stack

  • Python 3.11+
  • Django 4.x
  • Django REST Framework
  • PostgreSQL (or any preferred database)
  • Token Authentication (DRF TokenAuth)
  • Django Admin for superuser control

🧰 Setup Instructions

  1. Clone the Repository

  2. Create and Activate Virtual Environment

    • python -m venv venv
    • source venv/bin/activate # On Windows: venv\Scripts\activate
  3. Install Dependencies

    • pip install -r requirements.txt
  4. Configure .env

    • use .env.example file as guide
  5. Run Migrations

    • python manage.py makemigrations
    • python manage.py migrate
  6. Create Superuser

    • python manage.py createsuperuser
  7. Run the Server

    • python manage.py runserver

🔐 API Authentication

  • All endpoints (except registration and login) are secured using Token Authentication.
    • Obtain token: POST /api/v1/login
    • Use token: Include in header Authorization: Token <your_token>

📁 Project Structure

    .
    ├── heliumx
    │   ├── __init__.py
    │   ├── __pycache__
    │   ├── asgi.py
    │   ├── settings.py
    │   ├── urls.py
    │   └── wsgi.py
    ├── manage.py
    ├── Procfile
    ├── README.md
    ├── requirements.txt
    ├── runtime.txt
    ├── staticfiles
    ├── users
    │   ├── __init__.py
    │   ├── __pycache__
    │   ├── admin.py
    │   ├── apps.py
    │   ├── migrations
    │   ├── models.py
    │   ├── permissions.py
    │   ├── serializers.py
    │   ├── tests.py
    │   ├── urls.py
    │   ├── utils.py
    │   └── views.py
    └── ven
        ├── bin
        ├── include
        ├── lib
        └── pyvenv.cfg

🚨 Error Handling

  • 403 Forbidden – Attempt to access a restricted resource
  • 400 Bad Request – Validation or malformed input
  • 401 Unauthorized – No valid auth token provided

📦 Future Enhancements

  • JWT-based authentication
  • Full email system integration
  • Logging & audit trails
  • Admin analytics dashboard

Let me know if you’d like me to also generate the API documentation (Swagger/OpenAPI) or sample Postman collection.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published