A web application that provides food recommendations based on weather conditions, location, and user preferences. Built with Next.js, TypeScript, Tailwind CSS, all AI models compatible with OpenAI library.
This system analyzes current weather data and user preferences to suggest appropriate food choices. It integrates location services, interactive maps, and customizable settings to deliver personalized food recommendations.
- Weather-Based Recommendations: Tailored food suggestions based on current weather conditions
- Location Services: Current location detection or manual location entry
- Interactive Map: Visual representation of selected location
- Food Exclusions: Option to exclude specific foods from recommendations
- Group Dining Support: Configuration for number of diners and meal types
- reCAPTCHA Protection: Security enhancement for API endpoints
- Internationalization: Support for multiple languages using next-intl
- Extended Settings: Additional customization options
- Node.js 18+ (20+ recommended)
- pnpm (recommended), npm, or yarn
-
Clone the repository
git clone https://github.com/yourusername/food-recommendation-system.git cd food-recommendation-system
-
Install dependencies
pnpm install
-
Set up environment variables
cp .env.local.example .env.local # Edit .env.local with appropriate values
-
Start the development server
pnpm dev
-
Access the application at http://localhost:3000
For containerized deployment, Docker configuration is provided:
# Build and start the application
docker-compose up -d
# Access the application at http://localhost:3000
For more detailed Docker instructions, see DOCKER.md.
The application is configured through environment variables defined in the .env
file. Key configuration categories include:
OPENAI_API_KEY=your_openai_api_key
NEXT_PUBLIC_RECAPTCHA_SITE_KEY=your_recaptcha_site_key
NEXT_PUBLIC_RECAPTCHA_ENABLED=true
RECAPTCHA_SECRET_KEY=your_recaptcha_secret_key
The application uses feature flags to enable or disable specific functionality. These are configured through environment variables:
Feature | Description | Environment Variable |
---|---|---|
Food Recommendations | Core recommendation functionality | NEXT_PUBLIC_FEATURE_FOOD_RECOMMENDATIONS |
Food Details | Detailed food information | NEXT_PUBLIC_FEATURE_FOOD_DETAILS |
Food Exclusions | Capability to exclude foods | NEXT_PUBLIC_FEATURE_FOOD_EXCLUSIONS |
Extended Settings | Advanced configuration panel | NEXT_PUBLIC_FEATURE_EXTENDED_SETTINGS |
Meal Type Selection | Meal type options | NEXT_PUBLIC_FEATURE_MEAL_TYPE_SELECTION |
Number of Diners | Group dining options | NEXT_PUBLIC_FEATURE_NUMBER_OF_DINERS |
Special Requirements | Dietary requirements input | NEXT_PUBLIC_FEATURE_SPECIAL_REQUIREMENTS |
Weather Data | Weather integration | NEXT_PUBLIC_FEATURE_WEATHER_DATA |
IP Geolocation | IP-based location detection (fallback method) | NEXT_PUBLIC_FEATURE_IP_GEOLOCATION |
Manual Location | Manual location entry | NEXT_PUBLIC_FEATURE_MANUAL_LOCATION |
Map Display | Interactive location map | NEXT_PUBLIC_FEATURE_MAP_DISPLAY |
Cache system | Cache the result | NEXT_PUBLIC_FEATURE_ENABLE_CACHING |
Set any feature flag to true
to enable it or false
to disable it.
pnpm dev
- Start development serverpnpm build
- Build for productionpnpm start
- Start production serverpnpm lint
- Run linting checks
- OpenAI
- Weather data from Open-Meteo
- Map visualization using Leaflet, OpenStreetMap
- UI components from shadcn/ui