Skip to content

MMenshikh/InnoEvent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

21 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

InnoEvent - Event Management Platform

InnoEvent Python Flask Docker License

A modern, full-stack event management platform with real-time seat tracking and comprehensive observability

Features β€’ Quick Start β€’ API Docs β€’ Tech Stack


πŸ“‹ About

InnoEvent is a comprehensive event management platform designed for organizations to create, manage, and register users for internal events. The platform provides real-time seat availability tracking, user management, and complete observability with structured logging and metrics collection.

Built with FastAPI (backend) and Flask (frontend), InnoEvent demonstrates modern web development practices including RESTful API design, database management, and production-ready observability.


✨ Features

  • πŸ‘€ User Management

    • User registration and authentication
    • Profile management
    • User activity tracking
  • πŸ“… Event Management

    • Create, read, update, and delete events
    • Support for multiple event types (Meetup, Conference, Concert)
    • Real-time seat availability tracking
    • Event organization and filtering
  • πŸ“ Event Registration

    • Register/unregister for events
    • Real-time seat capacity management
    • Prevent double registration
    • View registration history
  • πŸ“Š Observability & Monitoring

    • Structured JSON logging (app.log, errors.log)
    • Application metrics collection (/metrics endpoint)
    • Health checks (/health, /health/detailed)
    • Request performance tracking
    • Error rate monitoring
  • 🎨 User Interface

    • Modern, responsive design
    • Montserrat font styling
    • Intuitive event browsing and registration
    • Real-time UI updates
  • 🐳 DevOps Ready

    • Docker and Docker Compose support
    • Easy local and production deployment
    • Quick start script (run.bat for Windows)

πŸ—οΈ Architecture

InnoEvent/
β”œβ”€β”€ backend/                    # FastAPI Backend
β”‚   β”œβ”€β”€ main.py                # FastAPI application
β”‚   β”œβ”€β”€ models.py              # SQLAlchemy database models
β”‚   β”œβ”€β”€ schemas.py             # Pydantic validation schemas
β”‚   β”œβ”€β”€ crud.py                # Database CRUD operations
β”‚   β”œβ”€β”€ database.py            # Database configuration
β”‚   β”œβ”€β”€ logging_config.py      # Structured logging setup
β”‚   β”œβ”€β”€ metrics.py             # Application metrics
β”‚   β”œβ”€β”€ requirements.txt       # Python dependencies
β”‚   β”œβ”€β”€ Dockerfile             # Backend container
β”‚   └── innoevent.db           # SQLite database
β”‚
β”œβ”€β”€ frontend/                   # Flask Frontend
β”‚   β”œβ”€β”€ app.py                 # Flask application
β”‚   β”œβ”€β”€ index.html             # Main HTML template
β”‚   β”œβ”€β”€ script.js              # Frontend logic
β”‚   β”œβ”€β”€ style.css              # Styling (Montserrat)
β”‚   β”œβ”€β”€ requirements.txt       # Python dependencies
β”‚   β”œβ”€β”€ Dockerfile             # Frontend container
β”‚   β”œβ”€β”€ background.png         # Background image
β”‚   └── logo.png               # Application logo
β”‚
β”œβ”€β”€ db/                        # Database Configuration
β”‚   β”œβ”€β”€ Dockerfile
β”‚   └── init.sql
β”‚
β”œβ”€β”€ docker-compose.yml         # Docker orchestration
β”œβ”€β”€ run.bat                    # Windows quick start
└── README.md                  # This file

Database Schema

-- Users Table
CREATE TABLE users (
    id INTEGER PRIMARY KEY,
    surname VARCHAR(100) NOT NULL,
    name VARCHAR(100) NOT NULL,
    email VARCHAR(100) UNIQUE,
    phone VARCHAR(20),
    password VARCHAR(255) NOT NULL,
    created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);

