Giter Club home page Giter Club logo

kick-off-ng2-fire-md's Introduction

kick-off-ng2-fire-md

this incarnation of kick-off template is a progressive web app built with angular2 + firebase + google material design


table of contents


what is this

kick-off-ng2-fire-md is an incarnation of kick-off-template-project. this time it is a template for a progressive web app built with angular2 + firebase + google material design

currently it contains following features:

  • social media login (facebook, twitter, google+ and github)
  • personal 'todo' item list
  • chat with other users

the project was generated with angular-cli version 1.0.0-beta.21 and is a clone of angular2-firebase-material-demo by tarleoo

the app

currently the application lives at https://kick-off-ng2-fire-md-4cc50.firebaseapp.com/

qr code to the application

while the demo of the seed application can be found at https://fir-todo-v3.firebaseapp.com/

used libraries, guides, etc.

libraries

guides

other resources


installation

first of all you have to install npm and node.js to your box. installation instructions can be found here.

note that node.js 6.x is required.

$ git clone https://github.com/projekt-kreatywa/kick-off-ng2-fire-md.git
$ cd kick-off-ng2-fire-md

# install the project's dependencies with npm
$ npm install

# fast install (via yarn, https://yarnpkg.com)
$ yarn install  # or yarn

firebase configuration

see /src/app/config/config.ts_example file and copy it to /src/app/config/config.ts file and make necessary changes to it. note that you need a firebase account to get all necessary config values.

if you are not familiar with firebase and/or don't have a firebase developer account, sign up quickly with your google id here: https://firebase.google.com/.

after you have created new application you will need to make some security rules for the used data storage. below is configuration that this demo application uses, so you can use the same within your application.

{
    "rules": {
      "messages": {
          ".write": "auth !== null",
          ".read": "auth !== null"
      },
      "todos": {
        "$uid": {
          // grants write access to the owner of this user account whose uid must exactly match the key ($uid)
          ".write": "auth !== null && auth.uid === $uid",
          // grants read access to any user who is logged in with facebook
          ".read": "auth !== null && auth.uid === $uid"
        }
      }
    }
}

these rules ensure that 'todo' items are show only to user who made those. also chat messages requires that user is logged in to read / write those.


development with angular-cli

to start developing in the project run:

$ npm start
# or
$ ng serve

then head to http://localhost:4200 in your browser.

code scaffolding

run ng generate component component-name to generate a new component. you can also use ng generate directive/pipe/service/class.

build

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.

tests

unit tests

to run tests run:

$ npm test
# or
$ ng test

e2e tests

to run tests run:

$ npm run e2e
# or
$ ng e2e

deploying to github pages

run ng github-pages:deploy to deploy to github pages.

further help

to get more help on the angular-cli use ng --help or check out the angular-cli readme.


using @angular/flex-layout module

this will require a bit of footwork until npm install of @angular/flex-layout is available via standard npm i @angular/flex-layout which will be after the the flex-layout v1.0.0-beta.1 release (week of december 20, 2016).

fast start

installing flex-layout with npm is not yet available. developers can easily install this @angular/flex-layout library using a local build and directory copy:

gulp build:release
ditto ./dist/@angular/flex-layout <your project>/node_modules/@angular/flex-layout

npm

the expected deployment process to npm (and the standardized use of npm i @angular/flex-layout) is not yet available. npm installs will be available after the the flex-layout v1.0.0-beta.1 release (week of december 20, 2016).

application usages

in their application module, developers import the global layout api directives (as shown below):

// demo-app-module.ts

import { flexlayoutmodule } from '@angular/flex-layout';

@ngmodule({
  imports: [
    browsermodule, commonmodule, formsmodule, httpmodule,  // import ng2 core modules
    flexlayoutmodule.forroot(),                            // import dependency on flex-layout
  ], 
)}
export class demoappmodule { }

in their component templates, developers easily use the layout api to build complex, dynamic layouts:

<div fx-layout="row">
  <div [fx-layout]="firstcol" [fx-flex]="firstcolwidth" >
    <div fx-flex="27%"> first item in row  </div>
    <div fx-flex      > second item in row </div>
  </div>
  <div [fx-layout]="secondcol" flex >
    <div fx-flex       > first item in column  </div>
    <div fx-flex="33px"> second item in column </div>
  </div>
</div>

further help

to get more help on the installation and use of @angular/flex-layout check out flex-layout readme


credits


license

the mit license (mit)

kick-off-ng2-fire-md's People

Contributors

rafszul avatar

Watchers

James Cloos avatar asanoCorp avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.