Bhvr is a new open-source starter kit designed for building full-stack web applications with a modern and performant tech stack. It combines Bun, a fast JavaScript runtime, with Hono, a lightweight web framework, along with Vite for frontend tooling and React for building user interfaces. This starter provides a pre-configured setup with features like server-side rendering (SSR), file-based routing, and TypeScript support, aiming to streamline development and offer a solid foundation for projects. The project aims to provide a performant and enjoyable developer experience with an emphasis on simplicity and minimal configuration.
The project, "Bhvr," presented on Hacker News, introduces a comprehensive and meticulously crafted starter kit designed for rapid development of web applications. This starter kit leverages a powerful combination of modern technologies, aiming to provide developers with a highly performant and productive development environment.
At its core, Bhvr utilizes Bun, a fast all-in-one JavaScript runtime, as its foundation. This choice prioritizes speed and efficiency in both development and execution. Building upon Bun, the project integrates Hono, a minimalist and high-performance web framework specifically designed for Bun, enabling streamlined routing and handling of HTTP requests.
For the front-end, Bhvr employs Vite, a cutting-edge build tool known for its exceptional speed and optimized development experience. Vite's instant server start and hot module replacement capabilities contribute significantly to a smoother workflow. Further enhancing the front-end development process, Bhvr integrates React, a widely adopted JavaScript library for building user interfaces. This combination allows developers to leverage the vast React ecosystem and build dynamic and interactive web applications with ease.
Bhvr also thoughtfully incorporates TypeScript for both the front-end and back-end, providing static typing and improved code maintainability. The project also uses Tailwind CSS, a utility-first CSS framework, offering a flexible and efficient approach to styling the application's user interface. This allows developers to rapidly prototype and customize the look and feel of their projects.
Furthermore, Bhvr includes pre-configured tooling for testing, employing both Vitest and Playwright, enabling developers to write comprehensive unit and end-to-end tests for their applications. This ensures code quality and facilitates the early detection of potential issues.
In essence, Bhvr presents a carefully curated and optimized development starter kit, combining the performance benefits of Bun and Hono with the developer-friendly features of Vite, React, TypeScript, and Tailwind CSS. This provides a robust foundation for building modern, high-performance web applications, reducing boilerplate setup and allowing developers to focus on the core functionality of their projects. The inclusion of a comprehensive testing setup further reinforces the commitment to quality and maintainability.
Summary of Comments ( 35 )
https://news.ycombinator.com/item?id=43811016
Hacker News users discussed the practicality and appeal of the "Bhvr" starter kit. Some found the combination of Bun, Hono, Vite, and React appealing for its speed and developer experience, while others questioned the need for both Vite and Hono, suggesting potential redundancy. A few commenters expressed concern about the project's reliance on bleeding-edge technologies and the implied maintenance burden. The overall sentiment leaned towards cautious optimism, with several users interested in trying the starter kit but also highlighting the rapidly changing JavaScript ecosystem and the risk of investing in potentially short-lived tools. There was a short discussion around routing and the author's choice of file-based routing, which some found to be limiting. Finally, some commenters appreciated the straightforwardness and simplicity of the project's structure.
The Hacker News post titled "Show HN: Bhvr, a Bun and Hono and Vite and React Starter" generated several comments, mostly discussing the choice and combination of technologies used.
Several users expressed skepticism about the need for and benefits of combining Bun, Hono, Vite, and React. One commenter questioned the value proposition, pointing out that Bun itself aims to be an all-in-one solution, thus adding Vite seems redundant and potentially performance-hindering. They suggested that if the goal is purely server-side rendering with React, using something like Next.js 13 with its server components would be a more streamlined and efficient approach. Another user echoed this sentiment, expressing confusion about the project's purpose and arguing that Vite and Hono seem unnecessary additions to a Bun-based project.
Another line of discussion revolved around the rapid pace of JavaScript framework churn and the potential fatigue it causes. One commenter expressed weariness with constantly having to learn new tools and questioned the longevity of these technologies. They suggested that focusing on fundamentals might be a more sustainable approach than chasing the latest trends.
Some commenters offered constructive criticism and suggestions. One user advised considering server components in Bun, highlighting their efficiency and ease of implementation. Another commenter suggested removing Vite from the stack and utilizing Bun's built-in capabilities for handling assets and serving the React application.
Several users engaged in a back-and-forth discussing the relative merits of Hono versus using Bun's built-in HTTP server capabilities. Arguments were made for Hono's middleware support and portability, while others argued that for simpler projects, Bun's integrated features suffice. A commenter who identified themself as being involved in the Hono project provided further context on their reasoning and usage within the project.
A few comments touched on the project's structure and potential improvements. One user suggested looking into HatTip as a potential alternative to Hono. Others inquired about specific aspects of the project's setup, like data fetching and backend integration.
Overall, the comments reflect a cautious but engaged reception to the project. Many commenters questioned the complexity introduced by combining multiple technologies, advocating for simpler and more focused solutions. The discussion highlighted the ongoing debate within the JavaScript community regarding the balance between adopting new tools and sticking to established practices.