{"id":15942883,"url":"https://github.com/brandonroberts/analog-angular-firebase-example","last_synced_at":"2025-10-23T18:52:29.025Z","repository":{"id":164573303,"uuid":"639689540","full_name":"brandonroberts/analog-angular-firebase-example","owner":"brandonroberts","description":"An example application with Analog and Angular that deploys to Firebase hosting and functions","archived":false,"fork":false,"pushed_at":"2024-02-09T19:19:18.000Z","size":674,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-29T08:11:14.409Z","etag":null,"topics":["angular","firebase","meta-framework","ssr"],"latest_commit_sha":null,"homepage":"https://analog-js.web.app","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/brandonroberts.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,"dei":null}},"created_at":"2023-05-12T02:27:13.000Z","updated_at":"2025-01-05T00:27:40.000Z","dependencies_parsed_at":"2023-05-27T19:30:37.322Z","dependency_job_id":null,"html_url":"https://github.com/brandonroberts/analog-angular-firebase-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brandonroberts%2Fanalog-angular-firebase-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brandonroberts%2Fanalog-angular-firebase-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brandonroberts%2Fanalog-angular-firebase-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brandonroberts%2Fanalog-angular-firebase-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brandonroberts","download_url":"https://codeload.github.com/brandonroberts/analog-angular-firebase-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237068384,"owners_count":19250057,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["angular","firebase","meta-framework","ssr"],"created_at":"2024-10-07T08:01:32.831Z","updated_at":"2025-10-19T04:30:56.185Z","avatar_url":"https://github.com/brandonroberts.png","language":"TypeScript","readme":"# Analog + Angular + Firebase\n\nThis project was generated with [Analog](https://analogjs.org), the fullstack meta-framework for Angular.\n\n## Setup\n\nRun `npm install` to install the application dependencies.\n\n## Development\n\nRun `npm start` for a dev server. Navigate to `http://localhost:5173/`. The application will automatically reload if you change any of the source files.\n\n## Build\n\nRun `npm run build` to build the client/server project. The client build artifacts are located in the `dist/analog/client` directory. The server for the API build artifacts are located in the `dist/analog/server` directory.\n\n## Test\n\nRun `npm run test` to run unit tests with [Vitest](https://vitest.dev).\n\n## Firebase Deployment\n\nAnalog supports [Firebase Hosting](https://firebase.google.com/docs/hosting) with Cloud Functions out of the box.\n\n**Note**: You need to be on the **Blaze plan** to use Analog with Cloud Functions.\n\nIf you don't already have a `firebase.json` in your root directory, Analog will create one the first time you run it. In this file, you will need to replace `\u003cyour_project_id\u003e` with the ID of your Firebase project.\n\nThis file should then be committed to version control. You can also create a `.firebaserc` file if you don't want to manually pass your project ID to your `firebase` commands (with `--project \u003cyour_project_id\u003e`):\n\n```json [.firebaserc]\n{\n  \"projects\": {\n    \"default\": \"\u003cyour_project_id\u003e\"\n  }\n}\n```\n\nThen, just add Firebase dependencies to your project:\n\n```bash\nnpm install -D firebase-admin firebase-functions firebase-functions-test\n```\n\n### Using Firebase CLI\n\nYou may instead prefer to set up your project with the Firebase CLI, which will fetch your project ID for you, add required dependencies (see above) and even set up automated deployments via GitHub Actions.\n\n#### Install Firebase CLI globally\n\n```bash\nnpm install -g firebase-tools\n```\n\n**Note**: You need to be on [^11.18.0](https://github.com/firebase/firebase-tools/releases/tag/v11.18.0) to deploy a nodejs18 function.\n\n#### Initialize your Firebase project\n\n```bash\nfirebase login\nfirebase init hosting\n```\n\nWhen prompted, you can enter `dist/analog/public` as the public directory. In the next step, **do not** configure your project as a single-page app.\n\nOnce complete, add the following to your `firebase.json` to enable server rendering in Cloud Functions:\n\n```json [firebase.json]\n{\n  \"functions\": { \"source\": \"dist/analog/server\" },\n  \"hosting\": [\n    {\n      \"site\": \"\u003cyour_project_id\u003e\",\n      \"public\": \"dist/analog/public\",\n      \"cleanUrls\": true,\n      \"rewrites\": [{ \"source\": \"**\", \"function\": \"server\" }]\n    }\n  ]\n}\n```\n\nYou can find more details in the [Firebase documentation](https://firebase.google.com/docs/hosting/quickstart).\n\n## Local preview\n\nYou can preview a local version of your site if you need to test things out without deploying.\n\n```bash\nNITRO_PRESET=firebase npm run build\nfirebase emulators:start\n```\n\n## Deploy to Firebase Hosting via CLI\n\nDeploying to Firebase Hosting is a simple matter of just running the `firebase deploy` command.\n\n```bash\nNITRO_PRESET=firebase npm run build\nfirebase deploy\n```\n\n## Community\n\n- Join the [Discord](https://discord.gg/mKC2Ec48U5)\n- Visit and Star the [GitHub Repo](https://github.com/analogjs/analog)\n- Visit the [Website](https://analogjs.org/)\n- Follow us on [Twitter](https://twitter.com/analogjs)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrandonroberts%2Fanalog-angular-firebase-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrandonroberts%2Fanalog-angular-firebase-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrandonroberts%2Fanalog-angular-firebase-example/lists"}