{"id":26712670,"url":"https://github.com/cristian006/reactivemirror","last_synced_at":"2025-04-13T21:13:55.745Z","repository":{"id":37952010,"uuid":"113149580","full_name":"Cristian006/ReactiveMirror","owner":"Cristian006","description":"A Raspberry Pi Electron-React Mirror App ","archived":false,"fork":false,"pushed_at":"2018-04-26T08:41:41.000Z","size":1864,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-03-02T11:05:54.362Z","etag":null,"topics":["electron","react","smart-mirror"],"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/Cristian006.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-05T07:43:00.000Z","updated_at":"2022-11-09T11:01:33.000Z","dependencies_parsed_at":"2022-09-02T19:11:48.802Z","dependency_job_id":null,"html_url":"https://github.com/Cristian006/ReactiveMirror","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cristian006%2FReactiveMirror","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cristian006%2FReactiveMirror/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cristian006%2FReactiveMirror/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cristian006%2FReactiveMirror/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cristian006","download_url":"https://codeload.github.com/Cristian006/ReactiveMirror/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245840004,"owners_count":20681086,"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":["electron","react","smart-mirror"],"created_at":"2025-03-27T11:39:53.974Z","updated_at":"2025-03-27T11:39:54.744Z","avatar_url":"https://github.com/Cristian006.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Reactive Mirror Demo](./assets/LogoBlack.png)\n\n### An application built with React + Electron meant to run on the Raspberry Pi for a DIY Smart Mirror modeled after [Magic Mirror\u003csup\u003e2\u003c/sup\u003e](https://github.com/MichMich/MagicMirror)\n\nEvery module is just a react component that's dynamically imported into the app\n\n## Usage\n\n### Tested Hardware\n\n* Raspberry Pi 3\n\n### Automatic Installation (Raspberry Pi 3)\n\nRun the following command on your Raspberry Pi to install Reactive Mirror\n\n```\ncurl -sL https://raw.githubusercontent.com/Cristian006/ReactiveMirror/master/app/mirror/installers/raspberry.sh | bash\n```\n\n### Manual Installation\n\n```\n# Download and install the latest Node.js version\n\ngit clone https://github.com/Cristian006/ReactiveMirror\n\n# install app module dependencies\ncd ~/ReactiveMirror/app\nnpm install\n\n# install app dependencies\ncd ~/ReactiveMirror\nnpm install\n\n# start the application\nnpm start\n```\n\n# Development\n\n[![React](/internals/img/react-padded-90.png)](https://facebook.github.io/react/)\n[![Webpack](/internals/img/webpack-padded-90.png)](https://webpack.github.io/)\n[![Redux](/internals/img/redux-padded-90.png)](http://redux.js.org/)\n[![React Router](/internals/img/react-router-padded-90.png)](https://github.com/ReactTraining/react-router)\n[![Flow](/internals/img/flow-padded-90.png)](https://flowtype.org/)\n[![ESLint](/internals/img/eslint-padded-90.png)](http://eslint.org/)\n[![Jest](/internals/img/jest-padded-90.png)](https://facebook.github.io/jest/)\n[![Yarn](/internals/img/yarn-padded-90.png)](https://yarnpkg.com/)\n\n[Electron](http://electron.atom.io/) mirror application based on [React](https://facebook.github.io/react/), [Redux](https://github.com/reactjs/redux), [React Router](https://github.com/reactjs/react-router), [Webpack](http://webpack.github.io/docs/), [React Transform HMR](https://github.com/gaearon/react-transform-hmr) for rapid application development.\n\n## Install\n\n* **Note: requires a node version \u003e= 7 and an npm version \u003e= 4.**\n\nFirst, clone the repo via git:\n\n```bash\ngit clone --depth=1 https://github.com/cristian006/ReactiveMirror.git your-project-name\n```\n\nAnd then install dependencies with yarn or npm\n\n```bash\n$ cd your-project-name\n$ yarn\n$ cd app\n$ yarn //to install mirror module dependencies\n```\n\n**Note**: If you can't use [yarn](https://github.com/yarnpkg/yarn) for some reason, try `npm install`.\n\n## Run\n\nStart the app in the `dev` environment. This starts the renderer process in [**hot-module-replacement**](https://webpack.js.org/guides/hmr-react/) mode and starts a server that sends hot updates to the renderer process:\n\n```bash\n$ npm run dev\n```\n\nRun these two commands __simultaneously__ in different console tabs:\n\n```bash\n$ npm run start-renderer-dev\n$ npm run start-main-dev\n```\n\nModule configuration:\n\n| **Option** | **Description** |\n| --- | --- |\n| `name` | The name of the module. This can also contain the subfolder. Valid examples include `Clock`, `Calendar` and `CustomModule`. |\n| `position` | The location of the module in which the module will be loaded. Possible values are `top_ bar`, `top_left`, `top_center`, `top_right`, `upper_third`, `middle_center`, `lower_third`, `bottom_left`, `bottom_center`, `bottom_right`, `bottom_bar`, `fullscreen_above`, and `fullscreen_below`. This field is optional but most modules require this field to set. Check the documentation of the module for more information. Multiple modules with the same position will be ordered based on the order in the configuration file. |\n| `hide` | Set hide to `true` to skip creating the module. This field is optional. |\n| `config` | An object with the module configuration properties. Check the documentation of the module for more information. This field is optional, unless the module requires extra configuration. |\n\n## Modules\n\nThe following modules are installed by default.\n\n- [**Clock**](app/mirror/modules/default/Clock)\n- [**Calendar**](app/mirror/modules/default/Calendar)\n- [**Current Weather**](app/mirror/modules/default/Currentweather)\n- [**Weather Forecast**](app/mirror/modules/default/WeatherForecast)\n- [**News Feed**](app/mirror/modules/default/NewsFeed)\n- [**Compliments**](app/mirror/modules/default/Compliments)\n- [**Snow**](app/mirror/modules/default/Snow)\n- [**Jokes**](app/mirror/modules/default/Jokes)\n\n## Editor Configuration\n**Atom**\n```bash\napm install editorconfig es6-javascript atom-ternjs javascript-snippets linter linter-eslint language-babel autocomplete-modules file-icons\n```\n\n**VSCode**\n* [Editorconfig](https://github.com/editorconfig/editorconfig-vscode)\n* [ESLint](https://github.com/Microsoft/vscode-eslint)\n* [Flow](https://github.com/flowtype/flow-for-vscode)\n* [Babel](https://github.com/dzannotti/vscode-babel)\n* [Jest](https://github.com/orta/vscode-jest)\n* [ES6 Snippets](https://marketplace.visualstudio.com/items?itemName=xabikos.JavaScriptSnippets)\n* [React Snippets](https://marketplace.visualstudio.com/items?itemName=xabikos.ReactSnippets)\n:bulb: *If you are using the `flow-for-vscode` plugin, make sure to disable the `flowtype-errors/show-errors` eslint rule in the `.eslintrc` by setting it to `0`*\n\n**Sublime**\n* [Editorconfig Integration](https://github.com/sindresorhus/editorconfig-sublime#readme)\n* [Linting](https://github.com/SublimeLinter/SublimeLinter3)\n* [ESLint Integration](https://github.com/roadhump/SublimeLinter-eslint)\n* [Syntax Highlighting](https://github.com/babel/babel-sublime)\n* [Autocompletion](https://github.com/ternjs/tern_for_sublime)\n* [Node Snippets](https://packagecontrol.io/packages/JavaScript%20%26%20NodeJS%20Snippets)\n* [ES6 Snippets](https://packagecontrol.io/packages/ES6-Toolkit)\n\n**Others**\n* [Editorconfig](http://editorconfig.org/#download)\n* [ESLint](http://eslint.org/docs/user-guide/integrations#editors)\n* Babel Syntax Plugin\n\n## DevTools\n\n#### Toggle Chrome DevTools\n\n- OS X: \u003ckbd\u003eCmd\u003c/kbd\u003e \u003ckbd\u003eAlt\u003c/kbd\u003e \u003ckbd\u003eI\u003c/kbd\u003e or \u003ckbd\u003eF12\u003c/kbd\u003e\n- Linux: \u003ckbd\u003eCtrl\u003c/kbd\u003e \u003ckbd\u003eShift\u003c/kbd\u003e \u003ckbd\u003eI\u003c/kbd\u003e or \u003ckbd\u003eF12\u003c/kbd\u003e\n- Windows: \u003ckbd\u003eCtrl\u003c/kbd\u003e \u003ckbd\u003eShift\u003c/kbd\u003e \u003ckbd\u003eI\u003c/kbd\u003e or \u003ckbd\u003eF12\u003c/kbd\u003e\n\n*See [electron-debug](https://github.com/sindresorhus/electron-debug) for more information.*\n\n#### DevTools extension\n\n* [Devtron](https://github.com/electron/devtron) - Install via [electron-debug](https://github.com/sindresorhus/electron-debug).\n* [React Developer Tools](https://github.com/facebook/react-devtools) - Install via [electron-devtools-installer](https://github.com/GPMDP/electron-devtools-installer).\n* [Redux DevTools](https://github.com/zalmoxisus/redux-devtools-extension) - Install via [electron-devtools-installer](https://github.com/GPMDP/electron-devtools-installer).\n\nYou can find the tabs on Chrome DevTools.\n\nIf you want to update extensions version, please set `UPGRADE_EXTENSIONS` env, just run:\n\n```bash\n$ UPGRADE_EXTENSIONS=1 npm run dev\n\n# For Windows\n$ set UPGRADE_EXTENSIONS=1 \u0026\u0026 npm run dev\n```\n\n:bulb: You can debug your production build with devtools by simply setting the `DEBUG_PROD` env variable:\n```\nDEBUG_PROD=true npm run package\n```\n\n\n## CSS Modules\n\nThis boilerplate is configured to use [css-modules](https://github.com/css-modules/css-modules) out of the box.\n\nAll `.css` file extensions will use css-modules unless it has `.global.css`.\n\nIf you need global styles, stylesheets with `.global.css` will not go through the\ncss-modules loader. e.g. `app.global.css`\n\nIf you want to import global css libraries (like `bootstrap`), you can just write the following code in `.global.css`:\n\n```css\n@import \"~bootstrap/dist/css/bootstrap.css\";\n```\n\n## Sass support\n\nIf you want to use Sass in your app, you only need to import `.sass` files instead of `.css` once:\n```js\nimport './app.global.scss';\n```\n\n## Packaging\n\nTo package apps for the local platform:\n\n```bash\n$ npm run package\n```\n\nTo package apps for all platforms:\n\nFirst, refer to [Multi Platform Build](https://www.electron.build/multi-platform-build) for dependencies.\n\nThen,\n```bash\n$ npm run package-all\n```\n\nTo package apps with options:\n\n```bash\n$ npm run package -- --[option]\n```\n\n## Further commands\n\nTo run the application without packaging run\n\n```bash\n$ npm run build\n$ npm start\n```\n\nTo run End-to-End Test\n\n```bash\n$ npm run build\n$ npm run test-e2e\n```\n\n#### Options\n\nSee [electron-builder CLI Usage](https://github.com/electron-userland/electron-builder#cli-usage)\n\n## How to add modules to the project\n\nYou will need to add other modules to this boilerplate, depending on the requirements of your project. For example, you may want to add [node-postgres](https://github.com/brianc/node-postgres) to communicate with PostgreSQL database, or \n[material-ui](http://www.material-ui.com/) to reuse react UI components.\n\n⚠️ Please read the following section before installing any dependencies ⚠️\n\n### Module Structure\n\nThis app uses a [two package.json structure](https://github.com/electron-userland/electron-builder/wiki/Two-package.json-Structure). This means, you will have two `package.json` files.\n\n1. `./package.json` in the root of your project\n1. `./app/package.json` inside `app` folder\n\n### Which `package.json` file to use\n\n**Rule of thumb** is: all modules go into `./package.json` except native modules. Native modules go into `./app/package.json`.\n\n1. If the module is native to a platform (like node-postgres) or otherwise should be included with the published package (i.e. bcrypt, openbci), it should be listed under `dependencies` in `./app/package.json`.\n2. If a module is `import`ed by another module, include it in `dependencies` in `./package.json`.   See [this ESLint rule](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md). Examples of such modules are `material-ui`, `redux-form`, and `moment`.\n3. Otherwise, modules used for building, testing and debugging should be included in `devDependencies` in `./package.json`.\n\n### Further Readings\n\nSee the wiki page, [Module Structure — Two package.json Structure](https://github.com/chentsulin/electron-react-boilerplate/wiki/Module-Structure----Two-package.json-Structure) to understand what is native module, the rationale behind two package.json structure and more.\n\nFor an example app that uses this boilerplate and packages native dependencies, see [erb-sqlite-example](https://github.com/amilajack/erb-sqlite-example).\n\n## Static Type Checking\nThis project comes with Flow support out of the box! You can annotate your code with types, [get Flow errors as ESLint errors](https://github.com/amilajack/eslint-plugin-flowtype-errors), and get [type errors during runtime](https://github.com/codemix/flow-runtime) during development. Types are completely optional.\n\n## Dispatching redux actions from main process\n\nsee discusses in [#118](https://github.com/chentsulin/electron-react-boilerplate/issues/118) and [#108](https://github.com/chentsulin/electron-react-boilerplate/issues/108)\n\n## License\nMIT © [Cristian Ponce](https://github.com/cristian006)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcristian006%2Freactivemirror","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcristian006%2Freactivemirror","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcristian006%2Freactivemirror/lists"}