DEV Community

Cover image for Vue.js Firestore CRUD App example

Vue.js Firestore CRUD App example

bezkoder profile image bezkoder ・3 min read

In this tutorial, I will show you step by step to build a Vue.js Firetore CRUD App example.

Full Article:

Vue Firestore CRUD Overview

We're gonna build an Vue Firestore CRUD App using firebase library in which:

  • Each Tutorial has key, title, description, published status.
  • We can create, retrieve, update, delete Tutorials (CRUD operations) from Firebase Firestore

Here are the screenshots:

  • Create a new Tutorial:


Cloud Firestore after the Create Operations:


– Retrieve all Tutorials, the details will show when clicking on any Tutorial:


  • Change status to Published/Pending using Publish/UnPublish button:


  • Update the Tutorial details with Update button:


  • Delete the Tutorial using Delete button:


Vue.js Firestore CRUD Project Structure


Let me explain it briefly.

  • package.json contains 3 main modules: vue, vue-router, firebase.
  • firebase.js configures information to connect with Firebase Project and export Firebase Firestore service.
  • TutorialDataService exports TutorialDataService that uses firebase's Firestore CollectionReference to interact with Firestore collection.
  • There are 3 components that uses TutorialDataService:
    • AddTutorial for creating new item
    • TutorialsList contains list of items, parent of Tutorial
    • Tutorial shows item details
  • router.js defines routes for components.
  • App.Vue contains Router View and navigation bar.

For more details, implementation and Github, please visit:

Further Reading

Related Posts:

Fullstack CRUD App:

Discussion (0)

Editor guide