A full-stack web app that generates AI-powered day-by-day travel itineraries with real-time weather alerts.
Stack: React 19 + TypeScript + Tailwind CSS v4 · ASP.NET Core 8 · PostgreSQL 16 · Firebase Auth · GCP (Cloud Run, Cloud SQL, Pub/Sub)
Make sure these are installed:
| Tool | Check |
|---|---|
| .NET 8 SDK | dotnet --version → 8.x |
| Node.js 20+ | node --version |
| Docker Desktop | running (for PostgreSQL) |
| gcloud CLI | gcloud --version |
| EF Core tools | dotnet tool install --global dotnet-ef |
docker run -d --name travel-pg \
-e POSTGRES_DB=travelengine \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=postgres \
-p 5432:5432 \
postgres:16-alpineVerify it's running: docker ps — you should see travel-pg.
- Go to console.firebase.google.com → Add project
- Authentication → Get started → enable Email/Password and Google
- Project Settings (gear) → General → scroll to Your apps → Add app → Web
- Copy the config values — you'll use them in step 5
gcloud auth login
gcloud auth application-default login
gcloud config set project YOUR_GCP_PROJECT_IDThe second command (application-default login) sets up credentials the backend uses automatically via the Google Cloud SDK.
Edit backend/TravelEngine.Api/appsettings.Development.json — fill in your values:
{
"ConnectionStrings": {
"DefaultConnection": "Host=localhost;Port=5432;Database=travelengine;Username=postgres;Password=postgres"
},
"Firebase": {
"ProjectId": "your-firebase-project-id"
},
"Gcp": {
"ProjectId": "your-gcp-project-id",
"Location": "us-central1",
"GeminiModel": "gemini-1.5-pro"
},
"Weather": {
"OpenWeatherMapApiKey": "your-openweathermap-key"
},
"Cors": {
"AllowedOrigins": [ "http://localhost:5173" ]
}
}OpenWeatherMap key: Free account at openweathermap.org → API keys tab.
Gcp:ProjectId: Can be any value for now — only needed when Pub/Sub and Gemini are used.
cd frontend
copy .env.example .env.localEdit frontend/.env.local with your Firebase values from step 3:
VITE_FIREBASE_API_KEY=...
VITE_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your-firebase-project-id
VITE_FIREBASE_STORAGE_BUCKET=your-project.appspot.com
VITE_FIREBASE_MESSAGING_SENDER_ID=...
VITE_FIREBASE_APP_ID=...
VITE_GOOGLE_MAPS_API_KEY=...Google Maps key: console.cloud.google.com/apis → enable Maps JavaScript API + Places API → Credentials → Create API Key.
cd backend/TravelEngine.Api
dotnet run --launch-profile httpThe API starts at http://localhost:5152
Swagger UI: http://localhost:5152/swagger
EF Core migrations run automatically on startup — the database tables are created for you.
Open a second terminal:
cd frontend
npm install
npm run devApp opens at http://localhost:5173
API calls are proxied automatically to http://localhost:5152.
| Feature | Status |
|---|---|
| Sign up / Sign in (Email + Google) | ✅ Works — needs Firebase only |
| User profile stored in PostgreSQL | ✅ Works |
| View trip dashboard | ✅ Works |
| Create trip with itinerary | ✅ Works — template-based generator (no GCP needed) |
| Trip itinerary detail page | ✅ Works once a trip exists |
| Google Maps on itinerary | ✅ Works with Maps API key |
| Real-time weather alerts (SSE) | ⚙️ Needs Cloud Pub/Sub enabled |
| Weather current conditions | ⚙️ Needs OpenWeatherMap key |
gcloud services enable \
sqladmin.googleapis.com \
pubsub.googleapis.com \
secretmanager.googleapis.com \
artifactregistry.googleapis.com \
run.googleapis.comgcloud pubsub topics create weather-alerts
gcloud pubsub topics create trip-updates
gcloud pubsub subscriptions create weather-alerts-sub --topic=weather-alerts --ack-deadline=60
gcloud pubsub subscriptions create trip-updates-sub --topic=trip-updates --ack-deadline=60Copy the template and fill in your values:
cp infra/.env.deploy.example infra/.env.deploy
# then edit infra/.env.deployRequired values in infra/.env.deploy:
GCP_PROJECT_ID=your-gcp-project-id
DB_PASSWORD=choose-a-strong-password
OPENWEATHERMAP_API_KEY=your-key # openweathermap.org → free signup
FIREBASE_PROJECT_ID=your-firebase-project-id
VITE_FIREBASE_API_KEY=...
VITE_FIREBASE_AUTH_DOMAIN=...
VITE_FIREBASE_STORAGE_BUCKET=...
VITE_FIREBASE_MESSAGING_SENDER_ID=...
VITE_FIREBASE_APP_ID=...
VITE_GOOGLE_MAPS_API_KEY=... # console.cloud.google.com → Maps JavaScript API
infra/.env.deployis gitignored — your secrets stay local.
bash infra/deploy.shThe script automatically:
- Enables required GCP APIs
- Creates a service account with least-privilege roles
- Provisions Cloud SQL PostgreSQL 15 (auto-starts if stopped)
- Stores secrets in Secret Manager
- Creates Pub/Sub topics (
weather-alerts,trip-updates) - Builds and pushes Docker images to Artifact Registry
- Deploys backend + frontend to Cloud Run
- Prints the live URLs
Add your Cloud Run frontend URL to Firebase authorized domains: Firebase Console → Authentication → Settings → Authorized domains → Add domain
├── backend/TravelEngine.Api/
│ ├── Controllers/ # TripsController, UsersController
│ ├── Data/ # EF Core DbContext
│ ├── Models/ # Trip, ItineraryDay, Activity, User
│ ├── Services/ # GeminiService, WeatherService, PubSubService
│ ├── BackgroundServices/ # WeatherPollingService (30-min interval)
│ └── DTOs/ # Request / response records
├── frontend/src/
│ ├── pages/ # Login, Signup, Dashboard, PlanTrip, TripDetail
│ ├── contexts/ # AuthContext (Firebase)
│ ├── hooks/ # useTripStream (SSE)
│ └── lib/ # api.ts (axios + auth), firebase.ts
├── infra/deploy.sh # GCP Cloud Run deployment
└── docker-compose.yml # Full local stack