A web application that continuously evolves its UI/UX based on real-time customer behavior analysis.
We welcome contributions! Please follow these steps to contribute:
- Fork the Repository: Create a fork of this repository to your own GitHub account.
- Clone Locally: Clone your fork to your local machine.
git clone https://github.com/YOUR_USERNAME/uofthacks-2026.git cd uofthacks-2026 - Create a Branch: Create a new branch for your feature or fix.
git checkout -b feature/amazing-feature # or git checkout -b fix/critical-bug - Make Changes: Implement your changes. Ensure you follow the project's coding style and structure.
- Run Tests: Verify that your changes don't break existing functionality.
- See Running Tests section below.
- Commit Changes: Commit your changes with clear, descriptive messages.
git commit -m "feat: Add new tracking module" - Push and PR: Push to your fork and submit a Pull Request to the
mainbranch of this repository.
- Frontend: Follow React best practices. Use functional components and hooks.
- Backend: Follow PEP 8 guidelines for Python code.
- Commits: improved conventional commits are preferred (e.g.,
feat:,fix:,docs:,chore:).
# Start all infrastructure services
docker-compose up redis mongodb -d
# Verify services are running
docker psPrerequisites:
- Python 3.11+
- Node.js 18+
- Redis running on
localhost:6379 - MongoDB running on
localhost:27017
# 1. Backend Setup
cd backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
# Start backend server
venv/bin/uvicorn app.main:app --reload
# 2. Frontend Setup (new terminal)
cd frontend
npm install
npm run dev# Build and start all services (frontend, backend, workers, redis, mongodb, redpanda)
docker-compose up -d
# View logs
docker-compose logs -f backend# Backend unit tests
cd backend
PYTHONPATH=. venv/bin/python -m pytest tests/ -v
# E2E Pipeline test
PYTHONPATH=. venv/bin/python scripts/test_pipeline_e2e.pyβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β FRONTEND (React) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Tracking Layer Schema Renderer Realtime β
β βββββββββββββββ ββββββββββββββββ βββββββββββββββ β
β β Mouse/Touch βββββββββΆβ JSON Layout ββββββββ WebSocket β β
β β Scroll/Int β β β Components β β / SSE β β
β βββββββββββββββ ββββββββββββββββ βββββββββββββββ β
ββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββ²βββββββββββ
β Events β Layout
βΌ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β BACKEND (FastAPI) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β POST /telemetry/events βββΆ Pipeline βββΆ Layout Schema β
β β β
β βββββββββββββββββΌββββββββββββββββ β
β βΌ βΌ βΌ β
β Redis MongoDB Vector DB β
β (session) (cold store) (pref drift) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
See AGENTS.md for detailed agent architecture.
βββ frontend/ # React + Vite application
β βββ src/tracking/ # Telemetry trackers (mouse, scroll, interactions)
β βββ src/modules/ # UI component modules
β βββ src/schema/ # Schema-driven rendering
βββ backend/ # FastAPI server
β βββ app/api/ # REST endpoints
β βββ app/pipeline/ # Data processing pipeline
β βββ app/models/ # Pydantic models
β βββ app/db/ # DB clients (Redis, MongoDB, Vector)
βββ common/ # Shared docker configs and logs
βββ docker-compose.yml # Container orchestration
βββ AGENTS.md # Agent architecture documentation
Copy .env.example to .env and configure:
cp .env.example .env| Variable | Description | Default |
|---|---|---|
OPENAI_API_KEY |
OpenAI API key for LLM agents | Required |
REDIS_URL |
Redis connection string | redis://localhost:6379 |
MONGODB_URL |
MongoDB connection string | mongodb://localhost:27017 |
MONGODB_DB |
MongoDB database name | uofthacks |
| Endpoint | Method | Description |
|---|---|---|
/telemetry/events |
POST | Receive batched telemetry events |
/health |
GET | Health check |
/stream/{session_id} |
GET | SSE layout updates |
/ws/{session_id} |
WebSocket | Real-time bidirectional |
See LICENSE.md