As developers, we understand the importance of having a reliable and flexible starter kit to kickstart our projects. The create-t3-appCLI tool has become a beloved choice for many in the developer community, boasting over 24.7k stars on GitHub. This popularity is a testament to its effectiveness in helping developers build full-stack TypeScript applications with ease. Instead of starting from scratch to create a new CLI tool, it makes perfect sense to build on top of such a well-established and widely adopted project.
That's why we're excited to introduce a powerful enhancement to create-t3-app—one that preserves its versatility while integrating Neon as a robust PostgreSQL database provider, offering developers an additional, seamless solution for serverless PostgreSQL.
Why We Forked create-t3-app
The open-source nature of create-t3-app allows it to evolve alongside the needs of the community. Our team saw an opportunity to build upon this amazing foundation by integrating Neon as a database provider. The goal of our fork was not to diverge from the original project but to contribute an enhancement that we hope will eventually be merged back into the main repository.
Two-Part Challenge Submission
Our challenge submission for the Neon Open Source Starter Kit Challenge consists of two distinct parts:
create-neon-t3 CLI alternative
We created a fork of the original create-t3-app called create-neon-t3, which sets Neon as the default database provider. This fork is accessible as an npm package through:
npm create neon-t3
This version is tailored for developers who already know they'll be using a PostgreSQL database in a serverless environment. It retains all the original flexibility of create-t3-app, allowing you to scaffold your Next.js project with built-in authorization and type safety (while optional, tRPC hugely recommended) while defaulting to Neon as the database provider.
2.A Pull Request to the Original Project
The second part of our submission is a pull request to the original create-t3-app project. Our aim is to contribute this enhancement back to the community, ensuring that the tool continues to serve the evolving needs of developers.
The original create-t3-app offered PlanetScale as the primary database option for MySQL users. However, with PlanetScale's recent deprecation of their free tier, the community needs a strong alternative—especially for those who prefer to build on PostgreSQL. Neon, designed for serverless environments and with its very generous free tier, is the perfect fit for this role.
With PlanetScale's recent deprecation of their free tier, the community needs a strong alternative—especially for those who prefer to build on PostgreSQL. Neon, designed for serverless environments and with its very generous free tier, is the perfect fit for this role.
Why Neon?
Neon offers a modern, serverless PostgreSQL solution that is perfectly aligned with the needs of developers who prioritize performance, scalability, and simplicity.
I tried using Supabase (lot's of connection issues) and Vercel's Storage (seamless integration, but they're missing all the extra tools that other DB providers offer)
With Neon, you get:
Serverless PostgreSQL: Seamless scaling without the need for managing servers.
Cost Efficiency: A free tier that supports developers from prototyping to production.
Developer-Friendly: A modern approach to database management, making it easy to integrate into existing workflows.
✅ Checklist
[x] I have followed every step in the contributing guide (updated 2022-10-06).
[x] I performed a functional test on my final commit
Changelog
Adds Neon as a database provider: Introduced Neon as an option for PostgreSQL
Updates CLI Prompts: Added a new option to select Neon as the database provider during the setup process.
Configuration Files: Generated all necessary configuration files for Prisma and Drizzle ORM when Neon is selected, ensuring seamless integration with Neon's serverless PostgreSQL.
(still WIP to fit to their contribution guidelines)
Why Neon?
Neon offers a modern, serverless PostgreSQL solution that is perfectly aligned with the needs of developers who prioritize performance, scalability, and simplicity.
With Neon, you get:
Serverless PostgreSQL: Seamless scaling without the need for managing servers.
Cost Efficiency: A free tier that supports developers from prototyping to production.
Developer-Friendly: A modern approach to database management, making it easy to integrate into existing workflows.
How to Use the CLI Tool
Our CLI tool retains the simplicity and flexibility of the original create-t3-app while offering Neon as the default database provider. Here’s how you can use it to kickstart your next project:
Step 1: Install and Run the CLI
To get started, you can run the CLI directly from npm:
npm create neon-t3@latest
This will pull the latest version of the CLI
Pro Tip here: If the package is called "create-neon-t3", why can it be run with npm create neon-t3?
This is because of the Package Naming Convention:
The package name "create-neon-t3" follows a common convention where packages designed to scaffold new projects start with create-. When you run npm create neon-t3, npm looks for a package named "create-neon-t3" to initialize a new project.
The @latest tag ensures that the latest version of the package is used.
Step 2: Choose Your Project Options
The CLI will guide you through a series of prompts to configure your new project. Since Neon is set as the default database provider, that won't be part of these prompts:
Step 3: Set Up Your Environment
Once you’ve completed the setup, the CLI will generate a .env file for your project. This file will include the necessary environment variables for connecting to your Neon database.
For example:
env
# Database Connection StringDATABASE_URL="postgresql://postgres:password@localhost:5432/myapp"# Next Auth SettingsNEXTAUTH_SECRET="your-secret"NEXTAUTH_URL="http://localhost:3000"
Step 4: Create and connect your Neon project
Proceed to connect your Neon's project by simply configuring your database URL available on your Neon dashboard.
Step 5: Start Building
With everything set up, you can begin building your application immediately. The CLI has taken care of configuring the database, authentication, and other essential settings, allowing you to focus on writing code.
npm run dev
Together, we can continue to build the ultimate open-source starter kit—one that adapts to the needs of the community and supports developers at every stage of their journey. Happy coding!
The best way to start a full-stack, typesafe Next.js app
create-neon-t3
Interactive CLI to start a full-stack, typesafe Next.js app, with database on Neon
Why We Forked create-t3-app
The open-source nature of create-t3-app allows it to evolve alongside the needs of the community. Our team saw an opportunity to build upon this amazing foundation by integrating Neon as a database provider. The goal of our fork was not to diverge from the original project but to contribute an enhancement that we hope will eventually be merged back into the main repository.
The original create-t3-app offered PlanetScale as the primary database option for MySQL users. However, with PlanetScale's recent deprecation of their free tier, the community needs a strong alternative—especially for those who prefer to build on PostgreSQL. Neon, designed for serverless environments and with its very generous free tier, is the perfect fit for this role.
Why Neon?
Neon offers a modern, serverless PostgreSQL solution that is perfectly aligned with…
The Bigger Picture: Contributing Back to the Community
Our intention with this fork is to contribute something valuable back to the open-source community. By integrating Neon into the create-t3-app tool, we hope to offer developers another robust option for building with PostgreSQL. This enhancement is not just about adding a new feature—it’s about ensuring that the tool continues to grow in ways that serve the needs of its users.
We deliberately chose not to remove any other database providers on the pull request to the original project, such as PlanetScale, to maintain the CLI's versatility and ensure a smooth integration process. Our hope is that by keeping the tool open and adaptable, it will encourage more developers to contribute and ultimately lead to this enhancement being merged into the original project.
Conclusion
The integration of Neon into the create-t3-app CLI tool is just the beginning. We believe that this enhancement will empower developers to build even more powerful applications with the tools they love. Whether you're already a fan of create-t3-app or just discovering it, we invite you to try out this new version and see how Neon can elevate your development experience.