Create Stack Craft is a CLI tool to create projects with Express, Hono, and Prisma. This tool helps you quickly set up a new project with the desired framework, language, and Prisma integration.
- Create projects with Express or Hono.
- Choose between TypeScript or JavaScript.
- Optionally include Prisma for database management.
- Automatically set up the project structure and dependencies.
You can create a new project by running the following command with npm
:
npm create stack-craft@latest
Or with pnpm
:
pnpm create stack-craft@latest
You will be prompted to enter the following information:
- Project Name: Enter the name of your project.
- Framework: Choose between Express or Hono.
- Language: Choose between TypeScript or JavaScript.
- Include Prisma: Optionally include Prisma in your project.
- Run npm install: Optionally run
npm install
after setting up the project.
npm create stack-craft@latest
or
pnpm create stack-craft@latest
Follow the prompts to create your project. Once the setup is complete, navigate to your project directory and start the development server:
cd my-project
npm run dev
The generated project structure will look like this:
my-project/
├── prisma/
│ └── schema.prisma (if Prisma is included)
├── src/
│ ├── app.ts (or app.js)
│ └── routes/
│ └── index.ts (or index.js)
├── .env (if Prisma is included)
├── .env.example (if Prisma is included)
├── package.json
└── tsconfig.json (if TypeScript is selected)
The template files for different setups can be found in the Stack Craft Templates repository.
The generated package.json
will include the following scripts:
build
: Compile the TypeScript code (if TypeScript is selected).start
: Run the compiled code.lint
: Run ESLint on the project.db:generate
: Generate Prisma client (if Prisma is included).db:migrate
: Run Prisma migrations (if Prisma is included).db:push
: Push the Prisma schema to the database (if Prisma is included).db:studio
: Open Prisma Studio (if Prisma is included).
Contributions are welcome! Please open an issue or submit a pull request for any bugs or feature requests.
This project is licensed under the MIT License.