{"id":18399539,"url":"https://github.com/fireproof-storage/hyperwave-hello","last_synced_at":"2025-04-12T16:00:01.593Z","repository":{"id":202773401,"uuid":"707804563","full_name":"fireproof-storage/hyperwave-hello","owner":"fireproof-storage","description":"HTMX, Bun, and Fireproof example","archived":false,"fork":false,"pushed_at":"2023-10-23T17:48:17.000Z","size":57,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-16T02:46:44.906Z","etag":null,"topics":[],"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/fireproof-storage.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":"2023-10-20T17:40:47.000Z","updated_at":"2024-11-29T14:45:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"307fc6f8-9006-4868-bb99-0e53d4e7185c","html_url":"https://github.com/fireproof-storage/hyperwave-hello","commit_stats":null,"previous_names":["jchris/hyperwave-hello"],"tags_count":0,"template":false,"template_full_name":"tireymorris/hyperwave","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fireproof-storage%2Fhyperwave-hello","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fireproof-storage%2Fhyperwave-hello/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fireproof-storage%2Fhyperwave-hello/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fireproof-storage%2Fhyperwave-hello/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fireproof-storage","download_url":"https://codeload.github.com/fireproof-storage/hyperwave-hello/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248593561,"owners_count":21130310,"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":[],"created_at":"2024-11-06T02:27:40.005Z","updated_at":"2025-04-12T16:00:01.568Z","avatar_url":"https://github.com/fireproof-storage.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bun, HTMX, and Fireproof\n\nThis is a simple proof-of-concept to get you started using Fireproof on the server side. In this example, we import Fireproof from the node build:\n\n```ts\nimport { fireproof } from '@fireproof/core/node'\n```\n\nThis ensures we get the server build, which uses the filesystem and Node.js crypto APIs, instead of the browser versions.\n\n## Notes\n\n* In a production deployment you'd want to link your edge Fireproof instances (the ones in your Bun server) to each other, most likely using something like PartyKit (CloudFlare durable objects) or IPFS. More info on [connecting Fireproof instances can be found here](https://use-fireproof.com/docs/connect/).\n* Read the Hono docs to learn [about deploying this app to edge functions](https://hono.dev).\n\nOriginal README below:\n\n## Built using hyperwave 🌊\n\nhttps://hyperwave.codes/\n\nhyperwave is a server-side framework for building web applications.\n\n- fast: Bun and Hono for best-in-class performance\n- lightweight: ~20kb payload. Demo loads in a couple seconds even while throttled to 2G.\n- productive: use the best tools for the job: Tailwind, HTMX, and TypeScript\n- portable: compile a binary to deploy anywhere\n\n### Setup\n\n`bun install \u0026\u0026 bun dev`\n\nVisit port 3000 and edit `server.tsx`\n\n---\n\n### Example\n\nThis is the endpoint serving our initial landing page:\n\n```typescript\napp.get('/', ({ html }) =\u003e\n  html(\n    \u003cLayout title=\"hyperwave\"\u003e\n      \u003csection class=\"flex flex-col gap-8\"\u003e\n        \u003cdiv\u003e\n          \u003cbutton\n            class=\"bg-blue-100 p-4 text-sm font-bold rounded-md shadow-sm\"\n            hx-get=\"/instructions\"\n            hx-target=\"closest div\"\n          \u003e\n            fetch instructions from \u003ccode\u003e/instructions\u003c/code\u003e\n          \u003c/button\u003e\n        \u003c/div\u003e\n      \u003c/section\u003e\n    \u003c/Layout\u003e\n  )\n)\n```\n\n- The API serves a full HTML document to the client, which includes Tailwind classes and HTMX attributes\n- The response is wrapped in a `\u003cLayout /\u003e` tag, a server-rendered functional component, which takes a `title` prop\n- The button, when clicked, will issue a `GET` request to `/instructions` and replace the content of its parent div with the response.\n\n---\n\n### Deployment\n\nBuild an executable for your current architecture with `bun run build`\n\n`PORT` environment variable is available if needed (default 3000)\n\nNote: deploy `public/` with the executable, it contains the generated UnoCSS build.\n\n---\n\n### Components\n\n- [Bun](https://bun.sh/) provides the bundler, runtime, test runner, and package manager.\n- [SQLite](https://bun.sh/docs/api/sqlite) is production-ready and built into Bun.\n- [Hono](https://hono.dev) is a robust web framework with great DX and performance\n- [UnoCSS](https://unocss.dev/integrations/cli) is Tailwind-compatible and generates only the styles used in application code.\n- [HTMX](https://htmx.org/reference/) gives 99% of the client-side interactivity most apps need.\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffireproof-storage%2Fhyperwave-hello","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffireproof-storage%2Fhyperwave-hello","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffireproof-storage%2Fhyperwave-hello/lists"}