Skip to content

Django REST Backend API for PedMonie, A cutting-edge payment integration plaform designed to simplify and optimize payments for both businesses and individual users.

Notifications You must be signed in to change notification settings

InternPulse/pedmonie-django-backend

Repository files navigation

Pedmonie Django Backend API

Project Overview

PedMonie – Payment Integration App

PedMonie is a Django-based payment integration app that leverages the Django REST Framework, built-in authentication, and JWT for secure API authentication. It provides a structured API with endpoints across multiple apps:

  • Authentication – User registration, login, and JWT-based authentication.
  • Dashboard – User and admin dashboards for transaction insights.
  • Orders – Order creation, tracking, and management.
  • Payments – Payment processing, transaction history, and status tracking.
  • Support – Customer support ticketing and inquiry handling.
  • Wallets – Digital wallet management, fund transfers, and balance tracking.

PedMonie ensures seamless payment handling with secure authentication and robust API endpoints for a smooth financial experience.

Live Link

API Live Demo

Documentation Link

Postman API Documentation here.


Installation Instructions

Prerequisites

Ensure the following tools are installed:

  • Python (>= 3.9 recommended)
  • pip (Python package manager)
  • Git
  • Virtual environment tool (e.g., venv or virtualenv)
  • MySQL

How to Run the API Locally

  1. Clone the repository:

    git clone https://github.com/InternPulse/pedmonie-django-backend.git
    cd pedmonie-django-backend
  2. Set up a virtual environment:

    Windows:

    python -m venv venv
    .\venv\Scripts\activate

    macOS/Linux:

    python -m venv venv
    source venv/bin/activate
  3. Install dependencies:

    pip install -r requirements.txt
  4. Set up the database:

    python manage.py migrate
  5. Create a superuser

    python manage.py createsuperuser
  6. Start the server:

    python manage.py runserver

    The API will be available at http://127.0.0.1:8000.


Features

  • Advanced Analytics: Provides insights into key performance metrics.
  • REST API: Enables querying and managing analytics data.
  • Filters: Supports filtering by dates, products, and profitability.
  • Data Aggregation: Converts raw data into actionable insights.
  • Reporting: Offers downloadable and visual reports.

Usage

  • Access the API locally at http://127.0.0.1:8000/ or via the Live Link.
  • Test endpoints using tools like Postman, cURL, or other API testing utilities.
  • Refer to the API Documentation for detailed instructions.

API Endpoints

Base URL: http://127.0.0.1:8000/api/v1/

Endpoint Method Description
/financial/analytics/ GET Fetch all financial analytics records.
/financial/analytics/top_products/ GET Get top products by profitability.
/financial/analytics/?year=2022 GET Filter analytics by year.
/financial/analytics/?start_date=YYYY-MM-DD&end_date=YYYY-MM-DD GET Filter analytics by date range.
/financial/analytics/profit_records/ GET Fetch records with profit only.
/financial/analytics/selling_at_loss/ GET Fetch records with losses only.

For a comprehensive list, refer to the API Documentation.


Project Structure

renergy-hub-django-backend/
├── analytics_service/
│   ├── sales_performance/      # Sales Performance Analytics
│   ├── product_performance/    # Product Performance Analytics
│   ├── marketing_conversion/   # Marketing Analytics
│   ├── profitability_financial/ # Financial Analytics
│   ├── shared/                 # Shared utilities and helpers
├── manage.py                   # Django entry point
├── requirements.txt            # Python dependencies
└── ...

Environment Variables

Create a .env file in the root directory with the following keys:

SECRET_KEY=your-secret-key
DEBUG=True
ALLOWED_HOSTS=127.0.0.1,localhost

# PostgreSQL
DB_NAME=your_db_name
DB_USER=your_db_user
DB_PASSWORD=your_db_password
DB_HOST=your_db_host
DB_PORT=5432

Contributions

Contributions are welcome! If you’re interested:

  1. Create an issue or comment on the repository to let others know what you're working on to avoid overlapping efforts.
  2. Follow the steps outlined below to contribute.

Contribution Guidelines

  1. Clone the repository:

    git clone https://github.com/InternPulse/renergy-hub-django-backend.git
  2. Set the origin branch:

    git remote add origin https://github.com/InternPulse/renergy-hub-django-backend.git
    git pull origin dev
  3. Create a new branch for your task:

    git checkout -b BA-001/Feat/Sign-Up-Form
  4. Make your changes and commit:

    git add .
    git commit -m "your commit message"
  5. Sync with the dev branch to avoid conflicts:

    git pull origin dev
  6. Push your branch:

    git push -u origin BA-001/Feat/Sign-Up-Form
  7. Create a pull request to the dev branch. Ensure the PR description is clear and includes test instructions.


Commit Standards and Guidelines

Commit Cheat Sheet

Type Description
feat Features: A new feature
fix Bug Fixes: A bug fix
docs Documentation: Documentation-only changes
style Styles: Formatting or cosmetic changes
refactor Code Refactoring: Neither fixes a bug nor adds a feature
perf Performance: Optimizes performance
test Tests: Adding or updating tests
build Builds: Changes to build tools or dependencies
ci CI: Updates to CI configurations
chore Chores: Maintenance or configuration tasks
revert Reverts: Reverts a previous commit

Sample Commit Messages

  • chore: Update README file – Maintenance task.
  • feat: Add user registration endpoint – New feature added.

License

This project is licensed under the MIT License.

About

Django REST Backend API for PedMonie, A cutting-edge payment integration plaform designed to simplify and optimize payments for both businesses and individual users.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 10