Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Event Management API System

This is a simple backend API for managing events, users, speakers, and registrations. Built with FastAPI, it supports user registration, event creation, RSVP tracking, and attendance recording — all stored in-memory using Python dictionaries.


🚀 Features

  • CRUD operations for Users and Events
  • Fixed Speaker list initialized on startup
  • User registration for events (only once per event)
  • Attendance marking for registered users
  • User deactivation
  • Filter for users who have attended at least one event

🧰 Technologies

  • Python 3.10+
  • FastAPI
  • Uvicorn
  • Pydantic

🛠️ Setup Instructions

1. Clone the repository

git clone https://github.com/your-username/event-management-api.git
cd event-management-api

2. Create a virtual environment and activate it

python -m venv venv
source venv/bin/activate  # On Windows use: venv\Scripts\activate

3. Install dependencies

pip install fastapi uvicorn

4. Run the application

uvicorn main:app --reload

This will start the server at:

http://127.0.0.1:8000

📘 API Documentation

FastAPI provides auto-generated docs:


🧪 Optional Seed Data

To pre-populate test data, add the following snippet to main.py after router imports:

from database import users, events, registrations
from schemas.user import User
from schemas.event import Event
from schemas.registration import Registration
from datetime import date, datetime

users[1] = User(id=1, name="Jane Doe", email="jane@example.com")
users[2] = User(id=2, name="John Smith", email="john@example.com")

events[1] = Event(id=1, title="Tech Summit", location="Lagos", date=date.today())
registrations[1] = Registration(id=1, user_id=1, event_id=1, registration_date=datetime.utcnow(), attended=True)

📂 Folder Structure

.
├── main.py
├── database.py
├── models.py
├── README.md
├── routes/
│   ├── user.py
│   ├── event.py
│   ├── speaker.py
│   └── registration.py
├── schemas/
│   ├── user.py
│   ├── event.py
│   ├── speaker.py
│   └── registration.py
└── services/
    ├── user_service.py
    ├── event_service.py
    ├── speaker_service.py
    └── registration_service.py

✅ Future Enhancements

  • Database integration with SQLAlchemy
  • Authentication & permissions
  • Admin dashboard frontend
  • Pagination & search filters

📬 License

This project is open-source and free to use under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages