EventsAI is a chat-first event discovery and booking platform inspired by the filter flow of booking platforms like BookMyShow. Instead of clicking filters, users describe what they want in natural language and the system builds a persisted filter state per thread.
The current MVP supports:
- movie and sport discovery through chat
- persisted chat threads, messages, and filter state
- DB-backed filter resolution with LangChain mini agents
- deterministic event search against PostgreSQL
- simulated booking confirmation stored in the database
- frontend: React, TypeScript, Vite, Tailwind, shadcn components
- backend: Django, PostgreSQL, LangChain, OpenAI API
- data: seeded
movie_eventsandsport_eventstables with future-only records
.
├── backend
│ ├── apps
│ │ ├── agents
│ │ ├── bookings
│ │ ├── chats
│ │ ├── core
│ │ └── events
│ ├── config
│ ├── manage.py
│ └── requirements.txt
├── frontend
│ ├── src
│ │ ├── components
│ │ └── lib
│ └── package.json
├── start.sh # unified build + run script
├── Makefile # convenience wrapper for start.sh
└── PHASEWISE_IMPLEMENTATION_PLAN.md
Copy backend/.env.example to backend/.env and configure:
DJANGO_SECRET_KEY=replace-me
DJANGO_DEBUG=true
DJANGO_ALLOWED_HOSTS=127.0.0.1,localhost
DJANGO_CORS_ALLOWED_ORIGINS=http://127.0.0.1:5173,http://localhost:5173,http://127.0.0.1:5174,http://localhost:5174
DATABASE_URL=postgres://username:password@host:port/database?sslmode=require
OPENAI_API_KEY=replace-me
OPENAI_CHAT_MODEL=gpt-4.1-mini
OPENAI_RESOLVER_MODEL=gpt-4.1-miniCopy frontend/.env.example to frontend/.env:
VITE_API_BASE_URL=http://127.0.0.1:8000# Backend — create venv and install Python deps
cd backend
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python manage.py migrate
cd ..
# Frontend — install Node deps
cd frontend && npm install && cd ..You can skip the manual steps above if you use ./start.sh — it will bootstrap missing dependencies automatically.
The seed command resets and repopulates movie and sport catalog data with future-only events:
cd backend
.venv/bin/python manage.py seed_event_data --resetFrom the project root, run either of the following — they are equivalent:
./start.sh
# or
make startThis will:
- Install frontend dependencies if
frontend/node_modulesis missing (npm ci) - Build the React frontend (
npm run build→frontend/dist/) - Create the backend virtualenv and install Python dependencies if
backend/.venvis missing - Start the Django server at http://127.0.0.1:8000
The server now serves both the API (/api/*) and the compiled React SPA from a single origin. No separate frontend dev server is needed.
Open http://127.0.0.1:8000.
If you want frontend HMR during development, start the Vite dev server alongside Django:
./start.sh --devThis will start:
- Vite dev server at http://127.0.0.1:5173
- Django API server at http://127.0.0.1:8000
make runserver
# or
cd backend && .venv/bin/python manage.py runserverGET /api/health/GET /api/chats/threads/POST /api/chats/threads/GET /api/chats/threads/<thread_id>/POST /api/agents/chat/GET /api/bookings/POST /api/bookings/confirm/
- A user sends a message in a thread.
- The main chat flow calls DB-backed resolver tools through mini agents to normalize categorical filters.
- Temporal phrases are normalized deterministically.
- The resolved filter state is merged into the thread's saved
thread_filtersrow. - Deterministic search functions query
movie_eventsorsport_events. - The assistant responds using grounded results, not freeform invented listings.
- A booking confirmation writes to
bookingsand closes the thread into a read-only booked state.
cd backend
.venv/bin/python manage.py check
.venv/bin/python manage.py test apps.chats apps.bookings apps.agents apps.events --keepdbcd frontend
npm run lint
npm run build- no showtimes selection flow beyond the seeded event listing start time
- no seat map, payment flow, cancellation flow, or auth
- no right-side applied-filters panel yet
- no bookings page in the frontend yet, although bookings are persisted in the database
- thread ownership and multi-user support are not implemented
- LangGraph is intentionally not used yet
- add a bookings page backed by
GET /api/bookings/ - expose the current filter state in a dedicated right rail
- improve clarification behavior when the user expresses preference changes in more complex ways
- consider stronger structured traces for mini-agent reasoning in the thread metadata