All projects
Backend API In development

Event Planet

An API-first event planning and management platform built with Django REST Framework: multi-stage events, validated state machine lifecycles, and type-safe dynamic EAV attributes.

My role
Sole developer
Type
Personal project
Links

Organizers create and manage multi-stage events; participants browse published events, register, submit feedback, and view results.

The project is API-first: all interactions happen through versioned endpoints (/api/v1/ and /api/v2/) documented with OpenAPI, Swagger, Redoc, and a published Postman collection.

What I did

  • State-machine event lifecycle with validated status transitions enforced in both the Django admin and the API
  • Flexible EAV data model: global Attribute definitions plus type-specific columns per event, keeping dynamic attributes type-safe
  • JWT authentication (access, refresh, and logout blacklist) alongside session login for the browsable API and Swagger
  • Role-based permissions for organizers and participants, enforced at both the permission class level and serializer validation
  • Time-range and overlap validation for event stages; stages are editable only while the event is in DRAFT status
  • Event-level registration with capacity enforcement, feedback restricted to finished events the user registered for, and organizer-published results
  • Status filtering and text search on title and description, URL path API versioning, and interactive docs with drf-spectacular
  • Docker Compose setup with PostgreSQL healthchecks, an entrypoint waiting for the database and running migrations, and split settings for dev (SQLite) and prod (PostgreSQL)

Design decisions

Event-Level Registration

Registration and capacity are handled at the whole-event level rather than per stage. For most scenarios — multi-part webinars and multi-session workshops — participants register once and attend all stages, making per-stage registration unnecessary complexity. EventStage is purely a scheduling unit.

EAV without JSONField

Attribute defines shared definitions with data types (text, integer, boolean), and EventAttributeValue stores values in one of three type-specific columns. Only one column is populated, enforced via clean() in the admin and validation in serializers.

Single Source of Truth for Transitions

Allowed state transitions live in ALLOWED_TRANSITIONS on the model itself. Event.clean() enforces them for the admin, and EventSerializer.validate() enforces them for the API since DRF does not call clean() by default.

JWT alongside Session

SimpleJWT is the primary token-based auth method; session login is also included to make the browsable API and Swagger "Authorize" flow convenient to use directly from the browser.

Event status lifecycle

  • DRAFT → PUBLISHED, CANCELLED
  • PUBLISHED → ONGOING, CLOSED, CANCELLED
  • ONGOING → FINISHED, CANCELLED
  • CLOSED → FINISHED, CANCELLED
  • FINISHED → terminal
  • CANCELLED → terminal

API groups

  • Public — list and detail of published events, stages, and published results — no authentication required
  • Participant — register for published events, view own registrations, submit and manage feedback
  • Organizer — create events and stages, manage dynamic attributes, view participants and feedback, publish results
  • Auth — signup, obtain/refresh JWT tokens, blacklist on logout, session login and logout

Testing

The test suite is written with Pytest and Factory Boy, covering access control, permissions, CRUD operations, state transitions, event stages, EAV validation, registrations, feedback, results, and user authentication. A management command built with factory_boy and Faker also generates realistic demo data.

What's next

  • Throttling on authentication and registration endpoints
  • Caching for read-heavy public endpoints
  • Consistent pagination across list endpoints
  • CI with GitHub Actions for test execution and code quality checks

Stack

  • Python
  • Django
  • Django REST Framework
  • SimpleJWT
  • django-filter
  • drf-spectacular
  • PostgreSQL
  • Docker
  • Docker Compose
  • Pytest
  • Factory Boy

More projects