Skip to content

XtzZZZ/Berlin-Hackathon-MonoRepo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

37 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AI-Powered Event Discovery Platform

🎯 Project Vision

An intelligent event discovery platform that learns user preferences through calibration and recommends personalized events using vector similarity search. The system combines modern AI embeddings with a seamless user experience to help people discover events they'll love.

πŸš€ Getting Started

Quick Start (Recommended)

We provide a convenient development script that manages the entire stack:

# 1. Verify all prerequisites are installed
./dev.sh verify

# 2. Start frontend and backend
./dev.sh run

# 3. (Optional) Seed the database with event data if needed
./dev.sh ingest

Available commands:

  • ./dev.sh verify - Check all required software is installed
  • ./dev.sh run - Start backend (port 5266) + frontend (port 5173)
  • ./dev.sh stop - Stop all running services
  • ./dev.sh ingest - Seed Weaviate database with events (optional, data already seeded)
  • ./dev.sh clean - Clean all build artifacts
  • ./dev.sh help - Show all commands

Prerequisites

Required Software

  • Node.js 18+ (for frontend) - Download or brew install node
  • .NET 9.0 (for backend) - Download or brew install --cask dotnet-sdk
  • Java 17+ (for ingestion) - Usually pre-installed

Required API Keys

You'll need to create a .env file in backend/TravelAgent/:

# Copy the template
cp backend/TravelAgent/.env.template backend/TravelAgent/.env

# Then edit backend/TravelAgent/.env and add your credentials:
# - OpenAI API Key from https://platform.openai.com/api-keys
# - Weaviate Cloud Instance from https://console.weaviate.cloud
# - RapidAPI Key (optional) from https://rapidapi.com/apidojo/api/booking-com

Note: Both backend and ingestion share the same .env file located in backend/TravelAgent/.env

Migration: If you have an existing ingestion/.env file, you can delete it. The ingestion component now uses the backend's .env file.

Manual Setup (Alternative)

If you prefer to run components individually:

1. Create Shared Configuration

First, create the .env file that both backend and ingestion will use:

cd backend/TravelAgent

# Create .env file with your credentials:
cat > .env << EOF
WEAVIATE_HOST=https://your-cluster.weaviate.network
WEAVIATE_API_KEY=your-weaviate-api-key
OPENAI_API_KEY=your-openai-api-key
OPENAI_EMBED_MODEL=text-embedding-3-large
RAPIDAPI_KEY=your-rapidapi-key
RAPIDAPI_HOST=booking-com.p.rapidapi.com
EOF

cd ../..

2. Setup Ingestion Pipeline

cd ingestion

# Build
./gradlew shadowJar

# Seed database with events (uses backend's .env)
./run.sh seed_calibration  # 15 calibration events
./run.sh seed_real         # 83 real events

# Optional: Test recommendations
./run.sh load_personas
./run.sh recommend

cd ..

3. Setup Backend

cd backend/TravelAgent

# .env file already created in step 1

# Restore dependencies
dotnet restore

# Run backend (with git workaround for newer git versions)
EnableSourceControlManagerQueries=false dotnet run

# Backend will start on http://localhost:5266

4. Setup Frontend

cd frontend

# 1. Install dependencies
npm install

# 2. Run development server
npm run dev

# Frontend will start on http://localhost:5173

🀝 Partner Technologies

Weaviate - Vector Database

Stores 100 objects with 1536-dimensional vectors across 3 collections. Enables semantic search for personalized recommendations.

Weaviate Cloud Dashboard

Collections: CalibrationEvent (15 objects), Event (83 objects), Persona (2 objects)

OpenAI - AI Embeddings

Generates embeddings using text-embedding-3-large model. All 98 events vectorized for semantic understanding.

Aikido - Security Monitoring

Continuous security scanning and vulnerability detection. Dashboard shows active monitoring:

Aikido Security Dashboard

7 security issues detected and tracked, including DoS vulnerabilities and code quality checks.

