Skip to content

Repository files navigation

Buffet

Buffet (bu·fè)

Buffet

Deploy on Railway

Fresh ingredients, simple web dev

Buffet is a template for 2025. Let's recognize where we stand:

  • Bun is awesome and powerful
  • Effect is a new way of thinking about type and exception safety
  • TailwindCSS makes styling easier for both humans and AI

So why not use them together?

Since Bun has better support for full-stack web development now, bringing a separate bundler, like Vite, is not required anymore. Less config files and dependencies to manage. Better DX.

The main goals of this template are:

  1. simplicity
  2. an optimized client bundle
  3. end-to-end type safety

What you are here for

bun i && bun run init && bun dev

⚠️ Warning
Bun >= 1.3.0 is required.
If you don't have Bun installed, run curl -fsSL https://bun.com/install | bash
If you have an older version of Bun, run bun upgrade
If you are on Windows, I'm sorry for you

Some notes on the workflow

  • The bun run init command sets up your project's environment and updates the auth schema.
  • The server applies committed migrations automatically before it starts accepting requests. A fresh clone does not need a separate migration command.
  • After changing a schema under server/, run bun run db:generate. Review and commit the generated SQL in migrations/.
  • A production SQLite database needs a persistent volume and one application instance. Move to a network database before adding replicas.
  • Avoid using the Better Auth CLI in production as it has a dependency on better-sqlite3, which requires V8 C++ APIs that Bun doesn't currently support.
  • To adjust rate limiting, refer to the corresponding plugin's documentation.

What's included?

The template is a work in progress, but it's ready for you to fork and ship your next project! All basic building blocks are here - auth, DB operations, API, routing, etc.

While the stack was very simple at the start (based on HTMX and @kitajs/html JSX runtime), it has become much more opinionated. It's hard to be happy about having a super fast and lightweight client bundle, when the project is unmaintainable. We need the red squiggly lines in the editor, and the types, and reliable battle-tested solutions for common things like auth. Here are the picks:

ElysiaJS supports the backend, it has a great ecosystem of plugins and various helpers for serving static files and implementing the API.
Svelte SPA is the frontend solution of choice.
Shadcn Svelte components are added to unlock fast UI prototyping.
Better Auth is used for authentication.

Other stuff

❗ Note for Biome:
if you are on Linux (not macOS), replace the @biomejs/cli-darwin-arm64 binary package with the appropriate one for your platform (see this list)

Contributions are welcome to keep polishing the experience!

About

A weird website template with potential

Resources

Stars

3 stars

Watchers

0 watching

Forks

Contributors

Languages