# Optional free sync setup

The game list already works locally without an account, card, server, or paid plan. This adds optional email sign-in and sync between your devices using Firebase's **Spark** plan. Keep the project on Spark. Do not add a billing account, enable phone/SMS sign-in, or switch to Blaze. Spark has free quotas; if you exceed them, Firebase pauses the affected service until the quota resets rather than charging you.

## Set up Firebase

1. Open [Firebase Console](https://console.firebase.google.com/) and create a project. Choose the no-cost **Spark** plan; do not start a billing trial or add a card.
2. In Project settings, register a **Web app**. Copy its `apiKey`, `authDomain`, `projectId`, and `appId` into `firebase-config.js`, replacing the `PASTE_...` values.
3. In **Authentication → Sign-in method**, enable **Email/Password**. Do not enable phone authentication; Firebase requires billing for SMS phone sign-in.
4. In **Firestore Database**, create the default database on the Spark plan.
5. Open Firestore **Rules** and publish the contents of `firestore.rules`. These rules restrict each signed-in account to its own list.
6. Serve the files from a static web host over HTTPS, then open the site and choose **Create free account**. Module imports for Firebase do not work from a `file://` URL. If the site is already on Cloudflare Pages, keep that static Pages deployment and leave Cloudflare Zero Trust / Access off. Firebase Auth and Firestore handle sync; no Cloudflare Access subscription is needed.

The first sign-in merges this browser's list into the cloud list. Later changes sync to devices signed into the same email account. Keep using **Export list** as a backup. If the free Firestore quota is reached, cloud sync can pause, while the local list continues working.

## What is free and what needs setup

- Local catalog, search, statuses, and export: free and works offline.
- Email/password sign-in and small personal list sync: available on Spark without payment details, within Firebase's published free quotas.
- Current RAWG search: optional; it needs a RAWG key and internet. It is not required for the catalog or sync.
- Website hosting: this project is static. Use an existing free static-hosting project if you have one; do not enable a paid plan or Cloudflare Zero Trust to use this feature.
