create-syntaxility-express-app
v1.0.4
Published
CLI tool to create a preconfigured Express.js backend with Prisma setup
Maintainers
Readme
SyntaxilitY Express App CLI
Overview
SyntaxilitY Express App is a command-line interface (CLI) tool designed to quickly scaffold a complete Express.js backend project with a clean, modular architecture. It automates the setup of Prisma ORM, PostgreSQL, Neon database configuration, and essential project structure — saving valuable development time and ensuring best practices out of the box.
The CLI eliminates repetitive configuration tasks by automatically setting up dependencies, initializing Prisma, preparing environment variables, and optionally creating a Git repository.
Features
- Automated Express.js project generation
- Modular MVC architecture (controllers, services, routes, middlewares)
- Integrated Prisma ORM with PostgreSQL
- Environment variable configuration via
.env - Optional Neon PostgreSQL database setup
- Dependency installation automation
- Optional Prisma migration initialization
- Optional Git repository setup
- Automatic rollback and cleanup on setup interruption or failure
- Compatible with
npxand global npm installation
Installation
Create a new project using npx:
npx create-syntaxility-express-app@latest my-projectOr install globally:
npm install -g create-syntaxility-express-app
create-syntaxility-express-app my-projectUsage
When the CLI starts, follow the interactive prompts:
- Enter your project name.
- (Optional) Open Neon PostgreSQL in your browser to create a new database.
- Paste your PostgreSQL connection string when prompted.
- Wait for automatic dependency installation.
- (Optional) Initialize Prisma migrations.
- (Optional) Initialize a Git repository.
After setup completes:
cd my-project
npm run devYour Express server will start, and your backend is ready to use.
Environment Configuration
The .env file will be automatically generated with the following structure:
DATABASE_URL="postgresql://user:password@host:port/dbname?sslmode=require"
PORT=3000Architecture Overview
| Layer | Description | | ----------------- | ---------------------------------------------------- | | Controllers | Handle incoming HTTP requests and responses | | Routes | Define API endpoints | | Middlewares | Manage validation, authentication, and preprocessing | | Services | Contain business logic and processing | | Helpers/Utils | Provide reusable utility and formatting functions | | Prisma ORM | Database modeling, querying, and migrations |
Technology Stack
| Component | Technology | | --------------- | ------------- | | Runtime | Node.js (ESM) | | Framework | Express.js | | ORM | Prisma | | Database | PostgreSQL | | Hosting Option | Neon.tech | | Package Manager | NPM | | Version Control | Git |
Error Handling and Rollback
If the setup process fails or is manually interrupted, the CLI automatically performs a cleanup by removing any partially created directories or configurations to ensure a consistent environment.
Internal CLI Commands
| Step | Command | Purpose |
| ----------------------- | --------------------------------------------------------- | -------------------------------------- |
| Dependency Installation | npm install | Installs required project dependencies |
| Prisma Initialization | npx prisma migrate dev | Runs initial database migrations |
| Git Setup | git init && git add . && git commit -m "Initial commit" | Initializes Git repository |
API Documentation
The API documentation is available at
https://elements.getpostman.com/redirect?entityId=40739355-6448cec4-d532-4259-a921-edde8a7a0deb&entityType=collectionDeveloped By
Tariq Mehmood Senior Full Stack Developer & AI Engineer SyntaxilitY Innovations Delivering scalable, efficient, and modern software solutions.
License
This project is licensed under the MIT License. You are free to use, modify, and distribute this software under open-source terms.
