Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Online eCommerce Store app in Angular 11.0 & Firebase

License

NotificationsYou must be signed in to change notification settings

AmitXShukla/Online-Shop-eCommerce-App-Angular-6-Firebase

Repository files navigation

- If you like this project, please consider giving it a star (*) and follow me at GitHub & YouTube.

Download Online Store eCommerce App in Angular 11 Firebase with complete source code


This repository is updated to Angular v11.0.0 now.Please don't forget to update tsconfig.json as well.
Click here for Video Tutorial !
In this video, I will show you one complete Online Store eCommerce App using all latest versions like Angular 6, Angularfire2 and Google Firebase/Firestore database, You will be able to download entire source code, deploy it on your local machine or cloud and I will leave it up to you if you want to enhance this and make more changes.
THis tutorial is not for beginners and is not for teaching purpose, but you don't need to be an expert either to understand these technologies.
I recommend to please take this video as a design pattern discussion where I am showing how we can use different technologies to solve real work problems and deliver a great quality app.

Objective: This document serves as an Installation Guide for Elish eStore Cloud free commmunity version Desktop/Mobile App.

Tools: Angular 6, Google Firebase/Firestore

What's included :

In this repository, Only Online Shop portal is included.

Elish CRM Cloud v1.1.8

Elish CRM Cloud provide a completely free desktop and mobile app for managing Customer, Vendors, CRM and other management modules.

future update/version/releases after v1.1.8 baseline release, will include new features and bug fixes for free under community license. For enhancement/feature requests, please open a new issue at this Github Repository.

App Choices:

#A. Elish HCM Cloud also provide a free web and mobile Enterprise app, hosted on Google Cloud with Google Firebase/Firestore database at:

https://alivetracking.com
Google Playstore -https://alivetracking.com

#B. For Community/Developer edition, developers can download a copy of "out of the box installable software package" or complete source code for free.

Below documentation serves as installation instruciton for point #B mentioned above.

  1. Installation Instruction for "out of the box Installable Desktop/Mobile App"
  2. Community/Developers Open Source Code guide

Installation Instruction for "out of the box Installable Desktop/Mobile App"

------------------------------------------------------------------------------------

If you wish to migrate/upgrade your old desktop or client/server software to enterprise desktop/mobile app, please write toinfo@elishconsulting.com for Enterprise version upgrade.

Step #1: Install NodeJS, Angular CLI
Please follow Video Tutorials along installation instruction and proceed to next step when database installation is complete and verified.

Step #2: Signup with Google Firebase
Please follow Video Tutorials along installation instruction and proceed to next step when database installation is complete and verified.

  1. Setup Firebase Sign-in methods (enable Google, Facebook and email signin)
  2. Make sure, Firebase Sign-in method include your domain for autherntication.
  3. Open Firebase > Database > rules
    copy paste following code in rules tab, save and publish.

servicecloud.firestore{match/databases/{database}/documents{match/onlinestore/{document}{allowread:iffalse;allowwrite:iffalse;}match/onlinestore/elish/admins/{documents}{allowread:iftrue;allowwrite:iffalse;}match/onlinestore/elish/carts/{documents}{allowread:ifrequest.auth.uid!=null&&request.auth.uid==get(/databases/$(database)/documents/onlinestore/elish/carts/$(document)).data.authid;allowwrite:ifrequest.auth.uid!=null;}match/onlinestore/elish/product/{documents}{allowread:iftrue;allowwrite:ifrequest.auth.uid!=null;}// rules for estore collectionsmatch/estore/{document}{allowread:ifrequest.auth.uid==get(/databases/$(database)/documents/estore/$(request.auth.uid)).data.authid;allowwrite:iffalse;}match/estore/{document}/product/{prods}{allowread:iftrue;allowwrite:ifrequest.auth.uid==get(/databases/$(database)/documents/estore/$(request.auth.uid)).data.authid;}match/estore/{document}/cart/{shoppingcart}{allowread:ifisSignedIn()&&isDocOwner();allowwrite:ifisSignedIn();}match/estore/{document}/interests/{shoppingcart}{allowread:iffalse;allowwrite:ifisSignedIn();}// rules for PORTALDB collectionsmatch/portaldb/{portaldb}{      allowread,write:ifrequest.auth.uid!=null;}// rules for USERAUTH collectionsmatch/userauth/{userauth}{      allowread,write:ifrequest.auth.uid!=null;}// rules for USERDB collectionsmatch/userdb/{user}{      allowread,write:ifrequest.auth.uid!=null;}// rules for PORTAL collectionsmatch/portal/{portaldb}{      allowread,write:ifrequest.auth.uid!=null;}// rules for USERS collectionmatch/users/{users}{//allow read: if isDocOwner();//allow create: if isSignedIn();//allow write: if isDocOwner() && get(/databases/$(database)/documents/portal/$(request.resource.data.portal)).data.portal == request.resource.data.portal && get(/databases/$(database)/documents/portal/$(request.resource.data.portal)).data.key == request.resource.data.key;    allowread,write:ifrequest.auth.uid!=null;}}// helper functionsfunctionisDocOwner(){// assuming document has a field author which is uid// Only the authenticated user who authored the document can read or writereturnrequest.auth.uid==resource.data.author;// This above read query will fail// The query fails even if the current user actually is the author of every story document.//  The reason for this behavior is that when Cloud Firestore applies your security rules,//  it evaluates the query against its potential result set,//   not against the actual properties of documents in your database.//   If a query could potentially include documents that violate your security rules,//   the query will fail.//   on your client app, make sure to include following//   .where("author", "==", this.afAuth.auth.currentUser.uid)}functionisSignedIn(){// check if user is signed inreturnrequest.auth.uid!=null;}functionisAdmin(){returnget(/databases/$(database)/documents/attendanceusers/$(request.auth.uid)).data.isAdmin==true;}// examples from firestorefunctionsignedInOrPublic(){// True if the user is signed in or the requested data is 'public'// assuming document has a field name 'visibility'returnrequest.auth.uid!=null||resource.data.visibility=='public';}functiongetRole(rsc){// Read from the "roles" map in the resource (rsc).returnrsc.data.roles[request.auth.uid];}functionisOneOfRoles(rsc,array){// Determine if the user is one of an array of rolesreturnisSignedIn()&&(getRole(rsc)inarray);}functiononlyContentChanged(){// Ensure that user is not updating their own roles// fields are added to the document.returnrequest.resource.data.roles=='';}functionisModuleAdmin(){returnget(/databases/$(database)/documents/payrollusers/$(request.auth.uid)).data.roles["admin"]==true;}}


[8]ページ先頭

©2009-2025 Movatter.jp