{"id":16615563,"url":"https://github.com/domiii/door-control","last_synced_at":"2026-04-18T23:02:25.150Z","repository":{"id":137713109,"uuid":"180777910","full_name":"Domiii/door-control","owner":"Domiii","description":null,"archived":false,"fork":false,"pushed_at":"2019-04-23T09:39:02.000Z","size":228,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-17T18:00:01.095Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Domiii.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":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-11T11:29:12.000Z","updated_at":"2019-04-23T09:39:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"94eef4bc-bad9-493c-ad2e-358114fa8a6c","html_url":"https://github.com/Domiii/door-control","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Domiii%2Fdoor-control","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Domiii%2Fdoor-control/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Domiii%2Fdoor-control/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Domiii%2Fdoor-control/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Domiii","download_url":"https://codeload.github.com/Domiii/door-control/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242956551,"owners_count":20212454,"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-10-12T02:09:50.413Z","updated_at":"2026-04-18T23:02:20.086Z","avatar_url":"https://github.com/Domiii.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).\n\n\n## TODO\n\n1. Firestore REST API Auth\n    1. [Generate `custom token`](https://firebase.google.com/docs/auth/admin/create-custom-tokens)\n        * NOTES:\n            * \"Custom tokens are signed JWTs where the private key used for signing belongs to a Google service account.\"\n            * [`Custom token` expiration](https://stackoverflow.com/a/38354518)\n        * TODO: Can we use GCF without credit card?\n        * Alternative #1: Use glitch (or other free hosting) to generate `custom tokens`\n            * [Learn how to use Glitch for hosting](https://anidiots.guide/other-guides/hosting-on-glitch)\n            * [Use service account JSON file](https://firebase.google.com/docs/auth/admin/create-custom-tokens#using_a_service_account_json_file)\n            * \n        * Alternative #2: Use `Google Cloud Function` to generate `custom tokens`\n            * [Learn GCF](https://cloud.google.com/functions/docs/tutorials/http)\n            * [Grant permissions](https://firebase.google.com/docs/auth/admin/create-custom-tokens#iam_api_not_enabled)\n            * [Write the code](https://firebase.google.com/docs/auth/admin/create-custom-tokens#letting_the_admin_sdk_discover_a_service_account)\n        * Request token from GCF\n    1. Use `custom token`  to [generate a `Firebase ID token` using the Firebase Authentication REST API](https://firebase.google.com/docs/reference/rest/auth/)\n        * NOTE: `Firebase ID token` does not expire automatically.\n    1. [In every request, send `Firebase ID token` to the Cloud Firestore endpoints as an Authorization header set to Bearer {YOUR_TOKEN}](https://firebase.google.com/docs/firestore/use-rest-api#authenticating_with_an_access_token)\n    1. [Refresh when necessary](https://firebase.google.com/docs/reference/rest/auth/#section-refresh-token)\n    \n\n## Main steps to setup the application skeleton\n\n1. Get started\n    1. `$ npx create-react-app my-app`\n    1. `$ cd my-app`\n    1. `$ npm start`\n1. Fix things for VSCode\n   1. [Experimental Decorators error present](https://github.com/Microsoft/vscode/issues/28097)\n1. Read [the create-react-app docs](https://facebook.github.io/create-react-app/docs/)\n1. Get ready for a more pleasant development experience\n    1. Install chalk: `$ npm i -s chalk`\n    1. Install Nodemon: `$ npm i -s nodemon`\n    1. Configure eslint: https://www.npmjs.com/package/eslint-config-react-app\n    1. Adding custom folder aliases: (a) add to webpack and also (b) add to `package.json`'s `jest.`[`moduleNameMapper`](https://alexjover.com/blog/enhance-jest-configuration-with-module-aliases/)\n    1. Add `src/samples` folder to test new libraries and new concepts\n    1. Setup Babel for running individual files\n        1. See: https://babeljs.io/docs/en/babel-node\n        1. Add `.babelrc`\n            1. [reference config](https://github.com/Domiii/dbdi/blob/master/.babelrc)\n            1. `\"presets\": [\"@babel/preset-env\", \"@babel/preset-react\"]`\n        1. Install missing plugins: `$ npm i --save-dev @babel/plugin-proposal-decorators @babel/plugin-proposal-class-properties @babel/plugin-proposal-function-bind @babel/plugin-syntax-export-default-from`\n        1. `npm i --save-dev @babel/core @babel/node @babel/cli`\n        1. `npm i -s core-js@3`\n        1. Debug + wait initially: `babel-node --inspect-brk src/samples/someSample`\n        1. Using nodemon: `nodemon --exec babel-node --inspect src/samples/someSample`\n1. Make things prettier\n    1. Add Bootstrap + reactstrap\n         1. See: https://reactstrap.github.io/\n    1. Add [react-fontawesome](https://github.com/FortAwesome/react-fontawesome)\n        * `npm i -s @fortawesome/fontawesome-svg-core @fortawesome/react-fontawesome @fortawesome/free-solid-svg-icons @fortawesome/free-regular-svg-icons`\n        * https://fontawesome.com/how-to-use/on-the-web/using-with/react\n    1. Add [material-ui](https://material-ui.com/) - `npm i -s @material-ui/core @material-ui/icons`\n1. Add firebase ([as explained in the docs](https://facebook.github.io/create-react-app/docs/deployment#firebase-https-firebasegooglecom))\n    1. `$ firebase init`\n    1. Change config accordingly\n    1. Add to `.gitignore`\n    1. Setup firebase + add firebase login: https://codepen.io/Domiii/pen/JwrZVr?editors=0010\n1. Add [react-router](https://github.com/reactjs/react-router-tutorial/tree/master/lessons/01-setting-up)\n    1. `$ npm i -s react-router react-router-dom`\n    1. [Article: Getting started with React Router](https://codeburst.io/getting-started-with-react-router-5c978f70df91)\n    1. Use [`Switch`](https://medium.com/@jenniferdobak/react-router-vs-switch-components-2af3a9fc72e) instead of `Router`\n    1. Add [protected routes](https://stackoverflow.com/a/48497783)\n1. Add external data and remote API logic\n    1. Add `api`, `api/index.js` and `api/firebaseInit.js`\n    1. TODO\n1. Add Google login\n    1. TODO\n1. Add [Unstated](https://github.com/jamiebuilds/unstated)\n    1. [unstated — The setState of React State Management](https://medium.com/react-native-training/unstated-the-setstate-of-react-state-management-8ce47b240e6d)\n    1. TODO\n\n\n## Basics\n1. Display a list of things\n1. Read, edit and display markdown\n    * https://github.com/rexxars/react-markdown\n    * https://glitch.com/edit/#!/markdown-test\n\n## Features?\n1. User list + management\n1. Door opener\n\n\n## Firestore REST\n* Docs: https://firebase.google.com/docs/firestore/use-rest-api\n* Example: https://firestore.googleapis.com/v1/projects/iot-fun-a9915/databases/(default)/documents/usersPublic\n* REST Api Explorer: https://developers.google.com/apis-explorer/#search/firestore/firestore/v1/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdomiii%2Fdoor-control","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdomiii%2Fdoor-control","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdomiii%2Fdoor-control/lists"}