Project Info
This project did not submit a demo video on Devpost.
Inspiration
We were in the car and the driver wanted to a route with specific constraints but couldn't easily do it while driving.
What it does
It uses semantic search for finding the optimal route given constraints, making it very easy to navigate.
How we built it
We used React to make the web interface and Cursor to help with the semantic search.
Challenges we ran into
We had a lot of bugs since we were vibe coding. Had to use our technical expertise to debug functionality features.
Accomplishments we're proud of
We were able to complete our project in 24 hours and make it user-friendly.
What we learned
How to ideate and build a product in less than 24 hours.
What's next
Making it better, faster, more accurate, and scale it.
Semantic Maps Assistant
A full-stack web application that overlays semantic, conversational search onto Google Maps. Users can plan routes and use natural language to find points of interest along their journey.
Architecture
- Backend: Python FastAPI with Google Gemini Pro + Places API
- Frontend: React.js with Google Maps integration
- AI: Semantic query processing using Gemini Pro
- APIs: Google Maps, Places, and Directions services
Quick Start
Prerequisites
- Python 3.8+
- Node.js 16+
- Two separate Google API keys:
- Google Cloud API Key (for Maps, Places, Directions APIs)
- Gemini API Key (for AI semantic processing)
Setup
-
Clone and navigate to project:
git clone <repository> cd CalHacks1 -
Backend Setup:
cd server pip install -r requirements.txt # Create .env file with both API keys: cp env.example .env # Edit .env and add: # GOOGLE_API_KEY=your_google_cloud_api_key_here # GEMINI_API_KEY=your_gemini_api_key_here -
Frontend Setup:
cd ../semantic-maps-app npm install # Create .env file: cp env.example .env # Edit .env and add: # REACT_APP_GOOGLE_MAPS_API_KEY=your_google_cloud_api_key_here -
Start Both Services:
# From project root: ./start-dev.sh # Unix/Mac # OR start-dev.bat # WindowsOr start manually:
# Terminal 1 - Backend: cd server uvicorn main:app --reload # Terminal 2 - Frontend: cd semantic-maps-app npm start
API Keys Setup
Google Cloud API Key
- Go to Google Cloud Console
- Create/select a project
- Enable these APIs:
- Maps JavaScript API
- Places API
- Directions API
- Create credentials → API Key
- Use this key for both
GOOGLE_API_KEY(backend) andREACT_APP_GOOGLE_MAPS_API_KEY(frontend)
Gemini API Key
- Go to Google AI Studio
- Create API key
- Use this key for
GEMINI_API_KEY(backend only)
Usage
- Open the app: http://localhost:3000
- Plan a route: Enter origin and destination
- Semantic search: Ask questions like:
- "Find coffee shops along the way"
- "Good restaurants for lunch"
- "Gas stations near the highway"
- View results: See places marked on the map
- Add to route: Click markers to add stops
API Endpoints
POST /api/find-places-on-route
Request:
{
"query": "coffee shops along the route",
"route": {
"routes": [/* Google DirectionsResult object */]
}
}
Response:
[
{
"place_id": "ChIJ...",
"name": "Blue Bottle Coffee",
"geometry": {
"location": {"lat": 37.7749, "lng": -122.4194}
},
"rating": 4.5
}
]
Features
- ✅ Semantic Search: Natural language queries powered by Gemini Pro
- ✅ Route Planning: Google Maps integration with directions
- ✅ Smart Filtering: AI converts queries to relevant place searches
- ✅ Interactive Map: Click markers to add stops to your route
- ✅ Responsive Design: Works on desktop and mobile
Architecture Details
Backend (FastAPI)
- Semantic Processing: Gemini Pro converts natural language to structured queries
- Places Search: Google Places API finds relevant locations
- Route Analysis: Calculates midpoints and search areas
- API Integration: Clean REST interface for frontend
Frontend (React)
- Maps Integration:
@vis.gl/react-google-mapsfor modern React integration - State Management: React hooks for route and places data
- UI Components: Clean, responsive interface
- Real-time Updates: Dynamic map updates as user interacts
Troubleshooting
Common Issues
- "Could not import module 'main'": Run uvicorn from the
server/directory - API Key errors: Ensure both API keys are properly configured in .env files
- CORS errors: Backend runs on :8000, frontend on :3000 - CORS is configured
- Maps not loading: Check
REACT_APP_GOOGLE_MAPS_API_KEYin frontend .env
Development Tips
- Backend logs: Check terminal running uvicorn for detailed error messages
- Frontend debugging: Open browser DevTools for React errors
- API testing: Use curl or Postman to test backend endpoints directly
- Environment: Ensure .env files are not committed to version control
Future Enhancements
- Multi-stop optimization: Optimize route order for multiple stops
- User preferences: Remember favorite place types and locations
- Social features: Share routes and recommendations
- Offline mode: Cache routes and places for offline use
- Advanced filters: Price range, ratings, hours, etc.
- Voice interface: Voice commands for hands-free operation
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
License
MIT License - see LICENSE file for details.
Analysis
View
Metric
- 3
- 3
- 1
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
- HTMLIn code
- JavaScriptIn code
- PythonIn code
- ReactIn code
- Node.jsClaimed
6 of 7 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
126 KB
Source files
18
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
Vedaant-J/CalHacksMaps
31 files · 800 KB · @ d28b796
Structure
API & routing
4 files · 13%Request entry points: routes, handlers and controllers.
Application logic
10 files · 32%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
- Python49%
- JavaScript29%
- CSS12%
- Markdown7%
- Shell2%
- HTML1%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
semantic-maps-app/package.json
npm · 9- @testing-library/dom
- @testing-library/jest-dom
- @testing-library/react
- @testing-library/user-event
- @vis.gl/react-google-maps
- react
- react-dom
- react-scripts
- web-vitals
server/requirements.txt
pypi · 6- fastapi
- google-generativeai
- googlemaps
- pydantic
- python-dotenv
- uvicorn[standard]
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.