rapid-node-stack
v1.0.1
Published
A CLI scaffolding tool for Node.js projects with TypeScript, Express, Drizzle ORM, and more.
Readme
rapid-node-stack
A CLI scaffolding tool for Node.js projects with TypeScript, Express, Drizzle ORM, and more.
Installation
npm install -g rapid-node-stackUsage
Interactive mode
node-setupWith project name
node-setup my-apiWhat's Included
- Express with TypeScript
- Drizzle ORM for PostgreSQL
- JWT Authentication (access & refresh tokens)
- Rate Limiting with express-rate-limit
- Helmet for security headers
- CORS configuration
- Morgan for logging
- Zod for validation
- Cookie Parser
- Multer for file uploads
- Node Cron for job scheduling
- Telegraf for Telegram bot integration
Project Structure
my-api/
├── src/
│ ├── config/ # Environment, CORS, rate limit config
│ ├── controllers/ # Route handlers
│ ├── db/ # Database connection, schemas, migrations
│ ├── jobs/ # Scheduled tasks
│ ├── lib/ # Utilities, JWT, password helpers
│ ├── middlewares/ # Auth, error handling, 404
│ ├── routes/ # API routes
│ ├── schemas/ # Zod validation schemas
│ ├── services/ # Business logic
│ ├── app.ts # Express app setup
│ └── server.ts # Server entry point
├── .env # Environment variables
├── .env.example # Environment template
├── drizzle.config.ts # Drizzle ORM config
├── package.json
└── tsconfig.jsonScripts
| Command | Description |
|---------|-------------|
| npm run dev | Start dev server with tsx watch |
| npm run build | Compile TypeScript |
| npm start | Run compiled server |
| npm run db:migrate | Run database migrations |
| npm run db:studio | Open Drizzle Studio |
Environment Variables
Copy .env.example to .env and configure:
PORT=3000
NODE_ENV=development
DATABASE_URL=postgresql://...
JWT_ACCESS_SECRET=your-secret
JWT_REFRESH_SECRET=your-secretLicense
MIT
