Skip to content

LeonardM01/startex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

startex

A simple CLI tool to scaffold a new Express.js project from a template, similar to create-next-app.

Features

  • Interactive prompts for better user experience: language choice (TypeScript/JavaScript), then database preference
  • Choose between JavaScript and TypeScript templates
  • Optional Prisma database templates with MySQL, PostgreSQL, and MongoDB support
  • Automatic package installation with package manager detection
  • Automatic Prisma client generation for database templates
  • Copies a template project to a new directory
  • Prompts for project name and updates package.json
  • Optionally initializes a git repository
  • Automatic Dockerfile for deployment and a Github actions workflow file that deploys the server

Usage

npx startex my-app

You will be prompted for:

  • Project name (used to update the new project's package.json)
  • Language choice (TypeScript or JavaScript)
  • Database preference (whether to include Prisma ORM)
  • Database type (MySQL, PostgreSQL, or MongoDB - if database is selected)
  • Initialize a git repository (yes/no)
  • Install packages (yes/no)

Important!

When executed, make sure you update the workflow file and change the envs that hold the data used when deploying.




Templates

The CLI includes multiple template options:

Basic Templates

TypeScript Template

  • Full TypeScript setup with type definitions
  • TypeScript compilation with tsc
  • Type-safe Express.js configuration
  • Development with ts-node and nodemon
  • Production build process

JavaScript Template

  • Modern ES modules (ESM) setup
  • Direct Node.js execution
  • Simplified development workflow
  • No build step required for deployment

Prisma Database Templates

TypeScript/JavaScript + Prisma Templates

  • MySQL
  • PostgreSQL
  • MongoDB

Prisma templates include:

  • Type-safe database queries with Prisma ORM
  • Pre-configured database schemas (User/Post models)
  • Database migration and seeding scripts
  • CRUD API endpoints examples
  • Database connection management
  • Automatic Prisma client generation during setup
  • Type-safe Express.js configuration
  • Development with ts-node and nodemon
  • Production build process

🚀 Project Roadmap


Phase 1: Foundational Flexibility

●
│
├─  ✅Done -> Tech Stack Selection (TS/JS)
│
└─ 📚 Automated API Documentation (Swagger/OpenAPI)

Phase 2: Architecture & Data Layer

●
│
├─ ✅Done -> Advanced Database Initialization (ORMs)
│
└─ 🎨 Expanded Template Library (REST, GraphQL)

Phase 3: Enhanced User Experience

●
│
└─ 💬 Advanced Project Scaffolding (Prompts)

Have a feature request? Open an issue or contribute!

License

MIT

About

A npm package for templating Express.js server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors