πŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more β†’
Socket
DemoInstallSign in
Socket

@muhammadisa226/craftjs

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@muhammadisa226/craftjs

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

1.1.13
latest
Source
npm
Version published
Weekly downloads
363
-48.07%
Maintainers
1
Weekly downloads
Β 
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 @muhammadisa226/craftjs@latest

OR

npx @muhammadisa226/craftjs@latest 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/
β”œβ”€β”€ .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 20 May 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