πŸ—οΈ Architecture: Monorepo Structure

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   BERLIN HACKATHON MONOREPO                              β”‚
β”‚                                                                          β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚                        FRONTEND                                     β”‚ β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                                      β”‚ β”‚
β”‚  β”‚  β”‚ 1. Onboarding            β”‚                                      β”‚ β”‚
β”‚  β”‚  β”‚ 2. Calibration Flow      β”‚                                      β”‚ β”‚
β”‚  β”‚  β”‚ 3. Like/Dislike Events   β”‚                                      β”‚ β”‚
β”‚  β”‚  β”‚ 4. Fetch Recommendations │◄──────────┐                          β”‚ β”‚
β”‚  β”‚  β”‚ 5. Event Details         β”‚           β”‚                          β”‚ β”‚
β”‚  β”‚  β”‚ 6. Travel & Booking      β”‚           β”‚                          β”‚ β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β”‚                          β”‚ β”‚
β”‚  β”‚                                          β”‚                          β”‚ β”‚
β”‚  β”‚  Tech: React/Next.js, TypeScript        β”‚                          β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚                                             β”‚                            β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚                        BACKEND                                      β”‚ β”‚
β”‚  β”‚                                          β”‚                          β”‚ β”‚
β”‚  β”‚  ASP.NET Core API                       β”‚                          β”‚ β”‚
β”‚  β”‚  - Event endpoints                      β”‚                          β”‚ β”‚
β”‚  β”‚  - Recommendation logic                 β”‚                          β”‚ β”‚
β”‚  β”‚  - Weaviate integration                 β”‚                          β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚                                             β”‚                            β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚                       INGESTION                                     β”‚ β”‚
β”‚  β”‚                                          β”‚                          β”‚ β”‚
β”‚  β”‚  Event Data Pipeline (Java)             β”‚                          β”‚ β”‚
β”‚  β”‚  - Generate event data                  β”‚                          β”‚ β”‚
β”‚  β”‚  - Create OpenAI embeddings             β”‚                          β”‚ β”‚
β”‚  β”‚  - Seed Weaviate database               β”‚                          β”‚ β”‚
β”‚  β”‚  - Test recommendation engine           β”‚                          β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚                                             β”‚                            β”‚
β”‚                                             β–Ό                            β”‚
β”‚                   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                      β”‚
β”‚                   β”‚     WEAVIATE VECTOR DB       β”‚                      β”‚
β”‚                   β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚                      β”‚
β”‚                   β”‚  β”‚ CalibrationEvent       β”‚  β”‚                      β”‚
β”‚                   β”‚  β”‚ Event (Real Events)    β”‚  β”‚                      β”‚
β”‚                   β”‚  β”‚ Persona (User Prefs)   β”‚  β”‚                      β”‚
β”‚                   β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚                      β”‚
β”‚                   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                      β”‚
β”‚                                                                          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“¦ Monorepo Structure

This repository contains three main components:

/frontend - User-Facing Application

Purpose: Complete user experience and application logic

Responsibilities:

  • User onboarding and authentication
  • Calibration flow (showing sample events)
  • Collecting user feedback (likes/dislikes)
  • Querying Weaviate for personalized recommendations
  • Displaying event details with travel and booking options
  • Full UI/UX implementation

Tech Stack: React/Next.js, TypeScript, TailwindCSS, Weaviate Client

/backend - API Layer

Purpose: Backend API and business logic

Responsibilities:

  • RESTful API endpoints
  • Event data management
  • Recommendation logic
  • Weaviate database integration
  • Authentication and authorization

Tech Stack: ASP.NET Core, C#

/ingestion - Data Pipeline

Purpose: Event data ingestion and testing infrastructure

Responsibilities:

  • Generate realistic event data (simulating event providers like StubHub)
  • Create OpenAI embeddings for all events
  • Seed Weaviate database with vectorized events
  • Test persona creation and recommendation logic
  • Validate vector similarity search

Tech Stack: Java 17, Gradle, Weaviate Client, OpenAI API

Why separate: In production, this would be replaced by real event provider APIs. For the hackathon, we needed to generate realistic test data. This component also contains testing utilities to verify the recommendation engine works correctly.

πŸ”„ Complete User Flow

Phase 1: Calibration (Frontend)

  1. User signs up and starts onboarding
  2. System shows 15 calibration events from various categories
  3. User likes/dislikes events to express preferences
  4. Frontend sends feedback to create user persona vector

Phase 2: Recommendation (Frontend + Backend + Ingestion Data)

  1. Frontend queries Weaviate Event collection with user's persona vector
  2. Vector similarity search returns top matching events
  3. User browses personalized recommendations
  4. User clicks event to see details

Phase 3: Booking (Frontend)

  1. System generates travel itinerary
  2. Shows booking options (flights, hotels, tickets)
  3. User can proceed to book

πŸ› οΈ Technology Stack

Partner Technologies

  • Weaviate: Vector database for semantic search and recommendations
  • OpenAI: text-embedding-3-large model for event embeddings
  • Aikido: Security and monitoring

Frontend

  • React/Next.js: Modern web framework
  • TypeScript: Type-safe development
  • TailwindCSS: Styling
  • Weaviate Client: Direct database queries

Backend

  • ASP.NET Core: Web API framework
  • C#: Primary language

Ingestion Pipeline

  • Java 17: Core application language
  • Gradle: Build and dependency management
  • Jackson: JSON processing
  • OkHttp: HTTP client for OpenAI API

🧠 How the AI Works

Vector Embeddings

Each event is converted to a 1536-dimensional vector using OpenAI:

