All Projects → ibonkonesa → barber-shop

ibonkonesa / barber-shop

Licence: other
Vue + Firebase (cloud functions, auth, firestore, hosting) reservations system

Programming Languages

Vue
7211 projects
javascript
184084 projects - #8 most used programming language
SCSS
7915 projects

Projects that are alternatives of or similar to barber-shop

serverless-rest-api
Building RESTful Web APIs with Firebase Cloud Function, Firestore, Express and TypeScript
Stars: ✭ 103 (+119.15%)
Mutual labels:  cloud-functions, firestore
universal-translator
Demo app using Firebase and Google Cloud products to implement a "universal translator"
Stars: ✭ 37 (-21.28%)
Mutual labels:  cloud-functions, firestore
app
Source code of intencje.pl website and mobile/desktop apps based on Angular, Firebase, and Capacitor.
Stars: ✭ 12 (-74.47%)
Mutual labels:  cloud-functions, firestore
rowy
Open-source Airtable-like experience for your database (Firestore) with GCP's scalability. Build any automation or cloud functions for your product. ⚡️✨
Stars: ✭ 2,676 (+5593.62%)
Mutual labels:  cloud-functions, firestore
foundry-cli
Foundry makes the development of Firebase Functions fast by giving you an out-of-the-box working cloud environment for your development with an access to your production data. It's a CLI tool that gives you a continuous REPL-like feedback about your Firebase Functions.
Stars: ✭ 49 (+4.26%)
Mutual labels:  cloud-functions, firestore
firebase-jest-testing
Firebase back-end testing, using Jest.
Stars: ✭ 21 (-55.32%)
Mutual labels:  cloud-functions, firestore
fireschema
Strongly typed Firestore framework for TypeScript
Stars: ✭ 193 (+310.64%)
Mutual labels:  cloud-functions, firestore
Madara
✍️ A way for people to manage their tasks.
Stars: ✭ 17 (-63.83%)
Mutual labels:  firestore
argon
Campaign Manager 360 and Display & Video 360 Reports to BigQuery connector
Stars: ✭ 31 (-34.04%)
Mutual labels:  cloud-functions
firecode
A light, fast, and memory-efficient collection traversal library for Firestore and Node.js.
Stars: ✭ 171 (+263.83%)
Mutual labels:  firestore
functions-framework-php
FaaS (Function as a service) framework for writing portable PHP functions
Stars: ✭ 186 (+295.74%)
Mutual labels:  cloud-functions
FireCat
Firestore real time pagination for Android
Stars: ✭ 15 (-68.09%)
Mutual labels:  firestore
firestore-store
express-session store for Firebase Cloud Firestore
Stars: ✭ 44 (-6.38%)
Mutual labels:  firestore
FireSnapshot
A useful Firebase-Cloud-Firestore Wrapper with Codable.
Stars: ✭ 56 (+19.15%)
Mutual labels:  firestore
waylan android
A dictionary concept for Android ~ Making words and their meanings available through a natural and beautiful experience
Stars: ✭ 13 (-72.34%)
Mutual labels:  firestore
KanjiMaru
Flashcard and Kanji writing Flutter App. Stopped working on this Project. Currently just a graveyard.
Stars: ✭ 26 (-44.68%)
Mutual labels:  firestore
serverless-ktp-ocr
Serverless Indonesian Identity E-KTP OCR with Google Cloud Platform (GCP) - Cloud Functions, Cloud Storage, and Cloud PubSub
Stars: ✭ 54 (+14.89%)
Mutual labels:  cloud-functions
stor
[DEPRECATED] STOR provides a JSON database with the power of HTTP requests 🚀
Stars: ✭ 18 (-61.7%)
Mutual labels:  firestore
react-native-firebase-firestore-crud-example
React Native Firebase Tutorial: Build CRUD Firestore App
Stars: ✭ 24 (-48.94%)
Mutual labels:  firestore
dataflow-contact-center-speech-analysis
Speech Analysis Framework, a collection of components and code from Google Cloud that you can use to transcribe audio files to create analytics.
Stars: ✭ 46 (-2.13%)
Mutual labels:  cloud-functions

Barber Shop

Demo is available here

