FirebasCMS is an e-commerce and blogging platform with a storefront and CMS built with Angular 4 (Angular CLI), Firebase (AngularFire2), Angular Material and Stripe. Create, moderate and manage pages, blog posts, products, orders, customers, carts, navigation, themes, admins and more with this web application.
Install Angular CLI
npm install -g @angular/cli
Install NPM packages
Run `npm install` or `yarn install`
cd functions/
Run `npm install`
Create a Firebase account, create a new project, and copy the config code for your project.
Enable Google, Email/Password and Anonymous in the 'Sign-In Method' tab of the Authentication section in your Firebase project Console.
Within the project folder, run:
cd src
mkdir environments
cd environments
touch environment.ts
touch environment.prod.ts
Open 'environment.ts' and add your Firebase config as follows:
export const environment = {
production: false,
firebase: {
apiKey: "xxxx",
authDomain: "xxxxx",
databaseURL: "xxxxx",
projectId: "xxxxx",
storageBucket: "xxxx",
messagingSenderId: "xxxx"
}
};
Open 'environment.prod.ts' and add your Firebase config as follows:
export const environment = {
production: true,
firebase: {
apiKey: "xxxx",
authDomain: "xxxxx",
databaseURL: "xxxxx",
projectId: "xxxxx",
storageBucket: "xxxx",
messagingSenderId: "xxxx"
}
};
Create a Stripe account.
Add your Stripe API Secret Key to firebase config:
firebase functions:config:set stripe.token=<YOUR STRIPE SECRET KEY>
Open 'environment.ts' and add your Stripe Publishable API Key as follows:
export const environment = {
production: false,
firebase: {
apiKey: "xxxx",
authDomain: "xxxxx",
databaseURL: "xxxxx",
projectId: "xxxxx",
storageBucket: "xxxx",
messagingSenderId: "xxxx"
},
stripe: "<YOUR STRIPE PUBLISHABLE KEY>"
};
Open 'environment.prod.ts' and add your Stripe Publishable API Key as follows:
export const environment = {
production: true,
firebase: {
apiKey: "xxxx",
authDomain: "xxxxx",
databaseURL: "xxxxx",
projectId: "xxxxx",
storageBucket: "xxxx",
messagingSenderId: "xxxx"
},
stripe: "<YOUR STRIPE PUBLISHABLE KEY>"
};
You'll need to manually add your first admin account. To generate a hashcode for it...
npm run hashcode
and enter your email. Copy hashcode/admins/<YOUR HASHCODE>/
as follows:admins: {
<YOUR HASH CODE>: {
{
email: '<YOUR EMAIL>',
role: 'super-admin'
}
}
}
firebase functions:config:set gmail.email="<EMAIL ADDRESS>" gmail.password="<PASSWORD>"
Run ng serve
for a dev server. The app will automatically reload if you change any of the source files.
Navigate to http://localhost:4200/
to access the front end.
Navigate to http://localhost:4200/login
to access the login page (login is via Google).
Navigate to http://localhost:4200/admin
to access the CMS (user must be logged in and must be part of '/admins' in the Firebase database to access the CMS).
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|module
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the -prod
flag for a production build.
Run npm run deploy
to deploy your project. This command will first build the app for production and then deploy it to Firebase hosting.
There are 3 Admin Roles:
Permission | super-admin | admin | editor |
---|---|---|---|
create new entities | ✓ | ✓ | ✓ |
edit entities | ✓ | ✓ | ✓ |
submit entities for approval | ✓ | ✓ | ✓ |
save entities | ✓ | ✓ | × |
delete entities | ✓ | ✓ | × |
publish/unpublish entities | ✓ | ✓ | × |
edit items awaiting approval | ✓ | ✓ | × |
approve/disapprove changes | ✓ | ✓ | × |
view/add/edit/delete orders | ✓ | ✓ | × |
view/add/edit/delete customers | ✓ | ✓ | × |
view/add/edit/delete menus | ✓ | ✓ | × |
view/add/edit/delete theme settings | ✓ | ✓ | × |
view/add/edit/delete admins | ✓ | × | × |
Firebase的目标是帮助开发人员构建更好的应用程序,并将其发展为成功的业务。 通过照顾您的应用程序后端或基础架构,Firebase可使您专注于为用户解决问题。 在11月的Firebase开发者峰会上宣布的新功能集中在崩溃报告,分析和对游戏开发人员的支持上。 在本文中,我将向您详细介绍已宣布的内容以及如何使用这些工具。 Firebase崩溃报告 自从它在Google I / O上发布以来,它一直
Firebase is a Backend-as-a-Service (BaaS) app development platform that provides hosted backend services such as a realtime database, cloud storage, authentication, crash reporting, machine learning,
@nativescript/* plugins npm run setupnpm start @nativescript/firebase-admob @nativescript/firebase-analytics @nativescript/firebase-app-check @nativescript/firebase-auth @nativescript/firebase-core @n
firebase-ruby 是 Firebase 后端 API 的 Ruby 语言封装。 示例代码: Firebase.base_uri = 'https://<your-firebase>.firebaseio.com/'response = Firebase.push("todos", { :name => 'Pick the milk', :priority => 1 })response.
Firestorm 是一个 firestore 的 TypeScript ORM 框架。 示例代码: import * as firestorm from 'firebase-firestorm';...const firestore = firebase.initializeApp(...);firestorm.initialize(firestore, /* options */);@root
Firebase for Laravel A Laravel package for the Firebase PHP Admin SDK. Installation Laravel Lumen Configuration Usage Multiple projects Upgrading Support License Installation This package requires Lar
Expo Firebase Instagram Made with Expo & Web Firebase SDK Tutorial: https://blog.expo.io/instagram-clone-using-firebase-react-native-expo-cc32f61c7bba Getting Started Download with: git clone https://