React + Vite + Firebase (Auth + Firestore), built to host on GitHub Pages.
- Google sign-in via Firebase Auth
- Scripts list — create, edit, delete scripts (Firestore, scoped to your user)
- Teleprompter — auto-scrolling reader with speed, text size, and mirror controls (space = play/pause, ↑/↓ = speed, esc = exit)
- Go to the Firebase console → Add project.
- Build → Authentication → Get started → Sign-in method → Google → Enable.
- Build → Firestore Database → Create database (start in production mode).
- Project settings → General → Your apps → Web app (
</>), register the app, and copy thefirebaseConfigvalues. - Deploy
firestore.rules(included) with the Firebase CLI, or paste its contents into Firestore → Rules in the console:These rules make sure a signed-in user can only read/write their own scripts.firebase deploy --only firestore:rules
cp .env.example .envFill in .env with the six values from step 1.4. Then:
npm install
npm run devOpen the local URL Firebase/Vite prints. Sign in with Google — the first time,
add localhost under Authentication → Settings → Authorized domains if it's
not already there (it usually is by default).
Two options — pick one.
- In
vite.config.js, setbaseto match your repo:- Project site (
https://<user>.github.io/<repo>/) →base: '/<repo>/' - User/org site (repo named
<user>.github.io) →base: '/'
- Project site (
- Push the repo to GitHub, then run:
This builds the app and pushes
npm run deploy
dist/to agh-pagesbranch. In the repo's Settings → Pages, set the source to thegh-pagesbranch.
A workflow is included at .github/workflows/deploy.yml.
- In repo Settings → Pages, set Source to "GitHub Actions".
- In repo Settings → Secrets and variables → Actions, add the six
VITE_FIREBASE_*values from your.envas repository secrets (same names). - Push to
main— the workflow builds and deploys automatically.
Add your GitHub Pages domain to Firebase so Google sign-in works there too:
Authentication → Settings → Authorized domains → Add domain → e.g.
<user>.github.io.
- Routing uses
HashRouter(URLs like/#/scripts) specifically so client-side routes work on GitHub Pages without extra server rewrite rules. - Scripts are stored in a single
scriptsFirestore collection with auserIdfield; the security rules restrict all reads/writes to the owning user. - Everything is deliberately minimal — no state management library, no UI kit — so it's easy to extend (e.g. remote-control from a phone, script folders, countdown before rolling).