Skip to content

Latest commit

 

History

History
89 lines (67 loc) · 3.13 KB

File metadata and controls

89 lines (67 loc) · 3.13 KB

Event Management System

This is a robust, RESTful backend for an event management system built with Django and Django REST Framework (DRF), containerized using Docker. This API provides endpoints to manage events and categories, designed for integration with any frontend framework

Features

  • Event CRUD: Create, read, update, and delete events with details like name, category, dates, priority, and location.
  • Category Management: Full CRUD operations for event categories.
  • RESTful API: Exposes endpoints for seamless frontend integration.
  • Database: Powered by PostgreSQL for reliable storage.
  • Containerization: Dockerized for easy deployment and scalability.

Tech Stack

  • Backend: Django, Django REST Framework
  • Database: PostgreSQL
  • Containerization: Docker, Docker Compose
  • Python Version: 3.10.12

Prerequisites

  • Docker and Docker Compose installed
  • Python 3.10+ (for local development outside Docker)
  • PostgreSQL (if running locally without Docker)

Setup and Installation

Using Docker:

  1. CLone the Repo:
    https://github.com/alexander784/Events.git
    cd Events
  2. Configure Databse Environment:

In your settings file:

DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql',
'NAME': 'name',
'PASSWORD':'pass',
'USER':'user',
'HOST':'127.0.0.1',
'PORT':'5432' } }

  1. Build and Run::
    docker-compose --build:
  • Run:
    docker-compose- up:

  • API Available at :
    http://localhost:8000:

  1. Appy Migrations::
    docker-compose exec web python manage.py migrate:
  2. Stop APplication::
    docker-compose down:

API Endpoints

alt text

Endpoint Method Description
/auth/register/ POST Create a new user
/auth/login/ POST create a JWT by passing a valid user in the post request to this endpoint
/auth/logout/ GET Logout a user
/token/refresh/ POST generate a new JWT once the lifetime of the previously generated one expires
/events/categories/delete/<id>/ DELETE Delete a category
/events/categories/<id>/events/ GET List events in a category
/events/events/chart/ GET Get pending event counts

Usage

  • Create an Event: Send a POST request to /events/create/ with JSON data (e.g., {"name": "Sciencecongress", "category_id": 1, ...}).

  • View Categories: Fetch /categories/ to retrieve all categories in JSON format.

Contributing

  1. Fork the repository.
  2. Create a feature branch (git checkout -b feature/your-feature).
  3. Commit changes (git commit -m "Add feature").
  4. Push to the branch (git push origin feature/your-feature).
  5. Open a pull request.

License

This project is licensed under MIT License