Socket
Book a DemoInstallSign in
Socket

create-craftjs

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-craftjs

A starter kit backend framework powered by Express, TypeScript, EJS Engine, and Prisma — designed for rapid development, simplicity, and scalability.

latest
Source
npmnpm
Version
1.0.8
Version published
Maintainers
1
Created
Source

CraftJS

A starter kit backend framework powered by Express, TypeScript, EJS Engine, and Prisma — designed for rapid development, simplicity, and scalability.

Features

  • Express.js based API architecture
  • TypeScript support out of the box
  • Prisma ORM with scalable database structure
  • CLI tool (craft) for project automation
  • Built-in Logger, Validation, Error handler, and Request lifecycle
  • Predefined project structure for fast onboarding

💡 Note: EJS View Engine is included but disabled by default. To enable it: Open src/application/web.ts and uncomment the following lines:

import expressLayouts from "express-ejs-layouts";
import path from "path";

web.set("view engine", "ejs");
web.set("views", path.join(\_\_dirname, "..", "views"));
web.use(expressLayouts);
web.set("layout", "layouts/main");

Then, go to src/routes/main-route.ts and uncomment this:

mainRouter.get("/", (req, res) => {
res.render("index", { title: "Home Page" });
});

Getting Started

Scaffold a New Project

npx create-craftjs  my-app

OR

npm init craftjs my-app

Go to project folder

cd my-app

Run Craft Setup

npm install
node craft key:generate
node craft generate
node craft db:migrate
node craft dev

Available Craft Commands

node craft help

Project Structure

my-app/
├── craft/
├── src/
│   ├── apidocs/
│   ├── config/
│   ├── controllers/
│   ├── middleware/
│   ├── repositories/
│   ├── dtos/
│   ├── routes/
│   └── services/
│   └── types/
│   └── utils/
│   └── validations/
│   └── main.ts
├── test/
├── logs/
├── docker-compose.yml
├── Dockerfile
├── .env
├── .env.example
├── prisma/
├── .gitignore
├── babel.config.json
├── craft.js
├── nodemon.json
├── package.json
├── package-lock.json
└── tsconfig.json

Scripts

CommandDescription
craft startStart production server
craft devRun in development mode
craft buildBuild for production
craft testRun Jest tests
craft db:generateGenerate Prisma client
craft db:migrateRun Prisma migrations
craft db:resetRun Prisma migrations refresh
craft key:generateGenerate secret keys
craft make:controllerMake Controller File
craft make:commandMake Command File
craft make:middlewareMake Middleware File
craft make:repositoryMake repository File
craft make:dtoMake Data Transfer Object File
craft make:routeMake Route File
craft make:serviceMake Service File
craft make:testMake Test case
craft make:utilsMake Utils
craft make:validationMake Validation
craft make:viewMake View

Made by @muhammadisa-n

Keywords

express

FAQs

Package last updated on 02 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.