Bindary turns completed tasks into poems and stores them in a private, Firebase-backed library.
- Node.js 20.x or newer
- A Firebase project with Authentication and Firestore enabled
-
Install dependencies:
npm install
-
Create a
.envfile in the project root. -
Copy the values from
.env.exampleand fill in your Firebase project settings: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=
-
In Firebase Console, enable:
- Authentication with Email/Password sign-in
- Cloud Firestore
-
Make sure Firestore rules allow each signed-in user to read and write their own data.
A matching rules file is included in
firestore.rules. Deploy it to your Firebase project before using the app. If you use the Firebase CLI, the includedfirebase.jsonis already wired to that rules file.Example rules:
rules_version = '2'; service cloud.firestore { match /databases/{database}/documents { function isSignedIn() { return request.auth != null; } function isOwner(userId) { return isSignedIn() && request.auth.uid == userId; } match /users/{userId} { allow read, write: if isOwner(userId); match /books/{bookId} { allow read, create, update, delete: if isOwner(userId); } match /tasks/{taskId} { allow read, create, update, delete: if isOwner(userId); } } } }
Start the Vite dev server:
npm run dev
If the default port is already in use, Vite will choose another one automatically.
Create a production build:
npm run build
The built app is written to dist/.
This project is configured for:
https://squidly1408.github.io/pages/Bindary/
The Vite base path is already set for that location in vite.config.js.
When deploying:
- Run
npm run build. - Upload the contents of
dist/to the GitHub Pages target. - Keep the site published at
/pages/Bindary/so the asset paths stay correct.
This project is also configured to deploy to Firebase Hosting at:
https://bindary-books.web.app
firebase.json points hosting at dist/ and .firebaserc targets the bindary-books
project, so no extra setup is needed beyond having the Firebase CLI installed and being
logged into an account with access to that project.
-
Install the CLI if you don't already have it:
npm install -g firebase-tools
-
Log in once:
firebase login
-
Build and deploy:
npm run build firebase deploy --only hosting
Firestore rules deploy separately with
firebase deploy --only firestore.
index.html also carries two other Google integrations, both site-wide:
- A
google-site-verificationmeta tag plus public/googlec4dc011b74e61d45.html, used to verify site ownership in Google Search Console. - A Google Ads conversion tag (
gtag.js,AW-18399927744) in<head>, used to track conversions for Google Ads campaigns. It only reports data — it doesn't render anything — so it's loaded unconditionally on every screen, including login/loading.
If either ID ever needs to change, update it directly in index.html.
When a user signs in, Bindary stores data in Firestore under:
users/{uid}/booksusers/{uid}/tasks
Auth persistence is enabled, so previously signed-in users should be restored on reload.
- The app uses a single React entry point in
poem-library.jsx. - The favicon, app icon, and social preview image are in
public/. - If Firebase env vars are missing, the app shows a setup screen instead of the login UI.
- If you see
Missing or insufficient permissions, the Firestore rules have not been deployed or the user is not signed in to the same Firebase project.
