Skip to content

Scaffold production-ready REST APIs in seconds — Express, Fastify, or Hono

License

Notifications You must be signed in to change notification settings

554960/create-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

create-api

Scaffold production-ready REST APIs in seconds. Express, Fastify, or Hono — your choice.

npx create-api my-api

demo


Features

  • Multiple frameworks — Express, Fastify, Hono
  • 📦 TypeScript ready — Full type support out of the box
  • 🔐 Auth included — JWT authentication setup
  • 🗄️ Database options — Prisma, Drizzle, or none
  • 🧪 Testing setup — Vitest configured
  • 📝 API docs — Swagger/OpenAPI ready
  • 🐳 Docker — Dockerfile & docker-compose included
  • 🚀 Production ready — ESLint, Prettier, Husky

Usage

Interactive mode

npx create-api

With project name

npx create-api my-api

With flags (skip prompts)

npx create-api my-api --framework express --typescript --auth --db prisma

Options

Flag Description Choices
--framework Backend framework express, fastify, hono
--typescript Use TypeScript
--auth Include JWT auth
--db Database ORM prisma, drizzle, none
--docker Include Docker files
--git Initialize git repo
--install Install dependencies

Generated Structure

my-api/
├── src/
│   ├── routes/
│   │   ├── index.ts
│   │   └── auth.ts
│   ├── middleware/
│   │   └── auth.ts
│   ├── utils/
│   │   └── response.ts
│   └── index.ts
├── prisma/
│   └── schema.prisma
├── tests/
│   └── api.test.ts
├── .env.example
├── .gitignore
├── Dockerfile
├── docker-compose.yml
├── package.json
├── tsconfig.json
└── README.md

Templates

Express + TypeScript + Prisma

npx create-api my-api -f express -t -d prisma

Fastify + Drizzle

npx create-api my-api -f fastify -t -d drizzle

Hono (minimal)

npx create-api my-api -f hono -t

After scaffolding

cd my-api
npm run dev     # Start development server
npm run build   # Build for production
npm run test    # Run tests

License

MIT


built by @sharey1332

About

Scaffold production-ready REST APIs in seconds — Express, Fastify, or Hono

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published