{"id":29223683,"url":"https://github.com/cdleveille/fresh-bun","last_synced_at":"2025-07-03T05:06:08.317Z","repository":{"id":196068379,"uuid":"693890805","full_name":"cdleveille/fresh-bun","owner":"cdleveille","description":"Single-page web app project template curated for performance, developer experience, and type safety. Bun, Elysia, React, TanStack Router/Query.","archived":false,"fork":false,"pushed_at":"2025-07-02T04:15:01.000Z","size":3160,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-02T04:33:35.330Z","etag":null,"topics":["bun","eden","elysia","fresh","fullstack","react","tanstack-query","tanstack-router","template","typescript","vite","websocket"],"latest_commit_sha":null,"homepage":"https://fresh-bun.fly.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/cdleveille.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,"zenodo":null}},"created_at":"2023-09-19T23:25:16.000Z","updated_at":"2025-07-02T04:15:04.000Z","dependencies_parsed_at":"2023-11-25T21:23:13.730Z","dependency_job_id":"7a053a71-0e87-432b-b048-99c3686ef2db","html_url":"https://github.com/cdleveille/fresh-bun","commit_stats":null,"previous_names":["cdleveille/fullstack-bun","cdleveille/fresh-bun"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/cdleveille/fresh-bun","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdleveille%2Ffresh-bun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdleveille%2Ffresh-bun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdleveille%2Ffresh-bun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdleveille%2Ffresh-bun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdleveille","download_url":"https://codeload.github.com/cdleveille/fresh-bun/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdleveille%2Ffresh-bun/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263264647,"owners_count":23439257,"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":["bun","eden","elysia","fresh","fullstack","react","tanstack-query","tanstack-router","template","typescript","vite","websocket"],"created_at":"2025-07-03T05:06:07.818Z","updated_at":"2025-07-03T05:06:08.291Z","avatar_url":"https://github.com/cdleveille.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# \u003cimg src=\"https://raw.githubusercontent.com/cdleveille/fresh-bun/refs/heads/main/src/client/assets/bun.svg\" alt=\"Bun\" width=\"30\"\u003e fresh-bun\n\nSingle-page web app project template curated for performance, developer experience, and type safety.\n\n## 🔧 Stack\n\n- [Bun](https://bun.sh) - server runtime, package manager, script runner\n- [Elysia](https://elysiajs.com) - server framework\n- [Eden](https://elysiajs.com/eden/overview) - end-to-end type safety\n- [React](https://react.dev) - user interface\n- [TanStack Router](https://tanstack.com/router) - client-side routing\n- [TanStack Query](https://tanstack.com/query), [Zustand](https://zustand-demo.pmnd.rs) - state management\n- [TypeScript](https://www.typescriptlang.org), [Biome](https://biomejs.dev), [Lefthook](https://lefthook.dev) - code quality/style\n- [Vite](https://vite.dev) - dev server, bundler\n\n## ✨ Features\n\n- **100% Type-Safe API**: Full static type-safety between the server and client. See [api.ts](https://github.com/cdleveille/fresh-bun/blob/main/src/server/api.ts) and [useApi.ts](https://github.com/cdleveille/fresh-bun/blob/main/src/client/hooks/useApi.ts) for simple HTTP and WebSocket examples.\n\n- **Automatic API Documentation**: Interactive [Scalar](https://github.com/scalar/scalar) documentation is automatically generated and served at `/api/reference`. The raw OpenAPI JSON is available at `/api/reference/json`.\n\n- **Progressive Web App Capable**: Meets PWA requirements for an installable, native app-like experience. Scores a near-perfect [PageSpeed Insights](https://pagespeed.web.dev/analysis?url=https%3A%2F%2Ffresh-bun.fly.dev\u0026form_factor=desktop) report out of the box.\n\n- **Offline Support**: A [service worker](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API) caches static assets and API responses, enabling offline functionality and faster subsequent loads with fewer requests to the server.\n\n- **Production Ready**: Includes a multi-stage `Dockerfile` that compiles the app into a standalone binary and runs it in a minimal distroless image. Pre-configured GitHub workflows for continuous integration and deploying to [fly.io](https://fly.io) on pushes to the `main` branch.\n\n## 🚧 Scope\n\nThe following are not currently implemented, but may be added in the future:\n\n- Server-Side Rendering (SSR) / React Server Components (RSC)\n- Database / ORM\n- Authentication / Authorization\n- CSS Framework / UI Component Library\n- Unit / E2E Tests\n- Logging / Analytics\n\n## 🚀 Getting Started\n\n### Setup\n\n1. Install [Git](https://git-scm.com/downloads), [Bun](https://bun.sh/docs/installation), and optionally [Docker](https://docs.docker.com/get-docker) (useful for testing production builds locally)\n\n2. Clone this repository and install dependencies:\n\n```bash\ngit clone https://github.com/cdleveille/fresh-bun.git\ncd fresh-bun\nbun install\n```\n\n### Local Development\n\nRun the Elysia backend and Vite dev server concurrently:\n\n```bash\nbun dev\n```\n\n### Production Build\n\n**Option 1:** Bundle client and start server:\n\n```bash\nbun bundle\nbun start\n```\n\n**Option 2:** Build app and run standalone binary:\n\n```bash\nbun run build\n./main\n```\n\n**Option 3:** Build Docker image and run in container:\n\n```bash\ndocker build -t fresh-bun .\ndocker run -p 3000:3000 fresh-bun\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdleveille%2Ffresh-bun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdleveille%2Ffresh-bun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdleveille%2Ffresh-bun/lists"}