Frontend:
cd frontend
npm startBackend:
cd backend
npm run dev- Node.js 20
- Cloudflare account -> easily setup trough google login
- Google Cloud Console account (for OAuth)
- Go to Google Cloud Console
- Create a new project or select an existing one, with:
- Google+ API
- Google OAuth2 API
-
Navigate to Credentials → Create Credentials → OAuth 2.0 Client ID
-
WEB: ADD:
- Application type: "Web application"
- Name: "Odyssey Web Client"
- Authorized redirect URIs:
http://localhost:8787/auth/google/callback https://your-backend-domain.workers.dev/auth/google/callback
-
For Mobile Application:
- Application type: "Android" or "iOS"
- Add your package name and SHA-1 certificate fingerprint
Frontend -> inside .env set:
EXPO_PUBLIC_GOOGLE_CLIENT_ID=your-google-client-id.apps.googleusercontent.com
EXPO_PUBLIC_GOOGLE_WEB_CLIENT_ID=your-web-client-id.apps.googleusercontent.comBackend -> set, trough terminal:
# Development
wrangler secret put GOOGLE_CLIENT_ID --env development
wrangler secret put GOOGLE_CLIENT_SECRET --env development
# Production
wrangler secret put GOOGLE_CLIENT_ID --env production
wrangler secret put GOOGLE_CLIENT_SECRET --env productionRun the following to check your setup:
# Frontend
npm start
# Check console for OAuth validation messages
# Backend
wrangler dev
# Check logs for OAuth validation messagescd backend
npm install
# Set up OAuth secrets (replace with your actual values)
wrangler secret put GOOGLE_CLIENT_ID
wrangler secret put GOOGLE_CLIENT_SECRET
# Optional: AI service keys
wrangler secret put GEMINI_API_KEY
wrangler secret put HUGGINGFACE_API_KEY
# Run locally
wrangler devcd frontend
npm install
npm startcd backend
wrangler deploy --env productioncd frontend
npm run deploy