FairFlow is an analytics platform for exhibitions, fairs, and branded activations. It helps teams understand how people behave inside physical spaces by converting indoor movement data into clear, decision-ready insights.
Most offline activations still rely on attendance counts, manual observation, and post-event assumptions. That creates a gap for marketing agencies and organizers: they can report presence, but not quality of engagement, intent, or visitor movement between experiences. FairFlow closes that gap by introducing a more structured way to collect and analyze behavioral data in physical venues.
Instead of stopping at footfall, FairFlow measures:
- where visitors go
- which stands retain attention
- how long they stay
- which journeys lead toward high-intent zones such as finance, booking, or VIP areas
For marketing agencies, this creates a clear competitive advantage. It allows them to deliver measurable offline intelligence, justify campaign decisions with evidence, and recommend new activation strategies based on actual visitor behavior. With the AI-powered Insight Agent, it translates these metrics into actionable answers through natural language, removing the technical friction of data exploration and allowing teams to ask complex behavioral questions without manual data pivoting.
FairFlow solves three core business problems:
- Offline activations are difficult to measure beyond attendance.
- Agencies struggle to prove the business impact of experiential campaigns.
- Organizers and exhibitors lack a reliable way to connect venue behavior to sponsor value, audience quality, and conversion intent.
The platform addresses these problems through a modern analytics workflow:
- live collection of indoor location events
- stand-level dwell and proximity inference
- reconstruction of visitor journeys across the venue
- analytics APIs and dashboards designed for operations, reporting, and strategic decision-making
- Marketing agencies that need stronger offline reporting and differentiated strategic value
- Event organizers that need proof of exhibitor performance and audience flow
- Brand and exhibitor teams that need stand-level engagement visibility
- Real-time ingestion of location events from the venue
- Session-aware visitor tracking
- Stand visit inference using configurable proximity rules
- Dwell analysis and repeat-visit measurement
- Transition analysis between stands and key destination areas
- Daily aggregate tables for fast reporting
- Dashboard views for venue overview, stand performance, and visitor journeys
- An AI-assisted analytics query interface
FairFlow is a full data pipeline that converts raw indoor location points into structured analytics products. It handles real-time ingestion, stateful session tracking, and rule-based inference for physical interactions.
While dashboards show what happened, the integrated AI Analyst explains why it matters. By providing a natural language interface over complex behavioral aggregates, stakeholders can:
- Instant Comparisons: "Compare the retention rate between the BMW Lounge and the Tesla Theater."
- Trend Detection: "Which stands saw the highest increase in repeat visitors compared to yesterday?"
- Flow Discovery: "Did people who visited the Audi Studio eventually go to the Financing Desk?" This eliminates the need for manual data exploration, allowing agencies to uncover non-obvious insights in seconds during a client meeting.
The core innovation is the conversion of physical movement into usable marketing intelligence. The system captures live events, infers visits and dwell, identifies transitions, and materializes summaries that resemble digital funnel analytics for physical spaces.
The platform separates synchronous APIs, persistent storage, background processing, and frontend reporting. That improves reliability, simplifies scaling, and keeps the analytics layer fast to consume.
Stand activity is inferred through explicit proximity and dwell rules rather than opaque heuristics. This makes the output easier to trust and easier to explain to clients or judges in a pitch setting.
The same data foundation supports:
- admin configuration and venue setup
- mobile or device-side event ingestion
- analytics dashboards
- natural-language insight queries
flowchart LR
subgraph Clients
Mobile[Mobile Tracking Client]
Admin[Admin and Operations User]
Dashboard[Analytics Dashboard]
Analyst[AI Insight User]
end
subgraph API["FastAPI Application"]
Health[Health Endpoints]
Maps[Admin and Map Configuration APIs]
Ingest[Location Ingestion API]
Analytics[Analytics APIs]
Agent[Agent Query API]
end
subgraph Workers["Background Processing"]
CeleryWorker[Celery Worker]
CeleryBeat[Celery Beat]
end
subgraph Storage
Postgres[(PostgreSQL)]
Redis[(Redis)]
Uploads[(Uploaded Map Files)]
end
Mobile --> Ingest
Admin --> Maps
Dashboard --> Analytics
Analyst --> Agent
Ingest --> Postgres
Ingest -->|visit and dwell inference| Postgres
Maps --> Postgres
Maps --> Uploads
Maps --> Redis
Redis --> CeleryWorker
CeleryBeat --> Redis
CeleryWorker --> Uploads
CeleryWorker --> Postgres
CeleryBeat --> Postgres
Analytics --> Postgres
Agent --> Postgres
- Backend: FastAPI, SQLAlchemy, Alembic, Pydantic Settings
- Data layer: PostgreSQL, Redis
- Background processing: Celery worker and Celery beat
- Frontend: Next.js, React, TypeScript, TanStack Query
- AI layer: LangChain, LangGraph, Azure OpenAI integration
- Packaging and runtime: Docker Compose
- Fair, floor, stand, calibration, and map-upload administration
- Live location-event ingestion
- Dwell and transition inference
- Analytics endpoints for overview, stand performance, transitions, and snapshots
- AI query endpoint for natural-language analytics questions
- Transactional storage for visitors, sessions, location events, stand visits, and transitions
- Serving tables for daily stand and fair aggregates
- Snapshot materialization for dashboard consumption
- Scheduled background jobs for analytics refresh
- Venue overview dashboard
- Stand performance dashboard
- Visitor journey and transition analysis
- Snapshot inspection view
- AI insight terminal
app/
api/ FastAPI routes and dependencies
core/ Settings and logging
db/ SQLAlchemy engine and session management
jobs/ Background job orchestration
models/ ORM entities
schemas/ Pydantic request and response models
services/ Dwell, analytics, map ingestion, and AI logic
tasks/ Celery task definitions
frontend/
src/app/ Next.js application routes
src/components/ Dashboard and agent UI
src/lib/ API client, hooks, constants, and shared types
scripts/
seed_tunisian_demo.py Demo seed for the showroom dataset
wait_for_db.py Database readiness helper
alembic/
versions/ Database migrations
- Docker
- Docker Compose
docker compose up -d --buildThis starts:
- PostgreSQL on
localhost:5432 - Redis on
localhost:6379 - FastAPI on
localhost:8000 - Celery worker
- Celery beat
curl http://localhost:8000/health/live
curl http://localhost:8000/health/readydocker exec out-of-brief-api-1 python scripts/seed_tunisian_demo.pycd frontend
pnpm install
pnpm devThe dashboard runs at:
http://localhost:3000
The frontend targets this backend by default:
http://localhost:8000/v1
The backend source code is copied into the Docker image during build, so Python changes require a rebuild:
docker compose up -d --build api celery-worker celery-beatIf only the API changed:
docker compose up -d --build api- Python 3.13
- PostgreSQL 16 or later
- Redis 7 or later
- Node.js 20 or later
- pnpm
python -m venv .venv
pip install -r requirements.txt
cp .env.example .env
alembic upgrade head
uvicorn app.main:app --host 0.0.0.0 --port 8000Run worker:
celery -A app.celery_app.celery_app worker --loglevel=INFORun beat:
celery -A app.celery_app.celery_app beat --loglevel=INFOSeed demo data:
python scripts/seed_tunisian_demo.pycd frontend
pnpm install
pnpm devCopy .env.example to .env and adjust values as needed.
Important variables:
DATABASE_URLREDIS_URLCELERY_BROKER_URLCELERY_RESULT_BACKENDUPLOAD_DIRAUTH_ADMIN_TOKENAUTH_MOBILE_TOKENAUTH_ANALYTICS_TOKENNEXT_PUBLIC_API_URLfor frontend override when needed
The current MVP uses simple bearer tokens mapped to roles:
admin-token-devmobile-token-devanalytics-token-dev
These roles separate:
- administration and venue configuration
- device-side event ingestion
- analytics and dashboard access
GET /health/liveGET /health/ready
POST /v1/admin/fairsPOST /v1/admin/floorsPOST /v1/admin/maps/uploadPOST /v1/admin/fairs/{fair_id}/calibrationsPOST /v1/admin/fairs/{fair_id}/standsPATCH /v1/admin/stands/{stand_id}
POST /v1/mobile/location-events
GET /v1/analytics/fairs/{fair_id}/overview?day=YYYY-MM-DDGET /v1/analytics/fairs/{fair_id}/stands/{stand_id}?day=YYYY-MM-DDGET /v1/analytics/fairs/{fair_id}/transitions?day=YYYY-MM-DDGET /v1/analytics/fairs/{fair_id}/snapshots/{day}POST /v1/analytics/fairs/{fair_id}/agent-query
The repository includes a pitch-ready showroom dataset for Tunisia Auto Showcase 2026 at Parc des Expositions du Kram.
It contains named stands such as:
- BMW Performance Lounge
- Mercedes-Benz Pavilion
- Audi Sport Studio
- Porsche Experience Bay
- Toyota Hybrid Hub
- Kia EV Garage
- Tesla Tech Theater
- Financing and Insurance Desk
- Test Drive Booking
- VIP Buyer Lounge
This dataset is designed to produce realistic:
- premium-brand comparison behavior
- EV and hybrid exploration paths
- high-intent conversion flows
- readable stand names in the dashboard instead of anonymous zone identifiers
For a live presentation, the clearest showcase sequence is:
- start with
Venue Overviewto establish traffic and engagement scale - move to
Stand Performanceto compare named exhibitors - open
Visitor Journeyto show movement between brands and conversion areas - use
Query Insightsto ask a natural-language question about dwell, transitions, or intent
Backend tests:
pytest -qFrontend lint:
cd frontend
pnpm lint