{"id":21502467,"url":"https://github.com/tzachbon/ssr-react-monorepo-example","last_synced_at":"2025-07-15T23:30:33.804Z","repository":{"id":37078857,"uuid":"474783889","full_name":"tzachbon/ssr-react-monorepo-example","owner":"tzachbon","description":"Example for React Server-Side Rendering (SSR) without any framework inside monorepo with Typescript and tests","archived":false,"fork":false,"pushed_at":"2024-04-27T10:05:24.000Z","size":2005,"stargazers_count":8,"open_issues_count":11,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-27T11:29:48.194Z","etag":null,"topics":["async-rendering","components-react","e2e","express","javascript","mocha","monorepo","nextjs","nodejs","react","server-side-rendering","ssr","suspense","testing","turborepo","typescript","webpack"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/tzachbon.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-27T23:21:56.000Z","updated_at":"2024-04-27T11:29:51.169Z","dependencies_parsed_at":"2024-04-27T11:29:49.324Z","dependency_job_id":"7b361810-9a78-4734-9c8c-5eb47ed46316","html_url":"https://github.com/tzachbon/ssr-react-monorepo-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzachbon%2Fssr-react-monorepo-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzachbon%2Fssr-react-monorepo-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzachbon%2Fssr-react-monorepo-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzachbon%2Fssr-react-monorepo-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tzachbon","download_url":"https://codeload.github.com/tzachbon/ssr-react-monorepo-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226077475,"owners_count":17570164,"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":["async-rendering","components-react","e2e","express","javascript","mocha","monorepo","nextjs","nodejs","react","server-side-rendering","ssr","suspense","testing","turborepo","typescript","webpack"],"created_at":"2024-11-23T18:15:05.101Z","updated_at":"2024-11-23T18:15:05.826Z","avatar_url":"https://github.com/tzachbon.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Example for React Server-Side Rendering (SSR) without any framework inside monorepo with Typescript\n\nThis repo is trying to demonstrate how to implement server side rendering with React in a simple monorepo (npm v8 workspaces) without any frameworks.\n\n\u003e It's still a WIP.\n\n## Stack\n\n* Package Manager: [npm](https://www.npmjs.com/)\n* Worksapce Manager: [npm (v8)](https://docs.npmjs.com/cli/v8/using-npm/workspaces)\n* Script runner: [Turborepo](https://turborepo.org/)\n* Language: [Typescript](https://www.typescriptlang.org/) (Output to [`esm`](https://nodejs.org/api/esm.html))\n* Bundler: [Webpack](https://webpack.js.org/)\n* Test Runner: [Mocha](https://mochajs.org/)\n* Assertion Library: [Expect](https://www.npmjs.com/package/expect)\n* Web testing and Automation: [Playwright](https://playwright.dev/)\n* Linter: [ESLint](https://eslint.org/)\n* CI: [Github Actions](https://github.com/features/actions)\n\n\n## Installation\n\n\u003e Make use you use npm version 8 or above.\n\n```bash\nnpm install\n```\n\n\u003e We look for a seamless development that will react according to your changes, here's the command that you should run at the **root of the project**\n\n\n## Build\n\n```bash\nnpm run build\n```\n\n## Development\n\n```bash\nnpm run dev\n```\n\n\n### Testing\n\nIn order to test the monorepo you have 2 options:\n* Run the tests with `npm test` which will use `mocha` as the test runner and run the suites in parallel. Make sure to create the tests inside the `test` folder (in each package) and under the suffix `.test.ts`.\n* If you use VSCode, you can use the build-in debugger. Go to the file that you want to debug and press F5. It should run only the specific file.\n\n\n### Development and building \n\n#### App\n\nMain client application (React).\n\n* `dev` - Run watcher for typescript files and initialize Webpack dev server for the client code.\n* `build` - Build the types and the client bundle.\n\n\n#### Server\n\nThe server application (express).\n\n* `dev` - Run watcher for typescript files and the client bundle.\n* `build` - Build the types and the client bundle.\n\n#### Upgrade Dependencies\n\nOnce in a while you probably have to upgrade the dependencies.\nRun this commands:\n\n```bash\nnpm run upgrade:dependencies\nrm package-lock.json\nrm -rf node_modules\nnpm it\n```\n\nWe added `pleb.config.mjs` to skip a specific dependencies we don't want to upgrade.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftzachbon%2Fssr-react-monorepo-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftzachbon%2Fssr-react-monorepo-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftzachbon%2Fssr-react-monorepo-example/lists"}