Friendly Pix Web is a sample app demonstrating how to build a JavaScript/Web app with the Firebase Platform.
Friendly Pix is a place where you can share photos, follow friends, comment on photos...
Friendly Pix is built using Javascript, Firebase and jQuery. The Auth flow is built using Firebase-UI. Javascript dependencies are managed using bower and Build/Deploy tools dependencies are managed using npm. Also Friendly Pix is written in ES2015 so for wide browser support we'll transpile the code to ES5 using BabelJs. Additionally server-side micro-services are built on Cloud Functions for Firebase.
- In a console run
npm install
to install all Build/Deploy tools dependencies. - Create a Firebase project using the Firebase Console.
- Enable Google as a Sign in provider in Firebase Console > Authentication > Sign in Method tab.
- Enable Facebook as a Sign in provider in Firebase Console > Authentication > Sign in Method tab. You'll need to provide your Facebook app's credentials. If you haven't yet you'll need to have created a Facebook app on Facebook for Developers
- In a console run
firebase use --add
and, when prompted, select the Firebase Project you have just created. This will make sure the Firebase CLI is configured to use your particular project.
You can start a local development server by running:
npm run serve
This will start firebase serve
and make sure your Javascript files are transpiled automatically to ES5.
This is currently broken on ws. On Windows please run the following commands separately instead:
bower install
,babel -w public\scripts -s --retain-lines -d public/scripts-es5
andfirebase serve
.
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. Deploy the app once first to deploy the Storage and Database security rules on the project.
Note 2: Cloud Functions cannot yet be ran locally. Deploy the app once first to deploy and enable the Cloud Functions.
Before deploying your code you need to build it for production. Run:
npm run build
This will install all runtime dependencies and transpile the Javascript code to ES5 and install Cloud Functions dependencies. Then run:
firebase deploy
Then this deploys a new version of your code that will be served from https://<PROJECT_ID>.firebaseapp.com
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.