T4Stack

An open-source starter kit for shipping native and web apps

About

T4 Stack is an open-source, full-stack starter kit designed for building universal React applications that work seamlessly across both web and native platforms. With a minimalistic setup, T4 Stack allows for quick project initialization and rapid development cycles, making it suitable for both startups and established projects looking to streamline their development process.

T4 Stack enables universal apps, unburdened by performance bottlenecks. The unmatched iteration speed and developer experience is achieved by sharing nearly all code between native and web apps. By providing a growing list of components such as infinite lists, authentication, localization, and navigation shells, T4 Stack makes it easy for web developers to build for all platforms.

The platform is built with TypeScript to ensure type safety and features a curated selection of high-performance libraries like Tamagui for UI components, tRPC for type-safe data fetching, and Million.js for a virtual DOM replacement. The platform supports building apps for web platforms including iOS, Android, macOS, Windows, and Linux, enabling developers to maintain feature parity and a consistent user experience across different devices.

Updates for T4 Stack-based apps are handled by their Update Bot. It automatically creates pull requests in the user’s repository with the latest updates, making it easy to keep a project up to date. T4 Stack integrates with modern development tools and frameworks such as Next.js, Expo, Supabase for authentication and Cloudflare Workers for serverless functions. It also supports PWA by default for desktop applications without needing Electron.

How they use Cloudflare

T4 Stack harnesses Cloudflare’s developer products to create a high-performance full-stack application. They utilize Workers with Rust bindings for secure Argon2 password-hashing, enjoying zero cold start serverless functions and the lowest cost achieved to scale up serverless deployments.

For their front-end needs, T4 Stack uses Cloudflare Pages, integrating Next.js deployment plugins with GitHub Actions for rapid, efficient deployments. Users benefit from the fastest global CDN, automatic image optimizations, and robust DDoS protection. On the data management side, D1 offers T4 Stack blazing-fast query speed and the lowest cost per GB, ideal for storing authentication details, user data, and code updates.

To maximize storage and delivery needs, T4 Stack pairs with Cloudflare’s performant CDN to achieve a competitive cost per GB, ensuring speedy, cost-effective storage and delivery. KV also helps reduce latency within a Worker, and helps rate limit authentication endpoints.

Why Cloudflare?

By integrating tightly within Cloudflare’s developer platform, T4 Stack has been able to deliver a secure, fast, and cost-effective full-stack application, ensuring an exceptional user experience. Cloudflare's ecosystem allows their team to deploy the entire application stack to a serverless environment, leveraging Workers functions across iOS, Android, Web, and Desktop. T4 Stack is also a part of Workers Launchpad Cohort #3, and has seen tremendous value in the bootcamp sessions primarily geared towards startup GTM, product-market fit, and public relations.

“Our team is really happy with the Cloudflare Workers features. Workers for Platforms has been super exciting for us to build around the infrastructure to manage deployments for customers, and we can’t wait to invest more in the platform.”

“Cloudflare's ecosystem allows us to deploy the entire application stack to a serverless environment, leveraging Workers functions across iOS, Android, Web, and Desktop.”