{"id":18992299,"url":"https://github.com/narze/remix-v2-with-firebase","last_synced_at":"2026-06-30T00:32:10.337Z","repository":{"id":216131248,"uuid":"740545468","full_name":"narze/remix-v2-with-firebase","owner":"narze","description":"Remix (v2) with Firebase example, with packages up-to-date","archived":false,"fork":false,"pushed_at":"2024-01-08T15:08:52.000Z","size":166,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-30T00:32:09.343Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/narze.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2024-01-08T15:06:59.000Z","updated_at":"2026-01-05T19:02:30.000Z","dependencies_parsed_at":"2024-01-08T16:54:06.973Z","dependency_job_id":null,"html_url":"https://github.com/narze/remix-v2-with-firebase","commit_stats":null,"previous_names":["narze/remix-v2-with-firebase"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/narze/remix-v2-with-firebase","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/narze%2Fremix-v2-with-firebase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/narze%2Fremix-v2-with-firebase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/narze%2Fremix-v2-with-firebase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/narze%2Fremix-v2-with-firebase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/narze","download_url":"https://codeload.github.com/narze/remix-v2-with-firebase/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/narze%2Fremix-v2-with-firebase/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34948227,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-29T02:00:05.398Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T17:17:10.695Z","updated_at":"2026-06-30T00:32:10.282Z","avatar_url":"https://github.com/narze.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"(src: https://github.com/remix-run/examples/tree/main/firebase)\n\n# Firebase\n\nThis project demonstrates how to use Firebase with Remix.\n\n## Preview\n\nSee the screen recording at `./screen_recording.gif` or Open this example on [CodeSandbox](https://codesandbox.com):\n\n\u003c!-- TODO: update this link to the path for your example: --\u003e\n\n[![Open in CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/remix-run/examples/tree/main/firebase)\n\n## Running locally\n\nTo run it, you need to either:\n\n### 1. Run against a Firebase Project\n\n1. [Create a Firebase Project](https://console.firebase.google.com)\n2. Enable Auth (with email) and Firestore\n3. Add a Web App\n4. Get the [admin-sdk](https://firebase.google.com/docs/admin/setup#initialize-sdk) and [Web API Key](https://firebase.google.com/docs/reference/rest/auth)\n5. Save them to SERVICE_ACCOUNT and API_KEY in the `.env`-file\n\n### 2. Use the Firebase emulators\n\n1. Run `npm run emulators` in one terminal window\n2. Run `npm run dev` in a second\n\nWhen the SERVICE_ACCOUNT and CLIENT_CONFIG environment variables have not been set, `npm run dev` will default to using the local emulator.\n\nWhen you run `npm run emulators`, an initial user is created with credentials `user@example.com:password`. This can be configured in `firebase-fixtures/auth/accounts.json` or via the emulator UI.\n\n## Deploying\n\n1. Follow the \"Run against a Firebase Project\" steps above if not done already\n2. Install the Firebase CLI with `npm i -g firebase-tools`\n3. Log in to the CLI with `firebase login`\n4. Run `firebase use --add` and choose the Firebase project you want to deploy to\n5. Deploy with `firebase deploy`\n\n## Details\n\n### Auth (`app/server/auth.server.ts`)\n\n`signIn` returns a Firebase session-cookie-string, when sign-in is successfull. Then Remix `cookieSessionStorage` is used to set, read and destroy it.\n\n`signUp` creates a user and calls sign-in to receive the session cookie.\n\n`requireAuth` uses `firebase-admin` to verify the session cookie. When this check fails, it throws a `redirect` to the login page. Use this method to protect loaders and actions. The returned `UserRecord` can be handy to request or manipulate data from the Firestore for this user.\n\n### Firestore (`app/server/db.server.ts`)\n\nRequests to the Firestore are made using the `firebase-admin`-SDK. You need to check validity of your requests manually, since `firestore.rules` don't apply to admin requests.\n\n`converter` and `datapoint` are utilities to allow typed Firestore data reads and writes.\n\n## Links\n\n- [Firestore Data Converters](https://firebase.google.com/docs/reference/node/firebase.firestore.FirestoreDataConverter) for typing\n- [Firebase Session Cookies](https://firebase.google.com/docs/auth/admin/manage-cookies)\n- [Remix `cookieSessionStorage`](https://remix.run/utils/sessions#createcookiesessionstorage)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnarze%2Fremix-v2-with-firebase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnarze%2Fremix-v2-with-firebase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnarze%2Fremix-v2-with-firebase/lists"}