Welcome to tripblip MAG 2.0, your AI-powered adventure companion that creates personalized local experiences, connects you with friends, and helps you discover the best your city (or the one you're at currently) has to offer.
- Personalized Recommendations: AI creates custom adventures based on your interests, location, and preferences
- Real-time Weather Integration: Adventures adapt to current weather conditions
- Smart Scheduling: Optimal timing based on venue hours and travel time
- Multi-step Itineraries: Seamless flow between different locations and activities
- Friend Connections: Connect with friends and adventure together
- Event Hosting: Create and host your own events
- RSVP System: Join events and manage attendance
- Adventure Sharing: Share your experiences and get recommendations
- Points & Badges: Earn rewards for completing adventures
- Leaderboards: Compete with friends and the community
- Streaks: Maintain adventure streaks for bonus points
- Achievement System: Unlock badges for different types of adventures
- Live Notifications: Get updates about your adventures and events
- WebSocket Integration: Real-time chat and updates
- Progress Tracking: Track your adventure progress in real-time
- JWT-based authentication
- Environment variable protection
- Docker container isolation
- NGINX reverse proxy for production security
Improved documentation structure and clarified deployment instructions.
MAG 2.0 follows a modern microservices architecture:
- AI Orchestrator: LangChain-powered adventure generation
- User Service: Authentication and profile management
- Adventure Service: Adventure creation and management
- Event Service: Event management and RSVP system
- Notification Service: Real-time notifications
- External API Service: Integration with maps, weather, and events
- Agent Chat Endpoint: Lightweight chat interface to OpenAI
- Training Prep: Script to convert dataset to JSONL for fine-tune jobs
- Modern React 18: Hooks, Context API, and modern patterns
- Responsive Design: Mobile-first design with Tailwind CSS
- Real-time Updates: Socket.IO integration
- Progressive Web App: Offline support and mobile optimization
- MongoDB: Primary database for all application data
- Redis: Caching layer for improved performance
- Docker: Containerized deployment
- NGINX: Load balancing and reverse proxy
- Docker and Docker Compose
- Node.js 18+ (for local development)
- Git
-
Clone the repository
git clone <repository-url> cd tripblip
-
Run the setup script
./scripts/setup.sh
-
Configure environment variables
cp .env.example .env # Edit .env with your API keys and configuration -
Start the application
docker-compose up -d
-
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
- Python Agent: http://localhost:8000
- API Documentation: http://localhost:5000/api-docs
-
Install dependencies
npm run setup
-
Start MongoDB and Redis
docker-compose up -d mongodb redis
-
Start the development servers
npm run dev
Copy .env.example to .env and configure the following:
# OpenAI for AI-powered adventure generation
OPENAI_API_KEY=your_openai_api_key
# Google Maps for location services
GOOGLE_MAPS_API_KEY=your_google_maps_api_key
# Weather data
OPENWEATHER_API_KEY=your_openweather_api_key
# Event data (optional)
EVENTBRITE_API_KEY=your_eventbrite_api_key
YELP_API_KEY=your_yelp_api_key# Firebase for authentication and notifications
VITE_FIREBASE_API_KEY=your_firebase_api_key
VITE_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your-project-id
# ... other Firebase config# MongoDB
MONGO_ROOT_USER=admin
MONGO_ROOT_PASSWORD=your_secure_password
# Redis
REDIS_PASSWORD=your_redis_password
# JWT Secret
JWT_SECRET=your_jwt_secret_keyThe API is fully documented with Swagger/OpenAPI. Once the application is running, visit:
- Swagger UI: http://localhost:5000/api-docs
POST /api/auth/register- Register new userPOST /api/auth/login- Login user
POST /api/adventures/generate- Generate new adventureGET /api/adventures/user- Get user's adventuresGET /api/adventures/:id- Get adventure detailsPATCH /api/adventures/:id/status- Update adventure status
POST /api/events- Create new eventGET /api/events/nearby- Get nearby eventsPOST /api/events/:id/rsvp- RSVP to event
GET /api/users/profile- Get user profilePATCH /api/users/profile- Update user profilePOST /api/users/friends/add- Add friend
cd server
npm testcd python_backend
pytest -qcd client
npm testnpm run test:integration-
Set production environment
export NODE_ENV=production -
Build and start with production profile
docker-compose --profile production up -d
-
Enable NGINX reverse proxy The production setup includes NGINX for:
- SSL termination
- Load balancing
- Static file serving
- API proxying
The application is designed to be cloud-native and can be deployed on:
- AWS: ECS, EKS, or EC2 with Docker
- Google Cloud: GKE or Cloud Run
- Azure: AKS or Container Instances
- DigitalOcean: App Platform or Kubernetes
-
Backend Feature
- Add model in
server/models/ - Create service in
server/services/ - Add routes in
server/routes/ - Update controllers in
server/controllers/
- Add model in
-
Frontend Feature
- Create components in
frontend/src/components/ - Add pages in
frontend/src/pages/ - Update API layer in
frontend/src/api/ - Add routing to
frontend/src/App.jsx
- Create components in
- Backend: ESLint + Prettier
- Frontend: ESLint + Prettier
- Git Hooks: Husky for pre-commit checks
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes
- Run tests:
npm test - Commit your changes:
git commit -m "Add feature" - Push to the branch:
git push origin feature-name - Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
Port already in use
# Stop existing containers
docker-compose down
# Or change ports in docker-compose.ymlAPI key errors
- Ensure all required API keys are set in
.env - Check API key permissions and quotas
Database connection issues
- Ensure MongoDB is running:
docker-compose up -d mongodb - Check database credentials in
.env
- OpenAI for GPT-4 integration
- React and Node.js communities