Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rioam2/starter-firebase-nextjs
🚀 Starter code for React.js web applications supported with SSR by Next.js on Google Firebase Cloud Functions
https://github.com/rioam2/starter-firebase-nextjs
firebase firestore fullstack nextjs react template
Last synced: about 2 hours ago
JSON representation
🚀 Starter code for React.js web applications supported with SSR by Next.js on Google Firebase Cloud Functions
- Host: GitHub
- URL: https://github.com/rioam2/starter-firebase-nextjs
- Owner: rioam2
- License: mit
- Created: 2019-06-14T00:34:45.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T06:38:03.000Z (almost 2 years ago)
- Last Synced: 2023-03-02T15:09:25.067Z (over 1 year ago)
- Topics: firebase, firestore, fullstack, nextjs, react, template
- Language: JavaScript
- Homepage:
- Size: 1.18 MB
- Stars: 15
- Watchers: 0
- Forks: 2
- Open Issues: 26
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @template/starter-firebase-nextjs
Forked from [@jthegedus/firebase-gcp-examples](https://github.com/jthegedus/firebase-gcp-examples/tree/master/functions-nextjs) and adapted for personal taste.
## Quickstart
To use this template, click ["Use Template"](https://github.com/rioam2/starter-firebase-nextjs/generate) at the top of the page. This will guide you through generating a new repository with this as a base. Next, head over to [Firebase](https://console.firebase.google.com) and create a new project to host your site. Take note of the project id. Finally, clone your newly generated repository and run these commands (as applicable) from the project root:
```shell
yarn setup # setup environment variables and CI/CD
yarn dev # start live dev server
yarn preview:staging # staging preview
yarn preview:production # production preview
yarn deploy:staging # publish to staging Firebase project
yarn deploy:production # publish to production Firebase project
```# Manual Environment Setup:
If you are unable to use the automated setup script, you can still manually create the following `.env` file to setup your project:
```js
// .env
STATIC_PROD_PROJECT=... // production Firebase project-id
STATIC_PROD_WEBAPP_KEY=... // from firebase console
STATIC_STAGE_PROJECT=... // (optional) staging Firebase project-id
STATIC_STAGE_WEBAPP_KEY=... // (optional) from firebase console
STATIC_DEPLOY_KEY=... // from yarn firebase login:ci
```For CI/CD with TravisCI, you will need to do the following:
1. Authorize TravisCI and enable on repository (if applicable).
2. Add environment variables in your repository settings on TravisCI for the each of the variables in your `.env` file.# Syncing upstream changes from this template
If you would like to keep your template instance up-to-date with this source repository, you can do the following to select and apply updates:
```shell
yarn update
```This will allow you to apply all necessary, tested, non-breaking patches and changes.