-- Events Table
CREATE TABLE events (
    id INTEGER PRIMARY KEY,
    title VARCHAR(200) NOT NULL,
    description TEXT,
    event_type VARCHAR(50) NOT NULL,
    event_date DATETIME NOT NULL,
    location VARCHAR(200),
    total_seats INTEGER NOT NULL,
    available_seats INTEGER NOT NULL,
    organizer_id INTEGER NOT NULL,
    created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
    FOREIGN KEY (organizer_id) REFERENCES users(id)
);

-- Registrations Table
CREATE TABLE registrations (
    id INTEGER PRIMARY KEY,
    user_id INTEGER NOT NULL,
    event_id INTEGER NOT NULL,
    registered_at DATETIME DEFAULT CURRENT_TIMESTAMP,
    FOREIGN KEY (user_id) REFERENCES users(id),
    FOREIGN KEY (event_id) REFERENCES events(id)
);

πŸš€ Quick Start

Prerequisites

  • Python 3.8 or higher
  • pip package manager
  • Git
  • Docker & Docker Compose (optional, for containerized deployment)

Option 1: Windows Quick Start (Recommended)

cd InnoEvent
run.bat

This automatically:

  1. Creates virtual environments
  2. Installs dependencies
  3. Starts both frontend and backend servers

Option 2: Manual Setup

Backend Setup

# Navigate to backend directory
cd backend

# Create virtual environment
python -m venv venv

# Activate virtual environment
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Run the backend server
python main.py

Backend URL: http://localhost:8000

Frontend Setup (in a new terminal)

# Navigate to frontend directory
cd frontend

# Create virtual environment
python -m venv venv

# Activate virtual environment
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Run the frontend server
python app.py

Frontend URL: http://localhost:3000


Option 3: Docker Compose Deployment

docker-compose up --build

Services:


πŸ“š API Documentation

Base URL

http://localhost:8000/api

Authentication Endpoints

Register New User

POST /auth/register
Content-Type: application/json

{
  "surname": "Menshikh",
  "name": "Maksim",
  "email": "maksim@example.com",
  "phone": "+1234567890",
  "password": "password123"
}

Response: 201 Created
{
  "id": 1,
  "surname": "Menshikh",
  "name": "Maksim",
  "email": "maksim@example.com",
  "phone": "+1234567890",
  "created_at": "2025-11-28T07:00:00"
}

User Login

POST /auth/login
Content-Type: application/x-www-form-urlencoded

email=maksim@example.com&password=password123

Response: 200 OK
{
  "id": 1,
  "surname": "Menshikh",
  "name": "Maksim",
  "email": "maksim@example.com",
  "phone": "+1234567890",
  "created_at": "2025-11-28T07:00:00"
}

Event Endpoints

List All Events

GET /events
GET /events?event_type=Meetup

Response: 200 OK
[
  {
    "id": 1,
    "title": "Python Meetup",
    "description": "Monthly Python developers meetup",
    "event_type": "Meetup",
    "event_date": "2025-11-30T18:00:00",
    "location": "Tech Hub, Room 101",
    "total_seats": 50,
    "available_seats": 35,
    "organizer_id": 1,
    "created_at": "2025-11-28T07:00:00"
  }
]

Create Event

POST /events?organizer_id=1
Content-Type: application/json

{
  "title": "AI Conference 2025",
  "description": "Annual artificial intelligence conference",
  "event_type": "Conference",
  "event_date": "2025-12-10T09:00:00",
  "location": "Convention Center",
  "total_seats": 500
}

Response: 200 OK
{
  "id": 2,
  "title": "AI Conference 2025",
  "description": "Annual artificial intelligence conference",
  "event_type": "Conference",
  "event_date": "2025-12-10T09:00:00",
  "location": "Convention Center",
  "total_seats": 500,
  "available_seats": 500,
  "organizer_id": 1,
  "created_at": "2025-11-28T07:30:00"
}

Update Event

