Skip to content

This is a starter project using a server side rendering Next.js application on Firebase Cloud Function with Firebase Hosting.

License

Notifications You must be signed in to change notification settings

cryptolympix/next-pwa-firebase-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Next.js Starter

This is a starter project implementing a server side rendering Next.js progressive web application on Firebase Cloud Function with Firebase Hosting. Enjoy it !

Stack

Features

  • 🚀 Server side rendering application
  • 🏳‍🌈 Internationalization
  • 🚀 Progressive web app
  • 💯 High Lighthouse scores
  • ✅ Cache control
  • 🚀 SEO optimized
  • ✅ Twitter Cards meta
  • ✅ OpenGraph structured data
  • 📦 Uses the popular, well-maintained Material UI React component library
  • 🚀 Styles optimized (postcss, clean-css)

Quick Start

# Install dependencies
npm install

# Log in to firebase account
node_modules/.bin/firebase login

# Choose a firebase project
node_modules/.bin/firebase use <project_id>

# Build
npm run build-all

# Run in dev mode
npm run dev

# Deploy locally
npm run serve

# Deploy to firebase
npm run deploy-<dev|stag|prod>

Configuration

  • Firebase configuration :

    • Log in to your firebase account with the command node_modules/.bin/firebase login.
    • Update the file .firebaserc with your own firebase projects id. You can get them using node_modules/.bin/firebase projects:list.
    • Add your Firebase project configurations in /src/app/utils/firebase.js.
  • Common configurations (/src/app) :

    • You can configure somes in the folder utils : the common config of the application in config.js, the material-ui themes in the folder theme.
    • To configure the localization, update locales.json. The locale path folder is at utils/locales/.
  • Internationalization (/src/app):

    • The locale is implemented manually in the style of react-i18next. The locales can be configured with locales.json.
    • The locale folder is located in utils/locales/.
    • We attribute for each page a key to identify it in the locale resources. This keys are specified in locales.json.

About

This is a starter project using a server side rendering Next.js application on Firebase Cloud Function with Firebase Hosting.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published