Daily Bug is a simple bug-spotting game which can help you get better at code review.
It keeps you playing with typical "gamification" features: levels, EXP and items obtainable through a gacha system.
You can try the live web version here! Good luck!
|
|
|
(the GIFs may take a few seconds to load)
- Frontend: Expo + React Native
- Backend: Next.js
- Auth:
- Firebase Auth (player side)
- NextAuth / credentials (admin side)
- Database: Turso/libSQL
- Deployment:
- Cloudflare Pages (web frontend)
- Vercel-compatible Next.js hosting (backend)
- EAS Build (Android)
npx expo start --dev-clientnpx expo export --platform web
npx wrangler pages deploy dist --project-name dailybugnpx expo start --dev-clienteas build --profile development --platform androidnpm run devnpm run buildThis project has two apps (frontend/ and backend/) and each one reads its own environment variables.
The frontend uses only EXPO_PUBLIC_* variables.
frontend/webpack.config.js loads these variables from:
frontend/.env.local(first)frontend/.env(fallback)- Existing OS/CI environment variables
Only variables starting with EXPO_PUBLIC_ are injected into the app bundle.
Use frontend/.env.example as the template:
EXPO_PUBLIC_FIREBASE_API_KEY=your_api_key
EXPO_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
EXPO_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
EXPO_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
EXPO_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
EXPO_PUBLIC_FIREBASE_APP_ID=your_app_id
EXPO_PUBLIC_API_URL=http://127.0.0.1:3000/apiEXPO_PUBLIC_API_URL should point to the backend API base URL.
cd frontend
cp .env.example .env.localThen edit .env.local with your Firebase and API values.
The backend reads variables from process.env in code under backend/lib and backend/app/api.
For local development, create backend/.env.local.
# Turso / libsql database
DB_URL=libsql://your-db.turso.io
DB_TOKEN=your_turso_auth_token
# Firebase Admin SDK service account JSON (single-line JSON string)
FIREBASE_SERVICE_ACCOUNT_KEY={"type":"service_account",...}
# Admin sign-in password for /admin
ADMIN_SECRET=change_me
# Shared API secret checked by /api/bugs/all
API_SECRET=change_me_too
# Bearer secret for cron-like push endpoint auth
CRON_SECRET=change_me_again
# NextAuth secret (NextAuth is used for the admin panel auth)
NEXTAUTH_SECRET=generate_a_long_random_secretCreate backend/.env.local and paste the variables above.
If your Firebase credentials are in a file, convert them to one-line JSON before assigning to FIREBASE_SERVICE_ACCOUNT_KEY.



