Friendly Pix Web
Friendly Pix is a place where you can share photos, follow friends, comment on photos...
To see it in action, have a look at friendly-pix.com
Few words on technology used
Friendly Pix is written in ES2017 using Modules so for wide browser support the code is packed and transpiled to ES5 using Webpack.
The Auth flow is using Firebase-UI.
Server-side micro-services are built on Cloud Functions for Firebase.
Create and configure your Firebase Project
- In a console run
npm installto install all Build/Deploy tools dependencies.
- Create a Firebase project using the Firebase Console.
- Visit the Storage section and enable storage by clicking the Getting Started button.
- Enable Google as a Sign in provider in Firebase Console > Authentication > Sign in Method tab.
- In a console run
firebase use --addand, when prompted, select the Firebase Project you have just created. This will make sure the Firebase CLI is configured to use your particular project.
- [Optional] To enable the automatic inapropriate image blurring, Enable the Cloud Vision API on your project and enable Billing.
- [Optional] To enable email notifications for flagged content, set your Mailgun API credentials using:
firebase functions:config:set mailgun.domain=friendly-pix.com mailgun.key=key-XXXXXXXXXXXXXXXX
- [Optional] To enable IP-based geolocation filters, Enable the Geolocation API and the Geocoding API on your project.
Start a local development server
You can start a local development server by running:
npm run serve
This will start
Then open http://localhost:5000
Note 1: On new projects, the Realtime Database and Cloud Storage come with default Security rules that prevent all read and writes. You'll need to deploy the security rules and Cloud Functions once first. For this run:
firebase deploy --only database,storage
Note 2: All Cloud Functions cannot yet be ran locally. Deploy them once first if you want these features active (such as image and text moderation). For this run:
firebase deploy --only functions
Deploy the app
To deploy the app run:
Then this deploys a new version of your code that will be served from
To make a user an admin - allowing him to delete any posts - manually add an entry to
/admins/$index/email: email@example.com. For instance
firebase deploy --only functions,database,storage
We'd love that you contribute to the project. Before doing so please read our Contributor guide.
© Google, 2011. Licensed under an Apache-2 license.