Admin credentials:

Reservations system made with Vue + Firebase ecosystem (cloud functions, auth, firestore, hosting). This example is inspired in a barber shop requirements, but is applicable in a lot of scenarios.

User can make a reservation getting a code. This code could be used to cancel the reservation.

You can deploy a reservation system without a server, but keep in mind this is just a playground.

Comments and contributions will be appreciated. I'm doing it just for fun.

Project setup

Clone this repository

$ git clone https://github.com/ibonkonesa/barber-shop.git

You must create a new Firebase project. Cloud Firestore location must be set to us-central (default). If you choose other location, you must update src/store/user/location variable. Go to database section and create a new cloud firestore database.

This repo have two legs: Cloud functions (act as a backend server, providing authentication and triggering when bookings are written) and a Vue.JS SPA that allow users to make and check reservations.

Cloud functions code is located at cloud-functions folder. In the root of this folder there is a file you have to edit.

Rename .firebaserc.example to .firebaserc and update projects.default value with your Firebase Project id. You can see it on Project Configuration in the Firebase console.

Public folder is a symbolic link to the dist folder. This folder ("public") will be published when you deploy your Firebase project (this feature is called "Hosting". When you create a Firebase project you get some hosting space. You can link your domain with this hosting. Later I explain it better.).

Functions folder contains two important files:

-index: here is where server code is. You are free to update / get better this code. Basically, there are 3 functions:

  • createBooking. Is a trigger launched when a reservation is created in the database. This function will notify if you configure mailing.
  • createToken. This is a http function. It returns a token used by the webapp in order to modify a reservation

-serviceAccountKey.json: If you clone this repo this file shouldn't exists. It's the server side (remember, cloud function act as a server) configuration file. You have to create a new service account from Firebase console. Go to Settings> Service account and generate a new private account. Put the generated file in cloud-functions/functions/serviceAccountKey.json

After setting up cloud functions, you have to configure the front end App. Vue.JS project is located on src folder. There is a file called config/firebase.js.example. Please rename this file to firebase.js and update the config variable with data provided adding a new web application in Firebase project's console. Just update config variable.

Schedule and app config (title, description) are defined in config folder. Constant names are self-descriptive ;)

Admin users must be created in Firebase Console, and they have to be created using Email/Password signing method. All users created with this method will be able to this area.

Now you can deploy this project.

Mailing

You can set up automatic email sending when a client makes a reservation.

Just rename /cloud-functions/functions/mailing.example to /cloud-functions/functions/mailing.js and put gmail sender credentials, and the receiver email. Remember to activate "Gmail less secure apps" (https://myaccount.google.com/lesssecureapps). If you are using 2FA in your sender email, you would have to create an Application Specific password in order to get mailer working. This link could be useful.

Development

With Docker

Just apply the included docker-compose file and go to http://localhost:8080

$ docker-compose up

Locally

Npm:

$ npm install
$ npm run serve

Yarn:

$ yarn install
$ yarn serve

Hot-reload server will be available at http://localhost:8080

Deploy app

After setting up the project, you can deploy the project.

App

This is a vue-cli based project. Install npm packages:

$ npm install

Launch build command:

$ npm run build --prod

Cloud functions and hosting

Cloud functions (triggers and http) must be published. You will need firebase-tools package. Install it:

$ npm install -g firebase-tools

Enter to cloud-function folder:

$ cd cloud-functions

Enter functions folder and install npm packages:

$ cd functions
$ npm install
$ cd ..

The frontend app will be built at /dist folder. Please check if there is a symbolic link in cloud-functions/public pointing to /dist folder. If this link does not exist, execute:

$ ln -s ../dist public

Login to firebase. Firebase (Google) console credential will be required:

$ firebase login

Once you are logged in you can deploy functions and hosting:

$ firebase deploy 

A url will be printed in the terminal and reservation system will be accessible. You can link a custom domain in the Firebase console.

ToDo

  • Mobile app (Quasar? Ionic?)
  • Refactor stores with async/await

CONTRIBUTION

Comments and improvements will be appreciated.

LICENSE

This repo can be cloned, forked, improved without referencing. If you like it and you want me to continue developing you can give me a star this repo :)

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].