PUT /events/1
Content-Type: application/json

{
  "total_seats": 60,
  "available_seats": 45
}

Response: 200 OK

Delete Event

DELETE /events/1

Response: 204 No Content

Registration Endpoints

Register for Event

POST /registrations?user_id=1
Content-Type: application/json

{
  "event_id": 1
}

Response: 201 Created
{
  "id": 1,
  "user_id": 1,
  "event_id": 1,
  "registered_at": "2025-11-28T08:00:00"
}

Get User Registrations

GET /registrations/user/1

Response: 200 OK
[
  {
    "id": 1,
    "user_id": 1,
    "event_id": 1,
    "registered_at": "2025-11-28T08:00:00",
    "event": { /* event object */ }
  }
]

Cancel Registration

DELETE /registrations/1

Response: 204 No Content

Monitoring Endpoints

Health Check

GET /health

Response: 200 OK
{
  "status": "ok",
  "timestamp": "2025-11-28T08:15:00.123456",
  "service": "InnoEvent API"
}

Detailed Health Check

GET /health/detailed

Response: 200 OK
{
  "status": "healthy",
  "timestamp": "2025-11-28T08:15:00.123456",
  "service": "InnoEvent API",
  "version": "1.0.0",
  "metrics": { /* metrics object */ }
}

Application Metrics

GET /metrics

Response: 200 OK
{
  "uptime_seconds": 3600.5,
  "total_requests": 2500,
  "total_errors": 15,
  "error_rate": 0.6,
  "total_registrations": 342,
  "avg_response_time_ms": 45.3,
  "requests_by_endpoint": {
    "/api/events": 1200,
    "/api/registrations": 800
  },
  "errors_by_type": {
    "404": 8,
    "400": 5,
    "500": 2
  },
  "timestamp": "2025-11-28T08:15:00.123456"
}

Full API Documentation

Interactive API documentation available at:

http://localhost:8000/docs

πŸ“Š Logging & Observability

Logging Configuration

Logs are stored in backend/logs/ directory:

  • app.log - JSON structured logs of all application events
  • errors.log - Error-level logs only

Log Format Example

{
  "timestamp": "2025-11-28T08:15:30.123456",
  "level": "INFO",
  "logger": "innoevent",
  "message": "User registered for event",
  "module": "crud",
  "function": "register_user_for_event",
  "line": 245
}

Metrics Collection

The application tracks:

  • Request Metrics - Total requests, requests by endpoint
  • Error Metrics - Error count, error rate, errors by type
  • Performance Metrics - Average response time, response times by request
  • System Metrics - Uptime, application start time
  • Business Metrics - Total registrations, total events created

Access metrics: GET /metrics


πŸ› οΈ Technology Stack

Backend

  • Framework: FastAPI 0.104.1 (Python web framework)
  • Database: SQLite with SQLAlchemy ORM
  • Validation: Pydantic v2
  • API Server: Uvicorn
  • Logging: Python Logging with JSON formatting
  • Monitoring: Custom metrics collection

Frontend

  • Framework: Flask 3.0.0
  • Template: HTML5 with Jinja2
  • Styling: CSS3 with Montserrat font
  • Scripting: Vanilla JavaScript (ES6+)
  • Client-side routing: Custom JavaScript
  • HTTP Client: Fetch API

DevOps

  • Containerization: Docker
  • Orchestration: Docker Compose
  • Version Control: Git & GitHub

Development Tools

  • Package Management: pip
  • Virtual Environments: venv
  • Testing: Manual testing via Swagger UI

πŸ“„ License

MIT License


πŸ‘₯ Contributing

For questions or suggestions, please contact the development team.


πŸ“ž Support & Contact

For issues or feature requests:

  1. Check existing GitHub issues
  2. Contact the development team

Back to top

Last Updated: November 28, 2025 | Version: 1.0.0

About

Event Management Platform - FastAPI + Flask

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors