Skip to content

bekeplar/FabekDesignsIntl

Repository files navigation

FabekDesigns | E-commerce react app

Simple ecommerce react js app with firebase.

Install Dependencies

npm install

Create a new firebase project

Login into your google account and create a new firebase project here

Create a .env.prod file for production and .env.devfor development in the root of your project folder and add the following configuration details. It can be found on your firebase project.

After setting up necessary configuration, create a Database and choose Cloud Firestore and start in test mode

Run development server

npm run dev-server

Build the project

npm run build

How to add products or perform CRUD operations for Admin

  1. Inside src/routers/AppRouter.js uncomment all code related to admin.
  2. Inside src/reducers/authReducer.js, uncomment initState and change the initState type value from 'client' to 'admin'. Delete initState variable if you want to authenticate client.
  3. Inside src/sagas/authSaga.js, on case ON_AUTHSTATE_FAIL, comment out yield put(signOutSuccess()).
  4. Create a Storage in your Firebase Console.
  5. Set Storage and Database Rule to public, change allow read, write: if request.auth != null; to only allow read, write;
  6. Delete persisting auth state in localStorage if one exists. Revert on doing all these if you want to switch back to default user and when you are deploying the app

Features

  • Admin CRUD operations
  • Firebase authentication
  • Firebase auth provider authentication
  • Account creation and edit

About

A website for Fabek Designs Int.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors