{"id":13604793,"url":"https://github.com/stormkit-io/monorepo-template-react","last_synced_at":"2025-04-12T02:31:47.251Z","repository":{"id":107600557,"uuid":"588565261","full_name":"stormkit-io/monorepo-template-react","owner":"stormkit-io","description":"A template capable of server-side rendering, generating static pages, serving single-page applications, and providing an API.","archived":false,"fork":false,"pushed_at":"2024-09-15T08:37:19.000Z","size":884,"stargazers_count":62,"open_issues_count":4,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-09-15T11:18:42.899Z","etag":null,"topics":["api","javascript","react","reactjs","serverless","serverless-framework","serverside-rendering","ssr","static-site-generator","vitejs"],"latest_commit_sha":null,"homepage":"https://monorepo-template-react.stormkit.dev/","language":"TypeScript","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/stormkit-io.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":"2023-01-13T12:39:00.000Z","updated_at":"2024-09-15T08:36:33.000Z","dependencies_parsed_at":"2023-12-20T07:36:44.405Z","dependency_job_id":"ea24cc86-2c73-4d56-b1f7-bba2e27a3036","html_url":"https://github.com/stormkit-io/monorepo-template-react","commit_stats":null,"previous_names":["stormkit-io/monorepo-template-react"],"tags_count":1,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stormkit-io%2Fmonorepo-template-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stormkit-io%2Fmonorepo-template-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stormkit-io%2Fmonorepo-template-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stormkit-io%2Fmonorepo-template-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stormkit-io","download_url":"https://codeload.github.com/stormkit-io/monorepo-template-react/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223489665,"owners_count":17153799,"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":["api","javascript","react","reactjs","serverless","serverless-framework","serverside-rendering","ssr","static-site-generator","vitejs"],"created_at":"2024-08-01T19:00:51.343Z","updated_at":"2024-11-07T09:31:03.759Z","avatar_url":"https://github.com/stormkit-io.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","Get Started"],"sub_categories":["Templates"],"readme":"\u003e Minimal no-framework monorepo template built with Vite and React\n\n## Features \n\n[![Deploy with Stormkit](https://www.stormkit.io/button.svg)](https://api.stormkit.io/deploy?template=https%3A%2F%2Fgithub.com%2Fstormkit-io%2Fmonorepo-template-react)\n\n✔️ \u0026nbsp;**Hybrid application:** Choose rendering method (SSG, SSR, SPA) based on routes\n\n✔️ \u0026nbsp;**API support:** Optional file-system routing support for API endpoints\n\n✔️ \u0026nbsp;**No framework:** React knowledge is enough to use this template\n\n✔️ \u0026nbsp;**SEO:** SEO tags included for SSR and SSG\n\n✔️ \u0026nbsp;**Compatible:** Build produces separate folders for client-side, server-side, and API. Highly compatible with hosting providers.\n\n✔️ \u0026nbsp;**HMR:** Hot module replacement support for all apps (SSR, SSG, SPA, API)\n\n✔️ \u0026nbsp;**Typescript:** Built-in TypeScript support\n\n✔️ \u0026nbsp;**Jest:** Built-in Jest support\n\n## Getting started\n\nThis is a starter template for building applications with Vite and React. Click `use this template` and start working right away.\n\n## Development\n\n```\n# Using npm\nnpm run dev\n\n# Using yarn\nyarn dev\n\n# Using pnpm\npnpm run dev\n```\n\nThis will spawn an Express server that serves your application. Built-in Hot Module Replacement (HMR) support.\n\n## How it works? \n\nIn the local environment, [src/entry-server.tsx](./src/entry-server.tsx) is the entry point for the application. It uses \n`react-router` to understand what page to render. If the route exports a `fetchData` method, the component will be server-side-rendered. \nOtherwise, it will be client-side rendered. Data returned by `fetchData` will be made available to the component by [React Context](./src/context.ts).\n\nSee [src/pages/ssr.tsx](./src/pages/ssr.tsx) for an example.\n\n## Static site generator\n\nYou can define which routes to prerender by modifying the [src/prerender.ts](./src/prerender.ts) file. During build time, the builder will be make a \nrequest to each route exported by this file and will take a snapshot of the HTML document.\n\n## Single page app\n\nBy default, every route is a single-page application.\n\n## API\n\nThe [src/api/](./src/api/) directory contains functions that act as API. The path to the file and the file name is used to determine the endpoint. \nThe API is comptabile with [Stormkit](https://www.stormkit.io). [Check the docs](https://www.stormkit.io/docs/features/writing-api) for more information.\n\nIf you need to host the API elsewhere, you'll need to change the [vite.config.api.ts](./vite.config.api.ts) file and create a bundle from it. You may\nalso need to write an entry point that calls the appropriate function based on the route.\n\n## Test\n\nJest is already preconfigured to work with this repository. Simply run:\n\n```bash\n$ npm run test\n$ yarn test\n$ pnpm run test\n```\n\nto execute all tests. You can add the `--watch` flag to keep listening to changes while testing:\n\n```bash\n$ npm run test -- --watch\n$ yarn test --watch\n$ pnpm run test --watch\n```\n\n## Community\n\nHere's a curated list of websites using this framework. Please feel free to add your own:\n\n| Site name | Description | \n| --------- | ----------- |\n| [Stormkit.io](https://www.stormkit.io) | Deploy full stack javascript applications on the cloud | \n| [Feez.ws](https://www.feez.ws) | Track your progress in public | \n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstormkit-io%2Fmonorepo-template-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstormkit-io%2Fmonorepo-template-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstormkit-io%2Fmonorepo-template-react/lists"}