{"id":13653952,"url":"https://github.com/googlearchive/angularfire-seed","last_synced_at":"2025-04-23T06:32:12.594Z","repository":{"id":146872447,"uuid":"12066494","full_name":"googlearchive/angularfire-seed","owner":"googlearchive","description":"Seed project for AngularFire apps","archived":true,"fork":false,"pushed_at":"2018-08-24T22:16:59.000Z","size":1242,"stargazers_count":409,"open_issues_count":6,"forks_count":191,"subscribers_count":79,"default_branch":"master","last_synced_at":"2024-09-07T10:03:19.345Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://angularfire.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/googlearchive.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"security-rules.json","support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2013-08-12T21:12:59.000Z","updated_at":"2024-07-17T06:03:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"7ffafb63-3bf2-4202-9ea1-2ec502698204","html_url":"https://github.com/googlearchive/angularfire-seed","commit_stats":null,"previous_names":["firebase/angularfire-seed"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googlearchive%2Fangularfire-seed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googlearchive%2Fangularfire-seed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googlearchive%2Fangularfire-seed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googlearchive%2Fangularfire-seed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/googlearchive","download_url":"https://codeload.github.com/googlearchive/angularfire-seed/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250385399,"owners_count":21421913,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T02:01:21.151Z","updated_at":"2025-04-23T06:32:07.582Z","avatar_url":"https://github.com/googlearchive.png","language":"JavaScript","funding_links":[],"categories":["Seed List"],"sub_categories":["Angular"],"readme":"# Status: Archived\nThis repository has been archived and is no longer maintained.\n\n![status: inactive](https://img.shields.io/badge/status-inactive-red.svg)\n\n# angularfire-seed — the seed for Angular+Firebase apps\n\n## Disclaimer: This project is for legacy Firebase apps (version \u003c 2.0). If you created an app using console.firebase.google.com this project will not work for you. Please see the [main AngularFire repo](https://github.com/firebase/angularfire/) for documentation on setting up an application with the new setup.\n\n[![Build Status](https://travis-ci.org/firebase/angularfire-seed.svg)](https://travis-ci.org/firebase/angularfire-seed)\n\nThis derivative of [angular-seed](https://github.com/angular/angular-seed) is an application\nskeleton for a typical [AngularFire](http://angularfire.com/) web app. You can use it to quickly\nbootstrap your Angular + Firebase projects.\n\nThe seed is preconfigured to install the Angular framework, Firebase, AngularFire, and a bundle of\ndevelopment and testing tools.\n\nThe seed app doesn't do much, but does demonstrate the basics of Angular + Firebase development,\nincluding:\n * binding synchronized objects\n * binding synchronized arrays\n * authentication\n * route security\n * basic account management\n\n## How to use angularfire-seed\n\nOther than one additional configuration step (specifying your Firebase database URL), this setup is nearly\nidentical to angular-seed.\n\n### Prerequisites\n\nYou need git to clone the angularfire-seed repository. You can get it from\n[http://git-scm.com/](http://git-scm.com/).\n\nWe also use a number of node.js tools to initialize and test angularfire-seed. You must have node.js and\nits package manager (npm) installed.  You can get them from [http://nodejs.org/](http://nodejs.org/).\n\n### Clone angularfire-seed\n\nClone the angularfire-seed repository using [git][git]:\n\n```\ngit clone https://github.com/firebase/angularfire-seed.git\ncd angularfire-seed\n```\n\n### Install Dependencies\n\nWe have two kinds of dependencies in this project: tools and angular framework code.  The tools help\nus manage and test the application.\n\n* We get the tools we depend upon via `npm`, the [node package manager][npm].\n* We get the angular code via `bower`, a [client-side code package manager][bower].\n\nWe have preconfigured `npm` to automatically run `bower` so we can simply do:\n\n```\nnpm install\n```\n\nBehind the scenes this will also call `bower install`.  You should find that you have two new\nfolders in your project.\n\n* `node_modules` - contains the npm packages for the tools we need\n* `app/bower_components` - contains the angular framework files\n\n*Note that the `bower_components` folder would normally be installed in the root folder but\nangularfire-seed changes this location through the `.bowerrc` file.  Putting it in the app folder makes\nit easier to serve the files by a webserver.*\n\n### Configure the Application\n\n 1. Open `app/config.js` and set the value of FBURL constant to your Firebase database URL\n 1. Go to your Firebase dashboard and enable email/password authentication under the Auth tab\n 1. Copy/paste the contents of `security-rules.json` into your Security tab, which is also under your Firebase dashboard.\n\n### Run the Application\n\nWe have preconfigured the project with a simple development web server.  The simplest way to start\nthis server is:\n\n```\nnpm start\n```\n\nNow browse to the app at `http://localhost:8000/app/index.html`.\n\n## Directory Layout\n\n    app/                  --\u003e all of the files to be used in production\n      app.js              --\u003e application\n      config.js           --\u003e where you configure Firebase and auth options\n      app.css             --\u003e default stylesheet\n      index.html          --\u003e app layout file (the main html template file of the app)\n      index-async.html    --\u003e just like index.html, but loads js files asynchronously\n      components/         --\u003e javascript files\n        appversion/       --\u003e The app-version directive\n        auth/             --\u003e A wrapper on the `$firebaseAuth` service\n        firebase.utils/   --\u003e Some convenience methods for dealing with Firebase event callbacks and refs\n        ngcloak/          --\u003e A decorator on the ngCloak directive so that it works with auth\n        reverse/          --\u003e A filter to reverse order of arrays\n        security/         --\u003e route-based security tools (adds the $routeProvider.whenAuthenticated() method and redirects)\n      account/            --\u003e the account view\n      chat/               --\u003e the chat view\n      home/               --\u003e the default view\n      login/              --\u003e login screen\n    e2e-tests/            --\u003e protractor end-to-end tests\n    test/lib/             --\u003e utilities and mocks for test units\n\n## Testing\n\nThere are two kinds of tests in the angularfire-seed application: Unit tests and End to End tests.\n\n### Running Unit Tests\n\nThe angularfire-seed app comes preconfigured with unit tests. These are written in\n[Jasmine][jasmine], which we run with the [Karma Test Runner][karma]. We provide a Karma\nconfiguration file to run them.\n\n* the configuration is found at `test/karma.conf.js`\n* the unit tests are found in `test/unit/`\n\nThe easiest way to run the unit tests is to use the supplied npm script:\n\n```\nnpm test\n```\n\nThis script will start the Karma test runner to execute the unit tests. Moreover, Karma will sit and\nwatch the source and test files for changes and then re-run the tests whenever any of them change.\nThis is the recommended strategy; if your unit tests are being run every time you save a file then\nyou receive instant feedback on any changes that break the expected code functionality.\n\nYou can also ask Karma to do a single run of the tests and then exit.  This is useful if you want to\ncheck that a particular version of the code is operating as expected.  The project contains a\npredefined script to do this:\n\n```\nnpm run test-single-run\n```\n\n\n### End to end testing\n\nThe angularfire-seed app comes with end-to-end tests, again written in [Jasmine][jasmine]. These tests\nare run with the [Protractor][protractor] End-to-End test runner.  It uses native events and has\nspecial features for Angular applications.\n\n* the configuration is found at `e2e-tests/protractor-conf.js`\n* the end-to-end tests are found in `e2e-tests/scenarios.js`\n\nProtractor simulates interaction with our web app and verifies that the application responds\ncorrectly. Therefore, our web server needs to be serving up the application, so that Protractor\ncan interact with it.\n\n```\nnpm start\n```\n\nIn addition, since Protractor is built upon WebDriver we need to install this.  The angularfire-seed\nproject comes with a predefined script to do this:\n\n```\nnpm run update-webdriver\n```\n\nThis will download and install the latest version of the stand-alone WebDriver tool.\n\nOnce you have ensured that the development web server hosting our application is up and running\nand WebDriver is updated, you can run the end-to-end tests using the supplied npm script:\n\n```\nnpm run protractor\n```\n\nThis script will execute the end-to-end tests against the application being hosted on the\ndevelopment server.\n\n\n## Updating Dependencies\n\nPreviously we recommended that you merge in changes to angularfire-seed into your own fork of the project.\nNow that the angular framework library code and tools are acquired through package managers (npm and\nbower) you can use these tools instead to update the dependencies.\n\nYou can update the tool dependencies by running:\n\n```\nnpm update\n```\n\nThis will find the latest versions that match the version ranges specified in the `package.json` file.\n\nYou can update the Angular, Firebase, and AngularFire dependencies by running:\n\n```\nbower update\n```\n\nThis will find the latest versions that match the version ranges specified in the `bower.json` file.\n\n\n## Loading AngularFire Asynchronously\n\nThe angularfire-seed project supports loading the framework and application scripts asynchronously.  The\nspecial `index-async.html` is designed to support this style of loading.  For it to work you must\ninject a piece of Angular JavaScript into the HTML page.  The project has a predefined script to help\ndo this.\n\n```\nnpm run update-index-async\n```\n\nThis will copy the contents of the `angular-loader.js` library file into the `index-async.html` page.\nYou can run this every time you update the version of Angular that you are using.\n\n\n## Serving the Application Files\n\nWhile Angular is client-side-only technology and it's possible to create Angular webapps that\ndon't require a backend server at all, we recommend serving the project files using a local\nwebserver during development to avoid issues with security restrictions (sandbox) in browsers. The\nsandbox implementation varies between browsers, but quite often prevents things like cookies, xhr,\netc to function properly when an html page is opened via `file://` scheme instead of `http://`.\n\n\n### Running the App during Development\n\nThe angularfire-seed project comes preconfigured with a local development webserver.  It is a node.js\ntool called [http-server][http-server].  You can start this webserver with `npm start` but you may choose to\ninstall the tool globally:\n\n```\nsudo npm install -g http-server\n```\n\nThen you can start your own development web server to serve static files from a folder by\nrunning:\n\n```\nhttp-server\n```\n\nAlternatively, you can choose to configure your own webserver, such as apache or nginx. Just\nconfigure your server to serve the files under the `app/` directory.\n\n\n### Running the App in Production\n\nThis really depends on how complex your app is and the overall infrastructure of your system, but\nthe general rule is that all you need in production are all the files under the `app/` directory.\nEverything else should be omitted.\n\nAngular/Firebase apps are really just a bunch of static html, css and js files that just need to be hosted\nsomewhere they can be accessed by browsers.\n\n## Continuous Integration\n\n### Travis CI\n\n[Travis CI][travis] is a continuous integration service, which can monitor GitHub for new commits\nto your repository and execute scripts such as building the app or running tests. The angularfire-seed\nproject contains a Travis configuration file, `.travis.yml`, which will cause Travis to run your\ntests when you push to GitHub.\n\nYou will need to enable the integration between Travis and GitHub. See the Travis website for more\ninstruction on how to do this.\n\n### CloudBees\n\nCloudBees have provided a CI/deployment setup:\n\n\u003ca href=\"https://grandcentral.cloudbees.com/?CB_clickstart=https://raw.github.com/CloudBees-community/angular-js-clickstart/master/clickstart.json\"\u003e\n\u003cimg src=\"https://d3ko533tu1ozfq.cloudfront.net/clickstart/deployInstantly.png\"/\u003e\u003c/a\u003e\n\nIf you run this, you will get a cloned version of this repo to start working on in a private git repo,\nalong with a CI service (in Jenkins) hosted that will run unit and end to end tests in both Firefox and Chrome.\n\n\n## Contact\n\nFor more information on Firebase and AngularFire,\ncheck out https://firebase.com/docs/web/bindings/angular\n\nFor more information on AngularJS please check out http://angularjs.org/\n\n[git]: http://git-scm.com/\n[bower]: http://bower.io\n[npm]: https://www.npmjs.org/\n[node]: http://nodejs.org\n[protractor]: https://github.com/angular/protractor\n[jasmine]: http://jasmine.github.io/1.3/introduction.html\n[karma]: http://karma-runner.github.io\n[travis]: https://travis-ci.org/\n[http-server]: https://github.com/nodeapps/http-server\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglearchive%2Fangularfire-seed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgooglearchive%2Fangularfire-seed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglearchive%2Fangularfire-seed/lists"}