{"id":13839507,"url":"https://github.com/belibasakis/loopback-example-ionic","last_synced_at":"2025-07-11T05:33:15.673Z","repository":{"id":23250907,"uuid":"26608899","full_name":"belibasakis/loopback-example-ionic","owner":"belibasakis","description":null,"archived":false,"fork":false,"pushed_at":"2018-02-17T12:44:24.000Z","size":2121,"stargazers_count":91,"open_issues_count":6,"forks_count":45,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-02-17T09:35:56.618Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/belibasakis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-13T21:28:24.000Z","updated_at":"2023-04-26T20:49:35.000Z","dependencies_parsed_at":"2022-08-05T21:15:23.484Z","dependency_job_id":null,"html_url":"https://github.com/belibasakis/loopback-example-ionic","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/belibasakis/loopback-example-ionic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belibasakis%2Floopback-example-ionic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belibasakis%2Floopback-example-ionic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belibasakis%2Floopback-example-ionic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belibasakis%2Floopback-example-ionic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/belibasakis","download_url":"https://codeload.github.com/belibasakis/loopback-example-ionic/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belibasakis%2Floopback-example-ionic/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264739510,"owners_count":23656644,"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-04T17:00:28.448Z","updated_at":"2025-07-11T05:33:15.095Z","avatar_url":"https://github.com/belibasakis.png","language":"JavaScript","funding_links":[],"categories":["Examples","And A Bunch More! (I am in the process of sorting these)"],"sub_categories":["Third Party"],"readme":"# Loopback Example: Ionic\nThis example application demonstates how to use [LoopBack](http://loopback.io) with the [Ionic Framework](http://ionicframework.com/)\n## Features\nLooper is a basic microblogging clone with following features:\n- Users can register and login to the app\n- Only authorized user can see content\n- Post, like and comment tweets\n- User can choose an avatar\n\n\n### Screenshots\n![Alt text](screenshots.png)\n\n## Getting started\nBefore starting, makes sure you've followed [Getting Started with LoopBack](http://docs.strongloop.com/display/LB/Getting+started+with+LoopBack) to install Node and LoopBack.\nIn adittion, you will need a basic understanding of:\n - [AngularJs](https://angularjs.org/)\n - Ionic [CSS](http://ionicframework.com/docs/components/) and [Javascript](http://ionicframework.com/docs/api/) components  \n\n```\ngit clone https://github.com/belibasakis/loopback-example-ionic\ncd loopback-example-ionic\nnpm install \nslc run\n```\nOpen a new terminal\n```\ncd loopback-example-ionic/client\nnpm install\nionic serve\n```\nOpen [localhost:8100](http://localhost:8100/) in your browser to view the app or get the (PhoneGap Developer App)[http://app.phonegap.com/] to run the app on your phone.\nDon't forget to change the api url in `client/www/lib/lb-services.js` to the IP of your local machine.\n```\n var urlBase = \"http://192.168.0.102:3000/api\";\n```\n\n## ToDo\n- Implement Passport.Js for FacebookAuth\n- Optimize performence (less requests to server)\n- Add feature like edit, delete...\n\n## Ionic\nAll Ionic files are in the `client/www` folder. Documentation how this app works are inside the `*.js` files\n\n## Loopback\nBy default, data in the memory connector are transient.  When an application using the memory connector exits, all model instances are lost.  To maintain data across application restarts, I specified a JSON file in which to store the data.\n`server/datasources.json``\n```\n{\n  \"db\": {\n    \"name\": \"db\",\n    \"connector\": \"memory\",\n    \"file\": \"memoryDb.json\"\n  }\n}\n```\nI created some sample content and user so you can start right of:\n\n Username | Password \n -------- | -------- \n James    | james    \n Bob      | bob      \n Mary     | mary     \n\n### Usefull commands\n- `lb-ng server/server.js client/www/lib/lb-services.js`to generate Loopback Service for AngularJS based on your project\n- `lb-ng-doc client/www/lib/lb-services.js` show documentation for generated file\n\n### Loopback Database Schema\n- `avatar`\n  - id number \n  - url string\n  - ownerId number\n- `comments`\n  - id number \n  - content string\n  - date date\n  - username string\n- `tweet`\n  - id number \n  - content string\n  - date date\n  - ownerUsername string\n- `user`\n  - id number \n  - username string\n  - created date\n  - avatar string\n- `like` \n  - id number   \n\n### Loopback Model Relation\n- `comments`\n  - belongsTo\n    - tweet (foreignKey: tweetId)\n    - user (foreignKey: ownerId)\n- `tweet`\n  - belongsTo\n    - user (foreignKey: ownerId)\n  - hasMany\n    - comments (foreignKey(tweetId)\n    - like (foreignKey(tweetid)\n- `user`\n  - hasMany\n    - tweets (foreignKey: ownerId) \n    - likes (foreignkey: ownerId)\n- `like` \n  - belongsTo\n    - user (foreignKey: ownerId)\n    - tweet (foreignKey: tweetId)\n\n### Other ressources used\n- custom time filter for angular https://github.com/B-Sides/angular-timedistance\n- pictures used in this app http://www.deviantart.com/art/Face-Avatars-107881096\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbelibasakis%2Floopback-example-ionic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbelibasakis%2Floopback-example-ionic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbelibasakis%2Floopback-example-ionic/lists"}