All Projects β†’ suevalov β†’ Next Blog Firestore

suevalov / Next Blog Firestore

Licence: mit
Example of blog built with React, Next.js, Firebase Firestore, Styled-Component, Mobx State Tree and other cool technologies

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Next Blog Firestore

Nextjs Redux Starter
Next.js + Redux + styled-components + Express = πŸ˜‡
Stars: ✭ 257 (+17.35%)
Mutual labels:  nextjs, ssr, styled-components
Next Go
Production ready blog + boilerplate for Next.js 3.X
Stars: ✭ 254 (+15.98%)
Mutual labels:  nextjs, ssr, styled-components
Pizzaql
πŸ• Modern OSS Order Management System for Pizza Restaurants
Stars: ✭ 631 (+188.13%)
Mutual labels:  nextjs, ssr, styled-components
gbkel-portfolio
πŸ’Ž My personal website that's mainly powered by Next.js, my own style guide and a lot of other technologies.
Stars: ✭ 12 (-94.52%)
Mutual labels:  styled-components, ssr, nextjs
Next Firebase Ssr
An Next.js example repo for building authenticated pages with Firebase Authentication, cookies, and getServerSideProps
Stars: ✭ 192 (-12.33%)
Mutual labels:  nextjs, firebase-auth, ssr
React Firebase Starter
Boilerplate (seed) project for creating web apps with React.js, GraphQL.js and Relay
Stars: ✭ 4,366 (+1893.61%)
Mutual labels:  firestore, ssr, styled-components
Moveit
πŸš€ NLW #4 | React+ TypeScript + NextJS + StyledComponents + Firebase + MongoDb +Axios
Stars: ✭ 39 (-82.19%)
Mutual labels:  nextjs, firebase-auth, styled-components
Gank
πŸ¦… Gank api base β–³ next.js (react&ssr)
Stars: ✭ 122 (-44.29%)
Mutual labels:  nextjs, ssr
React Next Boilerplate
πŸš€ A basis for reducing the configuration of your projects with nextJS, best development practices and popular libraries in the developer community.
Stars: ✭ 129 (-41.1%)
Mutual labels:  nextjs, styled-components
Egg React Ssr
ζœ€ε°θ€ŒηΎŽηš„Egg + React + SSR ζœεŠ‘η«―ζΈ²ζŸ“εΊ”η”¨ιͺ¨ζžΆοΌŒεŒζ—Άζ”―持JSε’ŒTS
Stars: ✭ 1,837 (+738.81%)
Mutual labels:  nextjs, ssr
Next I18next
The easiest way to translate your NextJs apps.
Stars: ✭ 2,818 (+1186.76%)
Mutual labels:  nextjs, ssr
Firebasecrud
Rich UI and animation flutter app backed by firebase
Stars: ✭ 121 (-44.75%)
Mutual labels:  firestore, firebase-auth
Razzle Material Ui Styled Example
Razzle Material-UI example with Styled Components using Express with compression
Stars: ✭ 117 (-46.58%)
Mutual labels:  ssr, styled-components
Nextjs Vercel Firebase
Next.js app using API routes to connect with Firestore.
Stars: ✭ 133 (-39.27%)
Mutual labels:  firestore, nextjs
Reeakt
A modern React boilerplate to awesome web applications
Stars: ✭ 116 (-47.03%)
Mutual labels:  ssr, styled-components
Goober
πŸ₯œ goober, a less than 1KB πŸŽ‰ css-in-js alternative with a familiar API
Stars: ✭ 2,317 (+957.99%)
Mutual labels:  ssr, styled-components
Firebase Php
Unofficial Firebase Admin SDK for PHP
Stars: ✭ 1,657 (+656.62%)
Mutual labels:  firestore, firebase-auth
Next Dark Mode
πŸŒ‘ Enable dark mode for Next.js apps
Stars: ✭ 133 (-39.27%)
Mutual labels:  nextjs, styled-components
Firebase Functions Next Example
Host a Next.js SSR React app on Cloud Functions for Firebase with Firebase Hosting
Stars: ✭ 215 (-1.83%)
Mutual labels:  nextjs, ssr
Ran
⚑ RAN! React . GraphQL . Next.js Toolkit ⚑ - SEO-Ready, Production-Ready, SSR, Hot-Reload, CSS-in-JS, Caching, CLI commands and more...
Stars: ✭ 2,128 (+871.69%)
Mutual labels:  nextjs, styled-components

Next Blog Firestore

code style: prettier style: styled-components

Next Blog Firestore

This blog uses Next.js for SSR & Firebase Firestore API for storing and fetching data. Create and edit your content in simple custom content management system built with React, Mobx State Tree and Styled Components.

Clone this repo and use it as starting point to create your own fancy blog.

Technology stack:

What you get:

  • Posts feed
  • Featured posts
  • Posts by tags and category
  • Multi language support
  • Multi author support
  • Markdown with ability to use custom React components
  • Simple and convenient CMS inspired by Ghost
  • CMS is protected by Firebase Auth
  • Quick and SEO-friendly responses with SSR
  • Good results in Lighthouse

Getting started

Step 1. Create Firebase account

Create Firebase account

Step 2. Setup Authentication Method

  • Click Set up sign-in method on Authentication section.
  • Enable just Google authentication provider.
  • Add your domain (if you have one) to Authorized domains.

Setup authentication

Step 3. Create Firestore database

  • Go to Database section and create Firestore instance.

Create Firestore database

Firestore is still in beta, but it doesn't make it less awesome.

Step 4. Database configuration.

  • Go to Rules section in your database and paste configuration from .firebase-rules in project root.
  • Publish new rules.

Step 5. Set up Firebase secret keys for our app.

  • Create .env at the root of the project. Do not commit this file. It is personal data that should not be available for everyone.
  • Go to Project settings in Firebase console (click on the gear icon next to Project Overview).
  • Copy data from this page to .env in the following format:
F_PROJECT_ID=<your Project ID>
F_AUTH_DOMAIN=<your Project ID>.firebaseapp.com
F_API_KEY=<your Web API Key>

Step 6. Set up Firebase Admin SDK key for importing/exporting data from database.

In order to be able to initialize database with initial seed we need to generate private Firebase Admin service key.

  • Go to Project Settings > Service Accounts and click Generate new private key button.
  • Save downloaded file as firebase-service-key.json at project root. ** Do not commit this file. It's added to .gitignore by default.

Step 7. Initialize database with initial data.

We almost finished. Let's initialize our database with initial data.

yarn
yarn run seed

Step 8. Setup database indexes.

We need manually setup indexes in our Firestore database to be able to make REST requests to our Firebase.

  • Go to Database > Indexes and create the following index.

Create indexes

Step 9. Run blog locally.

We're ready to launch our blog locally.

yarn dev

Blog is up and running on http://localhost:3000.

Step 10. Sign in to admin part.

Wait.. But what's about CMS part?

  • Go to http://localhost:3000/admin and click on "Click to start writing".
  • Sign-in with your Google Account in popup window.
  • Go to Firebase Console and add author rights to account you just signed in with.
    • Copy User UID in Authentication section.
    • Create authors collection in Database
    • Create a record in authors collection, where documentId is UID of the user and name is id of user in config.js file.

Map author and user

Step 11. Ready to go!

License

Licensed under the MIT License, Copyright Β© 2018-present Alexander Suevalov

See LICENSE for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].