What inspired us ?
“On every college campus, millions of dollars’ worth of usable items sit unused — books, chairs, gadgets, clothes — simply because the right person never sees them. Trading should solve this, but bartering is messy, subjective, and usually breaks down when two people don’t want what the other has.
Swapy fixes this by turning the campus into an intelligent, AI-powered barter economy.
Overview
A student uploads an item, and our AI doesn’t just ‘read’ it — it understands it. It analyzes the image and description to identify subcategory, materials, condition indicators, brand cues, and hidden semantic attributes. This feeds a data-driven valuation engine that generates a fair, consistent price for every item — no guessing, no awkward negotiation.
But the real magic? Swapy unlocks trades that were previously impossible with multi-hop matching. If person A doesn’t want what person B has, Swapy finds a trade cycle: A → B → C → A. We use graph intelligence to create exchange chains that turn isolated items into fluid value.
And we go beyond trading. Our AI continuously analyzes campus-wide activity to surface real-time market intelligence — what categories are surging, which items are scarce, which are oversupplied, and where value bottlenecks are emerging.
Swapy is not a marketplace. It’s an AI-driven value network — where every item can find its path, every student gets a fair deal, and where the campus economy becomes smarter, circular, and cashless. "We’re building the first AI barter intelligence system for student communities.”
What does our system do?
AI-Powered Item Understanding
When a user uploads an item, our Gemini Model doesn't just look at the image — it performs deep semantic analysis:
- Subcategory Detection: Distinguishes "headphones" from "earbuds", "chair" from "stool" with contextual understanding
- Material & Build Recognition: Identifies "steel", "metal", "wood", "fabric" to assess durability and quality
- Condition Pattern Analysis: Understands nuanced descriptors like "lightly worn", "faded", "scratched" beyond user-reported ratings
- Brand Tier Inference: Recognizes premium brands (Apple, Nike, Adidas) and contextualizes them within category ecosystems
- Attribute Extraction: Captures color, size, functionality, portability, waterproofing, and other qualitative features
The AI extracts all this semantic information and enriches it with keywords like "ergonomic", "portable", "foldable", "waterproof", "shockproof", "worn", "damaged", "malfunctioning" — creating a rich knowledge representation of every item.
AI-Augmented Valuation Engine
The semantic insights extracted by AI feed into our data-driven valuation engine, which transforms understanding into consistent, fair prices:
The Valuation Formula:
Base Value = min + (max - min) × conditionMultiplier(conditionScore)
Age-Adjusted Value = Base × ageFactor (depreciation: 60% impact)
Brand-Enhanced Value = Age-Adjusted × (1 + brandBoost)
Final Value = Brand-Enhanced × (1 + attributeBoost)
Key Components:
- Condition Scoring: AI-enriched condition analysis (user input + age + semantic keywords) maps to 10-100 scale
- Age Depreciation: Realistic decay factor based on usage time (months/years conversion)
- Brand Intelligence: Category-aware brand recognition (e.g., Nike/Adidas for fashion, Apple/Sony for electronics)
- Attribute Amplification: Semantic keywords influence value (+10% for "premium design", -40% for "malfunctioning")
Together, AI interpretation and structured valuation create intelligent, fair, and reliable pricing that respects both semantic meaning and market reality.
Multi-Hop Matching Intelligence
Traditional barter fails when direct swaps don't exist. Swapy's graph-based matching engine uses AI-informed category preferences to discover complex trade cycles:
The Algorithm:
- Graph Construction: Build directed graph where edge A→B means "User A wants category that User B has"
- Cycle Detection: Depth-First Search finds circular chains (A→B→C→A)
- Fairness Scoring: Each chain evaluated on:
- Value balance (40% weight)
- Condition similarity (20% weight)
- Category match quality (20% weight)
- Chain length optimization (20% weight)
Example:
- You have: Textbook (want Electronics)
- Person B has: Headphones (want Clothing)
- Person C has: Jacket (want Books)
AI-driven category matching discovers this impossible 3-way trade and presents it with a fairness score. The system enables exchanges that were previously unimaginable.
Trends Intelligence Module
Our Campus Trends Dashboard leverages AI-powered semantic analysis to generate real-time market insights:
Six Core Metrics (0-5 star scale):
- Demand Score: Search queries, wishlist entries, swap requests
- Supply Score: Active listings per category
- Scarcity Score: Demand - Supply (what's hard to find)
- Velocity Score: Completed trades / active listings (turnover rate)
- Popularity Score: Current demand trend vs. 30-day average
- Saturation Score: Supply - Demand (what's oversupplied)
AI semantic understanding identifies category patterns, while data-driven scoring ensures meaningful, actionable insights — not random fluctuations.
How we built it
Architecture Overview
┌─────────────────────────────────────────────────────────┐
│ Frontend Layer │
│ Next.js 14 (App Router) + React + TailwindCSS │
│ • Upload UI with drag-and-drop │
│ • Real-time matches dashboard │
│ • Multi-hop chain visualization │
│ • Trends analytics dashboard │
└─────────────────────┬───────────────────────────────────┘
│
┌─────────────────────▼───────────────────────────────────┐
│ API Route Layer │
│ Next.js API Routes (serverless) │
│ • /api/analyze-item → AI item analysis │
│ • /api/get-matches → Fair trade scoring │
│ • /api/find-multihop → Cycle detection │
│ • /api/propose-trade → Trade management │
└─────────────────────┬───────────────────────────────────┘
│
┌─────────────────────▼───────────────────────────────────┐
│ AI Intelligence Layer │
│ OpenRouter → Google Gemini 2.0 Flash │
│ • Vision + text multimodal analysis │
│ • Semantic extraction (subcategory, attributes) │
│ • Brand tier inference │
│ • Keyword identification │
└─────────────────────┬───────────────────────────────────┘
│
┌─────────────────────▼───────────────────────────────────┐
│ Data-Driven Calculation Layer │
│ • Valuation engine (condition, age, brand, attributes) │
│ • Condition score calculator │
│ • Multi-hop graph algorithms (DFS cycle detection) │
│ • Trend score computation │
└─────────────────────┬───────────────────────────────────┘
│
┌─────────────────────▼───────────────────────────────────┐
│ Backend Services │
│ Firebase (Firestore, Storage, Auth) │
│ • Real-time database │
│ • Image storage │
│ • Campus email authentication (.edu domains) │
└─────────────────────────────────────────────────────────┘
Challenges we ran into
1. Designing Hybrid AI + Deterministic Architecture
Balancing AI intelligence with deterministic fairness was our biggest challenge. We wanted AI to provide deep semantic understanding, but we also needed consistent, repeatable valuations.
Solution: We separated concerns — AI extracts meaning (subcategory, keywords, attributes), while deterministic engines transform insights into values and scores. This hybrid approach gives us intelligent interpretation with reliable execution.
2. Creating Stable Valuation Ranges
Initial valuations were too high for some categories (e.g., $111 for a hoodie). We needed realistic price ranges that respect both AI-extracted quality signals and market constraints.
Solution: We refined PRICE_TABLE with category-specific min/max ranges, reduced brand boosts (10% for electronics, 8% for fashion), increased age depreciation impact (60%), and implemented conservative clamping (max 1.15× category max).
3. Ensuring Multi-Hop Trade Fairness
Complex trade chains (A→B→C→A) needed fair evaluation. How do we ensure everyone gets equivalent value in a 3-way or 4-way trade?
Solution: We implemented a multi-factor fairness score that considers:
- Value balance (40% weight) — ensures similar item values
- Condition similarity (20% weight) — prevents condition mismatches
- Category match quality (20% weight) — validates everyone gets what they want
- Chain length optimization (20% weight) — prefers simpler trades
4. Making AI Insights Meaningful
Early trends showed random fluctuations. We needed insights that reflected real marketplace dynamics, not noise.
Solution: We designed a 6-score system that normalizes data, accounts for time windows (7-day vs 30-day trends), and weights factors appropriately. AI semantic understanding ensures accurate categorization, while data-driven scoring ensures meaningful trends.
Accomplishments that we're proud of
1. AI-Centric Item Understanding
We built a system where AI performs deep semantic analysis — not just classification, but true interpretation of item properties, condition, and value signals. The AI understands context, recognizes materials, identifies wear patterns, and extracts meaningful attributes.
2. Seamless Hybrid Intelligence
Our hybrid architecture successfully combines AI intelligence (semantic extraction) with deterministic engines (valuation, matching). This gives us intelligent interpretation with reliable execution — the best of both worlds.
3. Multi-Hop Trading Network
We implemented a graph-based matching system that discovers impossible trades. Users can now participate in complex 3-way and 4-way exchanges that were previously unimaginable, enabled by AI-driven category understanding.
4. Data-Driven Trend Analytics
Our 6-score trend system provides actionable market insights. Students can see what's trending, what's scarce, what's oversupplied — all driven by real marketplace data and enriched by AI semantic understanding.
5. End-to-End Campus Economy Simulation
We created a complete barter ecosystem with:
- AI-powered item analysis
- Intelligent valuation
- Multi-hop matching
- Real-time trend insights
- Trade management
- Campus-exclusive authentication
Everything works together seamlessly to create a vibrant, intelligent trading platform.
What we learned
AI is the Intelligence Layer
AI provides the semantic understanding that enables intelligent item interpretation. It recognizes context, identifies properties, and extracts meaningful signals that inform every part of our system.
Data is the Grounding Layer
Deterministic engines provide consistency and fairness. While AI interprets meaning, structured calculations ensure that similar items get similar values and that trades remain fair.
Together They Produce Reliability
The combination of AI intelligence + data-driven engines creates a system that's both intelligent and reliable. AI understands context, while structured logic ensures consistency — together, they produce a scalable, fair barter ecosystem.
Hybrid Intelligence Scales
Our hybrid approach proves that AI and deterministic systems can work together to create solutions that are smarter than pure rule-based systems and more reliable than pure AI-driven systems.
What's next for Swapy
1. Advanced Computer Vision
Enhance AI analysis with multi-angle image processing, defect detection, and material classification through advanced vision models. Deeper visual understanding will improve condition scoring and attribute extraction.
2. Personalized AI Agents
Create AI agents that learn user preferences and proactively suggest matches. Agents would understand each student's trading history, preferred categories, and value expectations to provide personalized recommendations.
3. Behavior-Aware Matching
Incorporate trading behavior patterns into matching logic. AI would learn which users are reliable traders, which categories have high completion rates, and which trade types succeed most often.
4. Campus-Wide Economic Modeling
Build economic models that predict market trends, identify arbitrage opportunities, and optimize trade recommendations. AI-powered economic intelligence would help students make smarter trading decisions.
5. Real-Time Semantic Search
Implement AI-powered semantic search that understands intent, not just keywords. Students could search for "study desk" and find "desk", "table", "workstation" — anything that matches their semantic need.
6. Automated Trade Negotiation
Develop AI negotiation agents that suggest fair counter-offers when trades don't match exactly. Agents would understand value differences, condition gaps, and user preferences to propose intelligent compromises.
Built With
- cloudfunctions
- firebase
- javascript
- llm
- node.js
- openrouter
- typescript
Log in or sign up for Devpost to join the conversation.