{"id":13451936,"url":"https://github.com/lmammino/fastify-preact-htm-boilerplate","last_synced_at":"2025-04-30T14:40:33.605Z","repository":{"id":44160286,"uuid":"171015363","full_name":"lmammino/fastify-preact-htm-boilerplate","owner":"lmammino","description":"Quickly bootstrap your next web app with Fastify, Preact and htm","archived":false,"fork":false,"pushed_at":"2022-12-02T23:02:25.000Z","size":187,"stargazers_count":40,"open_issues_count":8,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-30T17:02:30.051Z","etag":null,"topics":["boilerplate","bootstrap","bootstrap4","fastify","htm","preact","react","single-page-app","spa"],"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/lmammino.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":"2019-02-16T14:56:35.000Z","updated_at":"2025-02-23T02:12:50.000Z","dependencies_parsed_at":"2023-01-22T23:01:29.832Z","dependency_job_id":null,"html_url":"https://github.com/lmammino/fastify-preact-htm-boilerplate","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/lmammino%2Ffastify-preact-htm-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmammino%2Ffastify-preact-htm-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmammino%2Ffastify-preact-htm-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmammino%2Ffastify-preact-htm-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lmammino","download_url":"https://codeload.github.com/lmammino/fastify-preact-htm-boilerplate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251722765,"owners_count":21633009,"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":["boilerplate","bootstrap","bootstrap4","fastify","htm","preact","react","single-page-app","spa"],"created_at":"2024-07-31T07:01:07.444Z","updated_at":"2025-04-30T14:40:33.579Z","avatar_url":"https://github.com/lmammino.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# fastify-preact-htm-boilerplate\n\nQuickly bootstrap your next web app with [Fastify](https://www.fastify.io), [Preact](https://preactjs.com/) and [htm](https://github.com/developit/htm) (great stack for quick web prototypes).\n\n## Rationale 🤯\n\nSometimes you just want to create a quick prototype of a web app to get feedback from friends and co-workers.\n\nIn such cases, I personally don't like to invest a lot of time configuring build toolchains and tools such as Babel or Jest, but I want to get straight to the core.\n\nSince my favorite technologies to develop web apps are Fastify (API) and React (UI), I found this stack to work quite well as a compromise between familiarity, ease of development and possibility to improve over in case I want to convert the project to an actual production-ready app.\n\nMore details available in my blog article [Fastify and Preact for quick web app prototyping\n](https://loige.co/fastify-and-preact-for-quick-web-app-prototyping)\n\n[![Fastify and Preact for quick web app prototyping](https://loige.co/static/fastify-and-preact-for-quick-web-app-prototyping-fb-0e2a91fd4aeafdbd38532769ca069c85.png)](https://loige.co/fastify-and-preact-for-quick-web-app-prototyping)\n\n## Getting started 👩‍💻\n\nAs easy as running this:\n\n```bash\ngit clone https://github.com/lmammino/fastify-preact-htm-boilerplate.git my-new-project\ncd my-new-project\nrm -rf .git\nnpm install\n```\n\nNow enjoy editing the sample code in `src`:\n\n- `src/ui`: is for your frontend (Preact + htm)\n- `src/server`: is for your backend (Fastify)\n\nTo start the app, just run:\n\n```bash\nnpm start\n```\n\nThe app will be available at [localhost:3000](http://localhost:3000).\n\n## Ready to be distributed (with Docker) 🐳\n\nThe project contains already a `Dockerfile` that allows you to package and run the project without having to have Node.js and NPM installed.\n\nRun the following commands to run the app in a container:\n\n```bash\ndocker build -t my-new-project:my-tag .\ndocker run --init -it -p 3000:3000 my-new-project:my-tag\n```\n\nNow enjoy your app at [localhost:3000](http://localhost:3000).\n\n## What's missing? 🤔\n\nThis boilerplate does not suggest any way to **compile your assets** in a more production ready way. Also it doesn't make any **frontend routing** assumption (no library provided), nor it provides **server side rendering** (which you might want if you care about SEO).\n\nMoreover, there's no default way to **persist data** in your backed. Picking the right database for your needs is left up to you.\n\nThese are only some of the aspects you have to generally keep in mind while building an application for production and this boilerplate leaves these concerns to you.\n\n## Contributing 🤙\n\nEveryone is very welcome to contribute to this project.\nYou can contribute just by submitting bugs or suggesting improvements by\n[opening an issue](https://github.com/lmammino/fastify-preact-htm-boilerplate/issues) or by [sending a pull request](https://github.com/lmammino/fastify-preact-htm-boilerplate/pulls).\n\n## License 👮‍♀️\n\nLicensed under [MIT License](LICENSE). © Luciano Mammino.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flmammino%2Ffastify-preact-htm-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flmammino%2Ffastify-preact-htm-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flmammino%2Ffastify-preact-htm-boilerplate/lists"}