{"id":15292546,"url":"https://github.com/larriereguichet/universal-react-app","last_synced_at":"2025-10-03T19:14:38.980Z","repository":{"id":57228593,"uuid":"112370872","full_name":"larriereguichet/universal-react-app","owner":"larriereguichet","description":"Universal React app example","archived":false,"fork":false,"pushed_at":"2018-04-06T13:57:02.000Z","size":166,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-15T02:51:52.068Z","etag":null,"topics":["material-ui","nodejs","react","react-router","redux","universal","universal-app","universal-javascript"],"latest_commit_sha":null,"homepage":"","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/larriereguichet.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}},"created_at":"2017-11-28T18:08:24.000Z","updated_at":"2018-07-30T14:26:28.000Z","dependencies_parsed_at":"2022-09-14T07:51:39.495Z","dependency_job_id":null,"html_url":"https://github.com/larriereguichet/universal-react-app","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larriereguichet%2Funiversal-react-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larriereguichet%2Funiversal-react-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larriereguichet%2Funiversal-react-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larriereguichet%2Funiversal-react-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/larriereguichet","download_url":"https://codeload.github.com/larriereguichet/universal-react-app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227617812,"owners_count":17794478,"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":["material-ui","nodejs","react","react-router","redux","universal","universal-app","universal-javascript"],"created_at":"2024-09-30T16:18:43.610Z","updated_at":"2025-10-03T19:14:33.934Z","avatar_url":"https://github.com/larriereguichet.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# universal-react-app\nYet another Universal React app example.\n\n## Install\n```\nnpm install\n```\n\n## Development\n\nIn development you can either use your *local environment* or the **docker** version with `docker-compose`.\n\n#### Local environment\n```\nnpm start\n```\nThen browse http://localhost:3000\n\n#### Docker-compose\n```\ndocker-compose up\n```\nThen browse http://localhost:3000 \n\n## Production\n\nThe `docker-compose.prod.yml` is provided as an example for a docker production usage.\nBoth the client and server dockerfile present in `docker/` uses [multi-stage build](https://docs.docker.com/engine/userguide/eng-image/multistage-build/#use-multi-stage-builds) \nto keep the `devDependencies` at bay.\n\n### Frontend\nThe frontend is a `nginx:alpine` with some nginx presets from [h5bp](https://github.com/h5bp/server-configs-nginx).\nIt serves the built version of the client `dist/client.js` along with the `public/` directory.\n\n### Backend \nThe backend is a `node:alpine` that just run the built version of the server `dist/server.js`.\n\n### Usage\n\n`docker-compose -f docker-compose.prod.yml up`\n\n## Presentation\n\nThe ES6 syntax is used throughout the project along with some ES7 proposals.\n \n### Stack\n\n- [react](https://reactjs.org/) for components\n- [redux](https://redux.js.org/) for state management\n- [react-router-redux](https://github.com/ReactTraining/react-router/tree/master/packages/react-router-redux) as a router\n- [jss](https://github.com/cssinjs/jss) as the CSS in Js solution.\n- [material-ui](https://material-ui-next.com/) *React components that implement Google's Material Design.*\n- [express](https://github.com/expressjs/express)\n- [pino](https://github.com/pinojs/pino) as the logger - similar to Bunyan - with a smoother browser integration.\n- [webpack](https://webpack.js.org/) as the module bundle for the client and server.\n\n### Folder structure\n\nThe source of this app are available under `src/` and are split between 3 directories, `client`, `common` and `server`:\n```\n├── client\n│   ├── Components/App.js\n│   ├── index.js\n│   ├── store.js\n│   └── history.js\n├── common\n│   ├── actions\n│   ├── Components\n│   ├── constants\n│   ├── Pages\n│   ├── reducers\n│   ├── styles\n│   ├── configureStore.js\n│   ├── theme.js\n│   └── routes.js\n└── server\n    ├── Components/App.js\n    ├── appHandler.js\n    ├── index.js\n    ├── store.js\n    └── history.js\n```\n\n### Configuration\n\nApplication level configuration is available as environment variables, the default are provided by the `config` key in the `package.json`:\n```\n...\n\"config\": {\n    \"port\": \"3000\"\n},\n...\n```\n\u003e This variable, for example is made available by `npm-scripts` in the package.json and the application itself as `npm_package_config_port`.\n\n#### Webpack\n\nTo build things up there are 2 webpack config files that handles both `server` and `client` contexts as well as `production` and `development` environments:\n- webpack.client.babel.js\n\u003e The client configuration uses [extract-npm-package-config](https://github.com/lutangar/extract-npm-package-config) \nalong with the `webpack.EnvironmentPlugin` to replace the `npm_package_config_*` variables with their values. \n\n- webpack.server.babel.js\n\n## Licence\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flarriereguichet%2Funiversal-react-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flarriereguichet%2Funiversal-react-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flarriereguichet%2Funiversal-react-app/lists"}