Intelligent TanStack Solid Start project scaffolding tool
npm install @any-l/create-solid-app> π Modern TanStack Solid Start project scaffolding tool
English | δΈζ
Using Bun (recommended):
``bash`
bunx @any-l/create-solid-app my-project
Using npm:
`bash`
npx @any-l/create-solid-app my-project
- π¨ Interactive Configuration - Customize project features based on your needs
- β‘ Multiple Templates - Minimal, TanStack Router examples, Full-stack, Admin, Landing page
- π οΈ Optional Feature Modules - Database, Authentication, Docker, CI/CD, Testing
- π¦ Smart Dependency Management - Install only necessary dependencies
- π Automated Configuration - One-click generation of complete project structure
- Basic TanStack Solid Start configuration
- TypeScript + Tailwind CSS
- Development tooling setup
- Minimal TanStack Router example with basic routing
- Essential routing components (Counter, About page)
- Perfect for learning TanStack Router fundamentals
- TypeScript support
- Comprehensive TanStack Router example
- Advanced routing features (nested layouts, API routes)
- Route loaders, error boundaries, and middleware
- TypeScript + Tailwind CSS
- Complete routing showcase
- Complete full-stack application framework
- Database integration (Drizzle ORM)
- API routes and middleware
- User authentication system
- Modern admin interface
- Data tables and form components
- Permission management system
- Dashboard layout
- Marketing-oriented page structure
- SEO optimization configuration
- Responsive design
- Performance optimization
- ποΈ Database - Drizzle ORM + SQLite/PostgreSQL
- π User Authentication - Auth.js integration
- π³ Docker - Containerized deployment configuration
- βοΈ CI/CD - GitHub Actions workflow
- π§ͺ Testing - Vitest testing framework
- π Monitoring - Performance and error monitoring
`bashCreate project
bunx @any-l/create-solid-app my-awesome-app
π Generated Project Structure
`
my-awesome-app/
βββ src/
β βββ components/ # Reusable components
β βββ routes/ # Page routes
β βββ lib/ # Utility libraries
β βββ styles/ # Style files
βββ public/ # Static assets
βββ drizzle/ # Database related (optional)
βββ docker/ # Docker configuration (optional)
βββ .github/ # CI/CD workflow (optional)
βββ package.json
`π οΈ Development Commands
The generated project includes the following commands:
`bash
bun run dev # Start development server
bun run build # Build production version
bun run start # Start production server
bun run test # Run tests
bun run lint # Code linting
`π System Requirements
- Node.js >= 18.0.0
- Bun >= 1.0.0 (recommended) or npm >= 8.0.0
ποΈ Technical Architecture
$3
This scaffolding adopts a Bun as package manager + Node.js as runtime hybrid architecture for the following reasons:
#### β
Bun Advantages (Package Management)
- π Ultra-fast Installation: 10-20 times faster than npm/yarn
- π¦ Great Compatibility: Fully compatible with npm ecosystem
- π§ Built-in Tools: Integrated bundler, test runner, and package manager
#### β
Node.js Necessity (Runtime)
- ποΈ Official Support: TanStack Start is officially designed based on Node.js
- π API Compatibility: Depends on Node.js-specific APIs and features
- π‘οΈ Stable and Reliable: Best choice for production environment
> Important Note: According to Bun official documentation, TanStack Start currently depends on some Node.js APIs that Bun has not yet implemented. Therefore, we use Bun to initialize projects and install dependencies, but use Node.js to run the development server.
$3
If you choose the database feature, the scaffolding will automatically configure Drizzle ORM:
`bash
Install Drizzle ORM (runtime)
bun add drizzle-ormInstall Drizzle Kit (development tool)
bun add -D drizzle-kit
`This leverages both Bun's fast installation advantages and ensures perfect compatibility with TanStack Start.
$3
`bash
1. Use Bun for fast dependency installation
bun install2. Use Node.js to run development server (via Vite)
bun run dev # This actually runs vite dev (using Node.js)3. Use Bun to add new dependencies
bun add some-package4. Use Node.js to build production version
bun run build # This actually runs vite build (using Node.js)
`π§ Configuration
The scaffolding automatically generates the following configuration files:
-
tailwind.config.mjs - Tailwind CSS configuration
- tsconfig.json - TypeScript configuration
- vite.config.ts - Vite build configuration
- .env.example - Environment variables template
- drizzle.config.ts - Database configuration (if selected)
- package.json - Uses standard Vite commands, compatible with Node.js runtimeπ‘ Best Practices
$3
1. Use Bun for dependency management:
`bash
bun add package-name # Add dependency
bun remove package-name # Remove dependency
bun update # Update all dependencies
`2. Use standard commands for development:
`bash
bun run dev # Development server (uses Node.js + Vite underneath)
bun run build # Production build (uses Node.js + Vite underneath)
`3. Database development (if database feature is selected):
`bash
bun run db:generate # Generate migration files
bun run db:migrate # Apply migrations
bun run db:studio # Open database management interface
`$3
Q: Why not use Bun directly to run TanStack Start?
A: TanStack Start depends on some Node.js APIs that Bun hasn't fully implemented yet. Following Bun's official recommendation, we use Bun for dependency management (faster) and Node.js for running the application (more stable).
Q: How to deploy in production environment?
A: Production deployment is recommended with Node.js. The build command
bun run build generates Node.js-compatible artifacts that can be deployed directly to any Node.js-supporting environment.Q: Can I use npm exclusively?
A: Absolutely! All commands are compatible with npm:
`bash
npx @any-l/create-solid-app my-project
cd my-project
npm install
npm run dev
`Q: Why choose Node.js over Bun for Vite?
A: Although Bun has its own bundler, Vite has better plugin support and stability in the SolidJS ecosystem. Our strategy is "use Bun for package management, use Vite for building", taking full advantage of both.
π€ Contributing
Welcome to submit Issues and Pull Requests!
π License
MIT License
π Version History
$3
- β
New Templates: Added TanStack Router bare and basic examples
- β
Official Examples: Direct integration from TanStack Router repository
- β
Enhanced Templates: start-bare for learning, start-basic for production
- β
Smart Prompts: Automatic feature detection for Router templates
$3
- β
Fixed Core Issues: Redesigned based on TanStack Start official documentation
- β
Bun + Node.js Architecture: Best balance of performance and compatibility
- β
Dependency Fixes: Added missing
@tanstack/solid-router`β οΈ v2.x versions have configuration issues, strongly recommend upgrading to v3.0.0
- π CHANGELOG.md - Detailed update log
- π MIGRATION-V3.md - v3.0.0 migration guide
- π TanStack Start Documentation
- β‘ Bun Ecosystem Guide
---
π Start building your next Solid application!