Project Info
π‘
Inspiration
According to NYC Small Business services, almost 8000 small businesses closed in NYC alone last year. Much of this is attributed to the rise and dominance of online commerce sites such as Temu, Ebay, and Amazon. At the same time, increased prices on goods squeeze consumers dry, making a task as simple as survival near impossible for many Americans. Hermes aims to hit both these stones with one winged boot. π οΈ
What it does
Hermes is a shopping assistant powered by Google Gemini and Groq. Hermes allows users to locate local businesses on a map, and a natural language search utility is present. The user can ask Hermes to find them anything. Want to find all the lowest cost groceries in your area? Hermes' got it. Want to build a tree house? Hermes' will find your wooden planks, tools, and safety hat. Want to build a $5000 gaming computer? Hermes will find you all the parts and set you on your way. If its near you, Hermes will show you where. By creating such a simple discovery utility for users, local businesses can upload their stock, location, pricing, and store hours to passively boost foot traffic and sales. Everyone using Hermes will see your business. ποΈ
How we built it
Hermes is powered by Groq and Google Gemini. Hermes code is built under 3 pillars: frontend, backend, and data. For our frontend, we use a react interface to keep our it lightweight, scalable, and versatile. For our backend, it gets a little more interesting. Because Groq us build to be incredible efficient and quick, we used it to generate fast, real-time summaries of each business. when you view an area with Hermes, Groq will passively summarize all the businesses on your window. click on one, and a full summary of that business will be shown to the user, without them having to wait for annoying loading times. This allows to user to get to what they need fast, without waiting for loading times for each business. When a user interacts with the natural language discovery interface, they will be able to express complex needs including their budget, allergies, and store preferences to discover the products they need locally. We use Google Gemini 2.5-flash to generate powerful chatbot functionality. Hermes can lookup recipes, find ingredients, and present them at stores in your price range. Hermes can also discuss ratings with the user, ensuring the user a quality in-store shopping experience. For our data, we obviously didn't create a global list of local partners (yet). so for this demo version, we have generated example companies based off real stores in the Marin County, CA area. This allows us to simulate real-world data, while also allowing us to build Hermes in our designated time-frame. π§
Challenges we ran into
Our main challenge came with the sponsor Letta. For the first 12 hours of the build, our backend was completely built and dependent on Letta's platform. However, we found that the long-term based memory system was unreliable at best, and it often misinterpreted, changed, or outright ignored out instructions. The final straw came when at 11pm, the platform failed to load altogether, setting half a days work up in flames. We had to pivot. Initially, Hermes only supposed to catalog and report on grocery stores. Instead of keeping this limited scope, we decided to take a massive risk. We moved our entire platform to Gemini, and constructed 2 AI agents to catalog, asses, and recommend stores and products of all kind, from hardware stores to gas stations. While Letta's let-down initially spelled disaster, our team was able to turn this misfortune into Hermes' greatest strength: its versatility. β
Accomplishments we're proud of
Our team is most proud of our perseverance. We ran into roadblock after roadblock, and one of us even spent an hour trying to overhaul the entire backend, just to found out our problems were caused by a one word discrepancy: they had written "recommendation" instead of "response". Despite these (very annoying) hurdles, our team worked until the end (we all haven't slept in more than 24 hours, and we're all on a lot of caffeine) π§
What we learned
We learned the value of communication while developing in a group setting. When the project began, we were uncoordinated. There was no clear direction, and for the first hour or two, we all fumbled to get a foothold. Eventually, we found our center, and assigned each other tasks so we could work together as a group. After that? We were a well oiled machine. π
What's next
We want Hermes to be the Amazon for in store shopping. By giving a chance for local businesses to compete with the big online names, everyone benefits. By allowing consumers to more easily compare the costs of common goods, everyone benefits. We want to make Hermes a go-to download application mobile devices, and a go-to bookmark on the web.
ποΈ AI-Powered Shopping Assistant
π§ Overview
This project is an AI-powered shopping assistant that helps users find the best local options for their shopping needs through a natural language interface. The system understands complex shopping requests and provides personalized recommendations based on user preferences (price, quality, or balanced approach).
ποΈ System Architecture
The application follows a client-server architecture with the following components:
π Backend (Python/Flask)
The backend serves as the brain of the application, handling all AI processing and data management.
Core Components:
-
app.py- Main Application Server- Initializes the Flask application and CORS middleware
- Manages in-memory conversation history
- Provides RESTful API endpoints:
GET /api/stores: Retrieves store information for map visualizationPOST /api/converse: Main endpoint for processing user requestsPOST /api/clear: Clears conversation history
- Loads and manages store inventory data
-
agent.py- AI Recommendation Engine- Implements the core recommendation logic using Google's Gemini API
- Key functions:
get_recommendation(): Main entry point that processes user requests_assemble_list_from_inventory(): Helper function that builds shopping lists from store inventory
- Handles natural language understanding and response generation
- Manages conversation context and history
-
Data Management
data/stores.json: Contains store information and inventory data- In-memory storage for conversation history
π Frontend (React/Vite)
Modern web interface that provides a seamless user experience.
Key Features:
- Interactive chat interface
- Real-time map visualization using Leaflet.js
- Responsive design for various screen sizes
- Integration with backend API endpoints
π οΈ Technical Stack
Backend
- Framework: Flask (Python)
- AI/ML: Google Gemini API
- Data Storage: JSON-based storage for stores and inventory
- API: RESTful endpoints
Frontend
- Framework: React
- Maps: Leaflet.js
- Build Tool: Vite
- Styling: CSS Modules
π Data Flow
- User submits a request through the frontend chat interface
- Request is sent to the backend's
/api/converseendpoint - Backend processes the request using the AI recommendation engine
- System queries store inventory and generates recommendations
- Response is formatted and sent back to the frontend
- Frontend updates the UI with the response and any relevant map data
π Getting Started
Prerequisites
- Python 3.8+
- Node.js 16+
- Google Gemini API key
Installation
- Clone the repository
- Install backend dependencies:
pip install -r requirements.txt - Install frontend dependencies:
cd frontend/chat-interface && npm install - Set up your environment variables (API keys, etc.)
Running the Application
- Start the backend:
python backend/app.py - Start the frontend:
cd frontend/chat-interface && npm run dev - Access the application at
http://localhost:5173
π€ AI Capabilities
The system demonstrates several advanced AI capabilities:
-
Natural Language Understanding
- Processes complex, conversational shopping requests
- Understands context from previous messages
- Handles ambiguous or incomplete requests
-
Recommendation Engine
- Suggests complete shopping lists based on user goals
- Considers multiple factors (price, quality, availability)
- Provides alternatives when exact matches aren't available
-
Context Management
- Maintains conversation history
- Remembers user preferences
- Handles follow-up questions naturally
π Data Model
The application uses a simple but effective data model:
- Stores: Physical locations with inventory
- Inventory: Products available at each store
- Conversation History: User and assistant message history
- User Preferences: Stated preferences for recommendations
π API Endpoints
GET /api/stores
- Returns: List of all stores with their inventory
- Used by: Frontend map visualization
POST /api/converse
- Payload:
{ "request": string, "preference": "price|quality|balanced" } - Returns: AI-generated response with recommendations
- Used by: Frontend chat interface
POST /api/clear
- Clears the conversation history
- Returns: Success status
- Used by: Frontend reset functionality
π Backend (/backend)
Built with Python and Flask, the backend is where the core AI logic resides.
-
app.py- The entry point of the Flask server
- Handles API requests (
/api/converse) - Manages in-memory conversation history
- Delegates AI logic to
one.py
-
one.py
The βbrainβ of the assistant. Theprocess_request()function:- Analyzes the full conversation history
- Determines user intent and shopping category
- Uses
stores.jsonto find matching inventory - Calculates recommendation scores based on price, quality, or balanced
- Generates a natural-language response using the Gemini API
-
stores.json
The "Digital Stockroom" β a static JSON file with:- Store metadata (name, location)
- Inventory categorized by shopping themes
-
requirements.txt
Lists all Python dependencies
π» Frontend (/chat-interface)
A modern React application built with Vite.
src/App.jsx
The main React component that:- Manages chat messages and user preferences
- Makes API calls to the Flask backend
- Displays conversational history
- Shows store summaries powered by Groq
- Embeds an interactive map using React-Leaflet
π οΈ Note: Linking map markers to chat recommendations is a planned future enhancement.
βοΈ Setup & Installation
π§ Prerequisites
- Python 3.8+
- Node.js 16+
- A valid Google Gemini API key
- A valid Groq API key
Prerequisites
Python 3.8+ and packages listed in requirements.txt
Node.js and npm
-
Backend Setup
Navigate to the backend directory:
cd backend
Create and activate a virtual environment: For macOS/Linux:
python3 -m venv venv source venv/bin/activate
For Windows:
py -m venv venv .\venv\Scripts\activate
Install Python dependencies:
pip install -r requirements.txt
Set Your API Key: Open one.py and replace the placeholder "YOUR_API_KEY_HERE" with your actual Google Gemini API key.
-
Frontend Setup
Navigate to the frontend directory from the project root:
cd chat-interface
Install Node.js dependencies:
npm install
Running the Application##
You must have both the backend and frontend servers running simultaneously in separate terminal windows.
Start the Backend Server:
Make sure you are in the /backend directory with your virtual environment activated.
Run the Flask application:
python app.py
The server will start and be listening on http://127.0.0.1:5001.
Start the Frontend Server:
Open a new terminal window.
Navigate to the /chat-interface directory.
Run the Vite development server:
npm run dev
Vite will automatically open the application in your default web browser, usually at http://localhost:5173.
You can now interact with the Shopping Assistant through the chat interface in your browser.
A special thanks to our sponsors Google and Groq for helping us power our project!
Analysis
View
Metric
- 58
- 27
- 17
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- FastAPIIn code
- FlaskIn code
- HTMLIn code
- JavaScriptIn code
- PythonIn code
- ReactIn code
- Google GeminiClaimed
7 of 8 appear in the indexed code. 1 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
64 KB
Source files
17
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
Hezy4/BerkAiHackathon
32 files Β· 341 KB Β· @ fbe69d5
Structure
Interface
1 file Β· 3%Screens, components and styles rendered to the user.
Application logic
15 files Β· 47%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here β open the file browser to check anything the diagram implies.
Languages
- Python30%
- JavaScript30%
- CSS27%
- Markdown13%
- HTML1%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
frontend/chat-interface/package.json
npm Β· 16- leaflet
- lucide-react
- react
- react-dom
- react-icons
- react-leaflet
- react-router-dom
- +9 more
requirements.txt
pypi Β· 8- fastapi
- flask
- flask_cors
- google-generativeai
- groq
- numpy
- pydantic
- uvicorn
Declared in the repositoryβs manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This projectβs features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.