Introduction
StartXKit is a TypeScript CLI toolkit for creating backend projects with clear framework and architecture choices.
StartXKit helps you create a backend project without deciding every folder, script, and starter file by hand.
It is similar in spirit to create-vite, but focused on backend APIs. You choose a framework, an architecture, and a few optional features. StartXKit writes a working TypeScript project that you can run, extend, and inspect.
What StartXKit Generates
- A TypeScript backend project with
package.json,tsconfig.json, andstartxkit.config.json - A working health endpoint
- Framework-specific server setup for Express, Fastify, or Hono
- One of three architecture layouts: minimal, modular, or layered
- Optional CORS, env config, Zod validation, Pino logging, error handling, Vitest, and Docker
- A project CLI for adding modules after the project is created
The Big Picture
create command
|
v
choose framework + architecture + features
|
v
generated project
|
+-- run the API
+-- add modules
+-- inspect config with doctor/infoFramework Choices
| Framework | Best fit |
|---|---|
| Express | Familiar Node.js APIs, middleware-heavy apps, broad ecosystem |
| Fastify | High-throughput APIs, plugin-based organization, built-in logger support |
| Hono | Small, fast APIs with a clean router model and lightweight runtime footprint |
Architecture Choices
| Architecture | Layout style | Best fit |
|---|---|---|
| Minimal | Flat route files | Prototypes, small APIs, simple services |
| Modular | src/modules/users/... | Feature-based APIs where each module owns its files |
| Layered | src/routes, src/controllers, src/services, ... | Larger APIs that need strict separation by responsibility |
First Command
npm create @startxkit@latestAfter generation:
cd my-api
pnpm devThen open the health endpoint. With the default prefix, it is:
http://localhost:4000/api/v1/healthWhat To Read Next
- Start with Getting Started if you are creating your first project.
- Read add module when you want to add
users,auth,products, or another feature. - Read the architecture pages if you are choosing between minimal, modular, and layered.