Skip to content

z0dijak/friendlypix-web

 
 

Repository files navigation

Friendly Pix Web

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...

Few words on dependencies

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.

Create and configure your Firebase Project

  1. In a console run npm install to install all Build/Deploy tools dependencies.
  2. Create a Firebase project using the Firebase Console.
  3. Enable Google as a Sign in provider in Firebase Console > Authentication > Sign in Method tab.
  4. 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
  5. 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.

Start a local development server

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 and firebase 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.

Deploy the app

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

Contributing

We'd love that you contribute to the project. Before doing so please read our Contributor guide.

License

© Google, 2011. Licensed under an Apache-2 license.

About

FriendlyPix is a cross-platform Firebase example app - This is the web version

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 73.6%
  • HTML 13.9%
  • CSS 12.5%