Input: "Coldplay World Tour. Stadium concert by Coldplay... City: Munich. Category: Music."
Output: [0.023, -0.145, 0.089, ..., 0.234] (1536 numbers)

Persona Vector Computation

User preferences are learned from calibration feedback:

likesMean = average(vectors of liked events)
dislikesMean = average(vectors of disliked events)
personaVector = normalize(likesMean - 0.5 Γ— dislikesMean)

Recommendation Query

Find events with vectors most similar to personaVector
Using cosine similarity distance
Return top 5 matches

πŸ“Š Data Flow

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Event Data Files    β”‚
β”‚ (JSON)              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚
           β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Ingestion Pipeline  β”‚
β”‚ - Generate vectors  β”‚
β”‚ - Normalize         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚
           β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Weaviate DB         β”‚
β”‚ - Store events      β”‚
β”‚ - Store vectors     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚
           β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Backend API         β”‚
β”‚ - Query by vector   β”‚
β”‚ - Business logic    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚
           β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Frontend App        β”‚
β”‚ - Display results   β”‚
β”‚ - User interaction  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🎯 Key Features

1. Intelligent Calibration

  • 15 diverse events across categories (Sports, Music, Culture, Festivals)
  • Learns user preferences through simple like/dislike interactions
  • No complex forms or questionnaires

2. Vector-Based Recommendations

  • Semantic understanding of event content
  • Goes beyond keyword matching
  • Discovers events similar in meaning and context

3. Personalized Results

  • Each user gets unique recommendations
  • Learns from both positive and negative feedback
  • Balances liked attributes while avoiding disliked ones

4. Complete Journey

  • From discovery to booking
  • Travel planning integrated
  • Seamless user experience

πŸ“ Repository Structure

Berlin-Hackathon-MonoRepo/
β”œβ”€β”€ frontend/                       # User-facing application
β”‚   β”œβ”€β”€ components/                 # React components
β”‚   β”œβ”€β”€ pages/                      # Application pages
β”‚   └── lib/                        # Weaviate client
β”‚
β”œβ”€β”€ backend/                        # ASP.NET Core API
β”‚   β”œβ”€β”€ Controllers/                # API endpoints
β”‚   β”œβ”€β”€ Services/                   # Business logic
β”‚   └── Models/                     # Data models
β”‚
└── ingestion/                      # Event data pipeline
    β”œβ”€β”€ src/main/java/com/example/trips/
    β”‚   β”œβ”€β”€ App.java                # CLI entry point
    β”‚   β”œβ”€β”€ EmbeddingService.java   # OpenAI integration
    β”‚   β”œβ”€β”€ WeaviateClientWrapper.java  # Database operations
    β”‚   β”œβ”€β”€ Seeder.java             # Event ingestion
    β”‚   β”œβ”€β”€ Personas.java           # Persona vector computation
    β”‚   └── Recommender.java        # Recommendation logic
    β”œβ”€β”€ data/
    β”‚   β”œβ”€β”€ calibration_events.json # 15 training events
    β”‚   β”œβ”€β”€ real_events.json        # 83 recommendation events
    β”‚   └── calibration_feedback.json # Test persona preferences
    β”œβ”€β”€ build.gradle                # Dependencies
    β”œβ”€β”€ run.sh                      # Convenience script
    └── run-all.sh                  # Full pipeline script

πŸ§ͺ Testing the Ingestion Pipeline

The ingestion component includes testing infrastructure to validate the recommendation engine:

Available Commands

cd ingestion

# Seed calibration events (15 events for user training)
./run.sh seed_calibration

# Seed real events (83 events for recommendations)
./run.sh seed_real

# Load test personas from feedback data
./run.sh load_personas

# Generate recommendations for test personas
./run.sh recommend

# Run complete pipeline
./run-all.sh

Test Personas

  • Liam: Likes sports, music festivals, cultural events
  • Sophie: Likes marathons, fashion, arts, indie culture

These commands verify:

  • βœ… Events are vectorized correctly
  • βœ… Persona vectors are computed accurately
  • βœ… Vector similarity search returns relevant results
  • βœ… The entire pipeline works end-to-end

πŸŽ“ For Judges: Key Takeaways

  1. Monorepo architecture: Frontend, backend, and data pipeline unified in one repository
  2. Production-minded: Ingestion pipeline simulates real event providers for hackathon demo
  3. AI-powered: Uses OpenAI embeddings and vector similarity for intelligent recommendations
  4. Complete solution: From onboarding to booking, full user journey implemented
  5. Testable: Ingestion includes testing infrastructure to validate recommendation quality
  6. Scalable: Architecture ready for production deployment with real data sources

The monorepo structure provides clear separation of concerns while keeping all components together for easy development and deployment.


Repository: https://github.com/XtzZZZ/Berlin-Hackathon-MonoRepo

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors