{"id":20517460,"url":"https://github.com/raphaeltm/reactprismicfirebasestarter","last_synced_at":"2026-04-16T10:31:16.096Z","repository":{"id":93746049,"uuid":"101255847","full_name":"raphaeltm/ReactPrismicFirebaseStarter","owner":"raphaeltm","description":null,"archived":false,"fork":false,"pushed_at":"2017-10-27T18:20:00.000Z","size":5702,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-20T08:50:56.994Z","etag":null,"topics":["firebase","prismic","prismic-reactjs","prismicio","react","reactjs","sass","webpack"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/raphaeltm.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,"publiccode":null,"codemeta":null}},"created_at":"2017-08-24T05:02:46.000Z","updated_at":"2017-09-17T06:17:27.000Z","dependencies_parsed_at":"2023-06-26T02:04:17.327Z","dependency_job_id":null,"html_url":"https://github.com/raphaeltm/ReactPrismicFirebaseStarter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/raphaeltm/ReactPrismicFirebaseStarter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphaeltm%2FReactPrismicFirebaseStarter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphaeltm%2FReactPrismicFirebaseStarter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphaeltm%2FReactPrismicFirebaseStarter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphaeltm%2FReactPrismicFirebaseStarter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raphaeltm","download_url":"https://codeload.github.com/raphaeltm/ReactPrismicFirebaseStarter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphaeltm%2FReactPrismicFirebaseStarter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31881963,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T09:23:21.276Z","status":"ssl_error","status_checked_at":"2026-04-16T09:23:15.028Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","prismic","prismic-reactjs","prismicio","react","reactjs","sass","webpack"],"created_at":"2024-11-15T21:35:31.984Z","updated_at":"2026-04-16T10:31:16.061Z","avatar_url":"https://github.com/raphaeltm.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Prismic / React / Firebase Starter\n\n## Includes sitemaps, some open graph stuff, Prismic Custom Types, and a flexible templating system.\n\nThis starter will help you get setup with Prismic and React. \n\nWebpack is setup so you can use a bunch of es2015 stuff, and it supports Sass, to make styling faster. It's built on redux and includes react-router.\n\nThis project is also setup to make it easy to deploy to Firebase, including a single Firebase Cloud Function that will generate a sitemap.xml file for you.\n\n*NOTE:* For the cloud function to work properly, you will need to be on a paid plan with Firebase, because only Google services are reachable from a function on the free plan (i.e. you can't make calls to Prismic without a paid Firebase plan). That being said, if you use he Blaze plan, you get 2 million function calls for free every month.\n\n### Installation\n\nClone this repo and run:\n\n`npm install \u0026\u0026 cd functions \u0026\u0026 npm install \u0026\u0026 cd ..`\n\nThat will install dependencies in the root project and the functions (which are useful if you want to deploy to Firebase and have a sitemap.xml available)\n\nTo setup the Prismic types that I setup for this starter, you can take a look [here](./prismic_types). Each JSON file corresponds to a different type, where the API ID for the type is the same as the filename, without the extension. You'll also want to make sure that the project is pointing towards the correct Prismic repository. You can do that by modifying the [apiEndpoint here](./common/prismic.js).\n\nThis starter is setup to play nice with [Firebase](https://firebase.google.com/). If you want to take advantage of that, you'll want to check out the [.firebaserc](.firebaserc) file and change the default Firebase project to the ID of your Firebase project.\n\n### Routing\n\nThe way the starter is setup, you will need a document of type \"homepage\" to render at the root url. To change the way it looks, modify the component at /src/components/homepage.js. Routing is in the format /:type/:uid. If you have a \"single\" type with the API ID \"about\", then loading the the url /about will load that document. If you have a \"repeatable\" type with the API ID \"products\", then loading the url /products will load the full list of products. If you load the url /products/potato-canon then the app will load just the document of type \"products\" with the UID \"potato-canon\". NOTE: *Your repeatable types must have UIDs to work with this starter project*.\n\n### Templating\n\nWhether you have \"single\" or repeatable types, the appropriate template to render individual documents should be found at /src/components/\\[type's API ID\\].js. \n\n*If a type is repeatable, you must give it a UID field*, otherwise this starter won't work. If a type is repeatable, you can also create an index component named in the following format which will receive a full list of your repeatable type: /src/components/\\[type's API ID\\]-index.js.\n\nTemplates are loaded automatically based on the naming conventions above, and are passed the content through a prop named \"content\". The full document is passed, not just the data, so if you are rendering an individual document (as opposed to an index) that has a title field, you will need to access it through `this.props.content.data.title`. `prismic-reactjs` is included in the starter, so you can render rich text elements like Title fields, or Rich Text fields as follows:\n\n```\nimport React from \"react\";\nimport {RichText} from \"prismic-reactjs\";\n\nclass Homepage extends React.Component {\n  render() {\n    let page = this.props.content.data;\n    return \u003carticle\u003e\n      \u003cheader\u003e\n        {page.title \u0026\u0026 RichText.render(page.title)}\n      \u003c/header\u003e\n    \u003c/article\u003e\n  }\n}\n\nexport default Homepage;\n```\n\nA check is performed before rendering your template components, so access to `this.props.content.data` is guaranteed.\n\n### Development\n\nRun `npm run start` to get the dev server up and running.\n\n### Deployment\n\nI just added Firebase support. So you can go in and replace the firebase \"default\" project ID (currently raphaeltm-b740e) with your own firebase project id.\n\nMake sure to have the Firebase tools installed globally using:\n\n`npm install -g firebase-tools`\n\nThen run `npm run deploy` to deploy your app.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraphaeltm%2Freactprismicfirebasestarter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraphaeltm%2Freactprismicfirebasestarter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraphaeltm%2Freactprismicfirebasestarter/lists"}