{"id":27366491,"url":"https://github.com/molily/universal-progressive-todos","last_synced_at":"2025-04-13T05:57:09.632Z","repository":{"id":42206389,"uuid":"48966278","full_name":"molily/universal-progressive-todos","owner":"molily","description":"A Todo list with universal JavaScript \u0026 Progressive Enhancement","archived":false,"fork":false,"pushed_at":"2023-01-07T04:11:11.000Z","size":3359,"stargazers_count":30,"open_issues_count":8,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-13T05:57:05.271Z","etag":null,"topics":["isomorphic","javascript","leveldb","preact","progressive-enhancement","react","redux","todomvc","universal","universal-javascript","universal-react"],"latest_commit_sha":null,"homepage":"https://molily.de/single-page-apps/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/molily.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":"2016-01-04T00:39:34.000Z","updated_at":"2021-12-30T12:25:55.000Z","dependencies_parsed_at":"2023-02-06T11:31:12.951Z","dependency_job_id":null,"html_url":"https://github.com/molily/universal-progressive-todos","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/molily%2Funiversal-progressive-todos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/molily%2Funiversal-progressive-todos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/molily%2Funiversal-progressive-todos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/molily%2Funiversal-progressive-todos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/molily","download_url":"https://codeload.github.com/molily/universal-progressive-todos/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248670441,"owners_count":21142901,"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":["isomorphic","javascript","leveldb","preact","progressive-enhancement","react","redux","todomvc","universal","universal-javascript","universal-react"],"created_at":"2025-04-13T05:57:08.915Z","updated_at":"2025-04-13T05:57:09.620Z","avatar_url":"https://github.com/molily.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Todo list with universal JavaScript \u0026amp; Progressive Enhancement\n\nThis example app renders HTML on the server and on the client using “universal” JavaScript. It uses Node.js, [React](https://facebook.github.io/react/), [React-Router](https://github.com/rackt/react-router) and [Redux](https://github.com/rackt/redux) for the rendering and the UI logic. For storing the todos on the server, it uses the key-value database [LevelDB](http://leveldb.org/).\n\n_There’s also a [Preact version available in the preact branch](https://github.com/molily/universal-progressive-todos/tree/preact) if you prefer that over React._\n\nThere are several good example apps and boilerplates for universal React/Preact apps. This one borrows ideas from Milo Mordaunt’s great tutorial: [Handcrafting an Isomorphic Redux Application (With Love)](https://medium.com/front-end-developers/handcrafting-an-isomorphic-redux-application-with-love-40ada4468af4) and the [corresponding repository](https://github.com/bananaoomarang/isomorphic-redux).\n\nWhat’s special about this example is that it’s made with **Progressive Enhancement** in mind. Instead of just rendering the first page on the server to improve the JavaScript application’s startup time, this example works entirely when [JavaScript is disabled or fails for any reason](http://kryogenix.org/code/browser/everyonehasjs.html). See these articles for background information:\n\n- [Interaction is Key: Progressive Enhancement and JavaScript](https://molily.de/interaction-is-key/)\n- [Progressive enhancement for JavaScript web apps](https://molily.de/single-page-apps/)\n- [Progressive enhancement and JavaScript failure](https://molily.de/javascript-failure/)\n- [Robust Client-Side JavaScript – A Developer’s Guide](https://molily.de/robust-javascript/)\n\nWhen it comes to data fetching, this example follows Milo Mordaunt’s approach. It declares the data dependencies in the React/Preact component. The static component property `needs` lists Redux action creators.\n\nThese [action creators](src/actions/todosActions.js) directly talk to the database when called on the server, or make a request to the server when called on the client. It gets simpler if you use a separate HTTP REST API server that speaks JSON. Then you can use a universal HTTP library like [axios](https://github.com/mzabriskie/axios) or [fetch](https://github.com/matthew-andrews/isomorphic-fetch) to talk with the API server. In this simple example though, everything is mashed up on purpose.\n\n## Development server\n\nStart the development server with:\n\n```\n$ npm install\n$ npm start\n```\n\nThen open [http://localhost:3333](http://localhost:3333) in your browser.\n\n## Production server\n\nMake a client and server production build:\n\n```\n$ npm run build\n```\n\nStart the server with:\n\n```\n$ npm run server:production\n```\n\nThen open [http://localhost:3333](http://localhost:3333) in your browser.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmolily%2Funiversal-progressive-todos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmolily%2Funiversal-progressive-todos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmolily%2Funiversal-progressive-todos/lists"}