A web platform template built on Lit, TypeScript, Vite, and Firebase. Use this
repository as a starting point for new web applications. Search the codebase
for the string watermelon (and Watermelon) to find every place that needs
to be customized for your new project.
| Layer | Technology |
|---|---|
| Frontend | Lit web components |
| Backend | Firebase Firestore |
| Hosting | Firebase Hosting |
| Auth | Firebase Auth — Email Magic Link |
| CI/CD | GitHub Actions → Firebase |
| Build | Vite + TypeScript |
npm install
npm run devnpm run buildPush to main to automatically build, test, and deploy to the development Firebase project.
Production deploys are triggered manually from the GitHub Actions UI:
- Go to Actions → "Deploy to Production"
- Click "Run workflow"
- Enter the branch name, tag, or commit SHA to deploy
- Click "Run workflow" to start the build and deploy
Create a .env file with your Firebase configuration:
VITE_FIREBASE_API_KEY=
VITE_FIREBASE_AUTH_DOMAIN=
VITE_FIREBASE_PROJECT_ID=
VITE_FIREBASE_STORAGE_BUCKET=
VITE_FIREBASE_MESSAGING_SENDER_ID=
VITE_FIREBASE_APP_ID=
Analytics (Google Analytics via gtag.js) are only loaded after the user grants consent through a cookie consent modal that appears on first visit.
- No analytics or tracking are performed until consent is explicitly granted.
- The user's preference is stored in
localStorage(watermelon_analytics_consent). - Users can change their choice at any time via the Cookie Settings link in the navigation bar.
- When consent is revoked, the page reloads to fully remove analytics scripts.
For details on tracked events and privacy, see design/ANALYTICS_EVENTS.md.
To customize this template for a new project:
- Replace
watermelon/Watermeloneverywhere — search the codebase for both casings (case-insensitive search forwatermelonwill catch them all). - Update the Firebase project IDs in
.github/workflows/*.yml. - Replace the Google Analytics measurement ID in
src/services/analytics.ts. - Replace
public/images/watermelon-logo.png, the favicon set, and theweb-app-manifest-*.pngicons underpublic/. - Rewrite
src/components/page-home.ts,page-privacy.ts, andpage-terms.tswith your real copy. - Add your domain-specific routes, components, services, and Firestore
collections (and their security rules in
firestore.rules).