{"id":16095792,"url":"https://github.com/zeusdeux/jimmy","last_synced_at":"2026-05-02T06:42:00.273Z","repository":{"id":149116629,"uuid":"138525413","full_name":"zeusdeux/jimmy","owner":"zeusdeux","description":"A simple react based static site generator built to understand static site generation.","archived":false,"fork":false,"pushed_at":"2018-07-09T01:48:14.000Z","size":250,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-05T20:15:18.471Z","etag":null,"topics":["react","server-side-rendering","simple","ssr","static-site-generator"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/zeusdeux.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":"2018-06-25T00:25:49.000Z","updated_at":"2018-07-09T01:48:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"076f4173-7215-41e4-94b2-6bc7419a7ae3","html_url":"https://github.com/zeusdeux/jimmy","commit_stats":{"total_commits":26,"total_committers":1,"mean_commits":26.0,"dds":0.0,"last_synced_commit":"a79c280b18db6d3c66e435534b298d2ea32d52a8"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zeusdeux/jimmy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeusdeux%2Fjimmy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeusdeux%2Fjimmy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeusdeux%2Fjimmy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeusdeux%2Fjimmy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zeusdeux","download_url":"https://codeload.github.com/zeusdeux/jimmy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeusdeux%2Fjimmy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32525896,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T01:12:54.858Z","status":"online","status_checked_at":"2026-05-02T02:00:05.923Z","response_time":132,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["react","server-side-rendering","simple","ssr","static-site-generator"],"created_at":"2024-10-09T17:08:53.185Z","updated_at":"2026-05-02T06:42:00.237Z","avatar_url":"https://github.com/zeusdeux.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jimmy\n\nA simple react based static site generator built to understand static site generation.\n\n# Run it\n\n1. Clone the repo\n2. `npm i` to install the dependencies\n3. `npm run bundle` to prepare the server side executable\n4. `npm run build` to use the bundled server side executable to generate the static site inside `public/`\n5. `serve public/` (or anything you use to serve static files)\n\nWhile this supports dynamic routes, to serve dynamic routes, you need to setup your nginx/what have you to serve\nthe root `\u003cdynamic route\u003e/index.html` for all dynamic routes and from there let the client side routing kick in.\n\n# Features\n\n- [x] Support static routes\n- [x] Support dynamic routes (supported only client side)\n- [ ] Support using data sources\n- [ ] Generate nginx config to complete the dynamic routes picture\n\n# Expected directory structure\n\n`./index.js` -\u003e project root has an index.js which exports a react component\nthat is used as a shell to generate all files. It's equivalent to\nindex.html. ReactDOMServer.renderToStaticMarkup is used to render this file.\nRendered file name depends on the route being rendered. If not found, index.default.js is used.\nThough this is sort of a lie as right now index.default.js is hardcoded to be used.\n\n`App/index.js` -\u003e This react component will be given `[\u003cLink /\u003e]` and `[\u003cRoute /\u003e]`\nIt can choose to render those arrays however and where ever it wants. It's\nthe shell for your application.\n\n`App/Main.js` -\u003e This is the entry point for the client side app bundle.\nTherefore, it should have a call to `ReactDOM.hydrate`\n\n`App/Routes` -\u003e This folder contains all the routes. The hierarchy matches the\nthe name of the route. For example:\n\n```\nComponent: App/Routes/index.js -\u003e Route: /\nComponent: App/Routes/home/index.js -\u003e Route: /home\nComponent: App/Routes/home/:param/index.js -\u003e Route: /home/:param\n```\n\nEach route component can expose a static async `getData` function that resolves to the data\nneeded by the route. It should be keyed by the route params. For example:\n\nFor a route such as `/home/:username/product/:productId`, the `getData` function should return\na data structure such as:\n\n```js\n[\n  {\n    username: 'abc',\n    productId: '10',\n    ...additional data\n  },\n  {\n    username: 'xyz',\n    productId: '20',\n    ...additional data\n  }\n]\n```\n\nThe additional data will be passed in as `props.data` to the component for the route.\n\n# How it works\n\n1. Generate route list relative to `App/Routes/`\n2. Generate route manifest from route list received from step 1. Its shape is `{ ReactRouterRoute: componentModule }`\n3.\n    - build `\u003cLink\u003e\u003c/Link\u003e` array\n    - build `\u003cRoute /\u003e` array\n4. Render a map from react router route to `index.html` string for that route\n5. Render all `index.html` files for all routes. They are generated from `index.default.js` found in the root of this project.\n6. Generate js and css bundles using `App/Main.js` as entry for webpack and put 'em in `/public/assets`.\n   The config file used for this is `webpack.static.config.js` in the root of this project.\n\nAnd you're done!\n\n## NOTES:\n\u003e Redirects are reified. This means, while rendering if a redirect is encountered,\n\u003e for e.g., / redirects to /home then the redirect is followed during rendering\n\u003e and the final route that renders to string is put in the folder for /.\n\n# Caveats\n\n1. This isn't a generic solution. It's tied to this repo.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeusdeux%2Fjimmy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeusdeux%2Fjimmy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeusdeux%2Fjimmy/lists"}