A comprehensive platform that connects property owners, franchise companies, and entrepreneurs using Foursquare's location intelligence and AI-powered matchmaking.
This platform serves three main user types:
- List commercial properties for franchise and entrepreneur opportunities
- Get AI-powered pricing recommendations based on market analysis
- Receive suggestions for target franchise companies and entrepreneurs
- Access market insights and location intelligence
- List franchise opportunities with specific requirements
- Find matching properties in target locations
- Connect with interested entrepreneurs
- Get market analysis for expansion decisions
- Investors: Find properties and franchises to invest in
- Idea Owners: Get location recommendations for business ideas
- Both: Combine investment opportunities with business ideas
- Receive AI-powered business suggestions and market analysis
- Location Intelligence: Powered by Foursquare Places API
- AI Matchmaking: Using Mistral AI for intelligent recommendations
- Market Analysis: Real-time market insights and pricing suggestions
- User Management: Foursquare managed users for authentication
- Modern UI: Responsive web interface with Bootstrap
- RESTful API: FastAPI backend with comprehensive endpoints
- Backend: Python FastAPI
- AI: Mistral AI (small model)
- Location Data: Foursquare Places API
- Frontend: HTML, CSS, JavaScript, Bootstrap
- Database: SQLite (in-memory for demo)
- Authentication: Foursquare Service Keys
- Python 3.8+
- Foursquare Developer Account
- Mistral AI API Key
-
Clone the repository
git clone <repository-url> cd foursqare
-
Create virtual environment
python -m venv venv
-
Activate virtual environment
# Windows venv\Scripts\Activate.ps1 # macOS/Linux source venv/bin/activate
-
Install dependencies
pip install -r requirements.txt
-
Set up environment variables
# Copy the example file cp env_example.txt .env # Edit .env with your API keys
-
Get API Keys
Foursquare Service Key:
- Visit Foursquare Developer Console
- Create a new app
- Get your Service Key
- Add it to
.envasFOURSQUARE_SERVICE_KEY
Mistral AI Key:
- Visit Mistral AI Console
- Create an account and get your API key
- Add it to
.envasMISTRAL_API_KEY
-
Start the server
python main.py
-
Access the application
- Web Interface: http://localhost:8000
- API Documentation: http://localhost:8000/docs
POST /api/users/property-owner- Register property ownerPOST /api/users/franchise-company- Register franchise companyPOST /api/users/entrepreneur- Register entrepreneur
GET /api/property-owners/{user_id}/recommendations- Get property recommendationsGET /api/franchise-companies/{user_id}/matches- Get franchise matchesGET /api/entrepreneurs/{user_id}/opportunities- Get entrepreneur opportunities
GET /api/location/autocomplete- Location autocompleteGET /api/market-analysis/{location}- Market analysis for location
GET /api/stats- Platform statistics
- Register with property details and location
- Receive market analysis and pricing suggestions
- Get matched with interested franchise companies
- View market insights and demand categories
- Register with franchise requirements
- Find matching properties in target areas
- Connect with interested entrepreneurs
- Access location intelligence for expansion
- Register with budget and preferences
- Receive business idea suggestions
- Find matching properties and franchises
- Get location recommendations for business ideas
foursqare/
βββ main.py # FastAPI application
βββ config.py # Configuration settings
βββ models.py # Pydantic data models
βββ foursquare_api.py # Foursquare API integration
βββ ai_service.py # Mistral AI service
βββ requirements.txt # Python dependencies
βββ templates/
β βββ index.html # Web interface
βββ env_example.txt # Environment variables example
βββ README.md # This file
This project uses the latest Foursquare API migration (2025-06-17):
- Places API:
places-api.foursquare.com - Users API:
users-api.foursquare.com - Authentication: Service Keys with Bearer tokens
- Versioning: Date-based versioning in headers
- Place search and details
- Location autocomplete
- Market analysis
- User management
- Geotagging capabilities
Uses Mistral AI (small model) for:
- Property market analysis
- Franchise-property matching
- Entrepreneur opportunity matching
- Business idea suggestions
- Market report generation
- Property listing optimization
- Responsive Design: Works on desktop and mobile
- Modern Interface: Bootstrap 5 with custom styling
- Interactive Forms: Dynamic form switching
- Real-time Stats: Live platform statistics
- User-friendly: Intuitive navigation and feedback
- API Key Management: Secure environment variable handling
- Input Validation: Pydantic models for data validation
- Error Handling: Comprehensive error responses
- CORS Support: Cross-origin resource sharing enabled
python main.py- Set up a production server
- Install dependencies
- Configure environment variables
- Use a production WSGI server (Gunicorn)
- Set up reverse proxy (Nginx)
- Database integration (PostgreSQL/MySQL)
- User authentication and sessions
- Real-time notifications
- Advanced analytics dashboard
- Mobile app development
- Payment integration
- Document management
- Advanced AI features
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is created for the Foursquare Hackathon.
For issues and questions:
- Check the API documentation at
/docs - Review the Foursquare API documentation
- Check the Mistral AI documentation
This project demonstrates:
- β Foursquare API integration
- β AI-powered business intelligence
- β Location-based matchmaking
- β Modern web development
- β Real-world business application
- β Scalable architecture
Built with β€οΈ for the Foursquare Hackathon