Skip to content
/ core Public

This project is an APIs for comprehensive platform for managing trainees, courses, and assessments while facilitating effective communication and collaboration among trainees, mentors, and administrators. It focuses on tracking course progress and conducting evaluations.

License

Notifications You must be signed in to change notification settings

itsSauraj/core

Repository files navigation

Training Management Platform

A comprehensive platform for managing trainees, courses, and assessments while facilitating effective communication and collaboration among trainees, mentors, and administrators.

API Documentation Python Django PostgreSQL Redis Docker Docker Git AWS

Features

  • User Management (Trainees, Mentors, Administrators)
  • Course Management and Progress Tracking
  • Assessment and Evaluation System
  • Real-time Communication via WebSockets
  • Role-based Access Control
  • Soft Delete Support
  • Background Task Processing

Tech Stack

Backend

  • Python (v3.12.x)
  • Django & Django REST Framework
  • JWT Authentication
  • Django Channels (WebSocket Support)
  • Django Softdelete
  • PostgreSQL (Database)
  • Redis (Cache & Message Broker)
  • Docker & Docker Compose

Prerequisites

  • Python 3.12 or higher
  • PostgreSQL
  • Redis (for WebSocket and background tasks)
  • Docker and Docker Compose (optional)

Local Development Setup

  1. Clone the repository

    git clone <repository-url>
    cd <project-directory>
  2. Create and activate virtual environment

    python3 -m venv venv
    source venv/bin/activate  # Linux/macOS
    # or
    .\venv\Scripts\activate  # Windows
  3. Install dependencies

    pip install -r requirements.txt
  4. Environment Setup

    cp .env.example .env
    # Update .env with your configuration
  5. Database Setup

    python manage.py migrate
    python manage.py setup_permissions
    python manage.py setup_roles
  6. Run Development Server

    Standard Django Server:

    python manage.py runserver

    With WebSocket Support:

    daphne -b 0.0.0.0 -p 8000 core.asgi:application

Docker Deployment

Using Docker

  1. Build the Image

    docker build -t core-app .
  2. Run the Container

    docker run -d -p 8000:8000 --name core-app-container core-app

Using Docker Compose

  1. Start Services

    docker-compose up --build
  2. Run Migrations

    docker-compose exec web python manage.py migrate
    docker-compose exec web python manage.py setup_permissions
    docker-compose exec web python manage.py setup_roles

API Documentation

Comprehensive API documentation is available on Postman: API Documentation

Running Tests

Writing the test case in under beta

# Run all tests
pytest

# Run specific test file
pytest tests/test_file.py

# Run with coverage report
pytest --cov=.

Common Issues & Troubleshooting

  1. Database Connection Issues

    • Verify PostgreSQL is running
    • Check database credentials in .env
    • Ensure database exists
  2. WebSocket Connection Issues

    • Verify Redis is running
    • Check Redis connection settings
    • Ensure proper ASGI setup

License

This project is licensed under the MIT License - see the LICENSE.rst file for details.

About

This project is an APIs for comprehensive platform for managing trainees, courses, and assessments while facilitating effective communication and collaboration among trainees, mentors, and administrators. It focuses on tracking course progress and conducting evaluations.

Topics

Resources

License

Stars

Watchers

Forks