{"id":21067192,"url":"https://github.com/nirmalscaria/firebase-nextjs","last_synced_at":"2025-08-30T04:12:01.915Z","repository":{"id":245189005,"uuid":"817251797","full_name":"NirmalScaria/firebase-nextjs","owner":"NirmalScaria","description":"Effortless firebase integration for NextJS","archived":false,"fork":false,"pushed_at":"2024-09-24T19:55:01.000Z","size":875,"stargazers_count":103,"open_issues_count":12,"forks_count":10,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-29T08:41:51.651Z","etag":null,"topics":["firebase","firebase-auth","nextjs"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/firebase-nextjs","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NirmalScaria.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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,"publiccode":null,"codemeta":null},"funding":{"github":["NirmalScaria"]}},"created_at":"2024-06-19T10:20:02.000Z","updated_at":"2025-08-26T20:09:05.000Z","dependencies_parsed_at":"2024-06-29T09:39:54.127Z","dependency_job_id":"81cbbe92-5f24-41ff-b0a2-a0c4d405971c","html_url":"https://github.com/NirmalScaria/firebase-nextjs","commit_stats":null,"previous_names":["nirmalscaria/nextfirejs","nirmalscaria/firebase-nextjs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NirmalScaria/firebase-nextjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NirmalScaria%2Ffirebase-nextjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NirmalScaria%2Ffirebase-nextjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NirmalScaria%2Ffirebase-nextjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NirmalScaria%2Ffirebase-nextjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NirmalScaria","download_url":"https://codeload.github.com/NirmalScaria/firebase-nextjs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NirmalScaria%2Ffirebase-nextjs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272679260,"owners_count":24975253,"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","status":"online","status_checked_at":"2025-08-29T02:00:10.610Z","response_time":87,"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":["firebase","firebase-auth","nextjs"],"created_at":"2024-11-19T18:05:12.423Z","updated_at":"2025-08-30T04:12:01.892Z","avatar_url":"https://github.com/NirmalScaria.png","language":"TypeScript","funding_links":["https://github.com/sponsors/NirmalScaria"],"categories":[],"sub_categories":[],"readme":"\n![firebase-nextjs](https://github.com/NirmalScaria/nextfirejs/assets/46727865/48e2f4e1-318c-4877-97a8-df1c6e21604c)\n\n**Effortless Firebase integration for NextJS**\n\nDemo : [https://firebase-nextjs.scaria.dev](https://firebase-nextjs.scaria.dev)\n\n\u003cvideo src=\"https://github.com/user-attachments/assets/12f4429e-6b1d-4869-914a-d3513c681bed\" height=\"800px\"\u003e \u003c/video\u003e\n\n\n# Setup Instructions\n\nThe setup will automatically take care of configurations and credentials. If you would instead prefer to do it all manually, [Click here](#manual-installation).\n\nPrerequisite: A firebase project.\n\n## 1. Install the package\n```bash\nnpm install firebase-nextjs\n```\n\n## 2. Run the setup script\n```bash\nnpx firebase-nextjs setup\n```\n\nThis will\n- Prompt you to log in with Google.\n- You will be asked to select the firebase project you wish to use.\n- You will be asked to choose the service account you wish to use. (\"firebase-admin-sdk\" is recommended)\n- Choose an app you wish to use. (Must be a web app) (If an app doesn't exist, you can create it there.)\n- This will generate the necessary authentication credentials, and store it to the project.\n- With this, basic setup is complete.\n\n## 3. Setup firebase-nextjs Provider\n\nIn the root layout file, (layout.jsx), wrap the whole body in **\\\u003cFirebaseNextJSProvider\\\u003e**\n\n```html\nimport {FirebaseNextJSProvider} from \"firebase-nextjs/client/auth\";\n\n\n\u003chtml lang=\"en\"\u003e\n    \u003cFirebaseNextJSProvider\u003e\n        \u003cbody className={inter.className}\u003e{children}\u003c/body\u003e\n    \u003c/FirebaseNextJSProvider\u003e\n\u003c/html\u003e\n```\n\n## 4. Thats it! Run the project.\n\n```bash\nnpm run dev\n```\n\nThis will require you to sign in to continue. You can use Google Sign In or Email Password Sign In.\n\n# Access the auth state\n\nYou can access the authentication state, and the user object on client side as well as server side easily. Learn more:\nhttps://firebase-nextjs.scaria.dev/auth\n\n# Customisation\n\nfirebase-nextjs offers complete customisation of login pages. To learn more, visit:\nhttps://firebase-nextjs.scaria.dev/custom_login\n\n# Components\n\nfirebase-nextjs comes with many pre built components to help with user authentication and user management. Learn more from:\nhttps://firebase-nextjs.scaria.dev/components\n\n# Routing\n\nYou can customise the rules for routing, and define which pages are public and which pages are for logged in users. Learn more at:\nhttps://firebase-nextjs.scaria.dev/routing\n\n# Moving to production\n\nBefore deploying the app to production, there are few configurations and security measures to be done. Read more at:\nhttps://firebase-nextjs.scaria.dev/production\n\n# For Developers\n\nIf you wish to contribute or make changes to the package, follow the below guide\n\n## Step 1: Fork and clone the repo\n\nFork the repo to your profile and clone the repo locally.\n\n## Step 2: Build the package\n\nRun the command\n\n```\nnpm run build\n```\n\nThis will create a folder 'build' in the directory. It will contain the actual package that you should be using.\n\n## Step 3: Link the package to your project\n\nCreate a nextjs project that you wish to test the package with. (Or use your existing NextJS project). Copy the location of the build directory generated from the previous step.\n\nRun the command\n```\nnpx link /path/to/build/folder/of/firebase-nextjs\n```\n\n## Step 4: Use the package\n\nNow, the package is linked to your project, and it is exactly as if you have installed the package. **Do not add the package name to package.json.**\n\nTo use the package in your project,\nYou can import the files just like you would form an installed package.\n\nExample:\n```\nimport { ProfileButton } from \"firebase-nextjs/client/components\";\n```\n\nTo use the npx script\nYou can run the npx script as usual, and the code in your build folder will be used.\n```\nnpx firebase-nextjs getenv\n```\n\n## Step 5: Modifications\n\nAfter you make any modification to the source code, run \n```\nnpm run build\n```\nThats it and your project will be using the newly built package.\n\n## NOTE: Installing other packages\n\nWhenever you use the command `npm install packagename` to install any package, the npx link will be removed.\nRe run the npx command to link to the build directory again.\n\n## Contributing\n\nIf you have done any modification that might be useful to others, you are welcome to create a pull request and become a contributor.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnirmalscaria%2Ffirebase-nextjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnirmalscaria%2Ffirebase-nextjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnirmalscaria%2Ffirebase-nextjs/lists"}