JCC Express

The Basics

ArtisanNode

Introduction

ArtisanNode (bun artisanNode ...) is the framework CLI, similar in spirit to Laravel's php artisan. Use it for generators, database workflows, queue workers, route inspection, scheduler tasks, and SSR helpers.


General

Bash
bun artisanNode list
bun artisanNode help [command]
bun artisanNode <command> --help
bun artisanNode tinker

tinker starts a REPL with the application container booted (providers, utils, global helpers, and services), similar to Laravel Tinker.


Make commands

Bash
bun artisanNode make:controller UsersController
bun artisanNode make:api-controller ApiUsersController
bun artisanNode make:model User
bun artisanNode make:model User mcr
bun artisanNode make:request UserRequest
bun artisanNode make:resource Post
bun artisanNode make:migration create_users_table
bun artisanNode make:seeder UserSeeder
bun artisanNode make:event UserRegistered
bun artisanNode make:listener SendWelcomeEmail
bun artisanNode make:queue-table
bun artisanNode make:monitor-table
bun artisanNode make:job ProcessPayment
bun artisanNode make:observer UserObserver
bun artisanNode make:policy UserPolicy
bun artisanNode make:command SendReport
bun artisanNode make:test UserTest

make:exception is not currently part of the built-in command list. Create custom exception classes manually and forward with throw or next(error) so the framework error handler can process them (see Error handling).


Database

Bash
bun artisanNode migrate
bun artisanNode migrate:rollback
bun artisanNode migrate:reset
bun artisanNode migrate:fresh
bun artisanNode db:seed
bun artisanNode db:wipe

Prisma

Bash
bun artisanNode prisma:generate
bun artisanNode prisma:migrate init
bun artisanNode prisma:deploy
bun artisanNode prisma:push
bun artisanNode prisma:studio

See Prisma for configuration.


TypeORM

make:model scaffolds TypeORM entities into app/Entities/ when DB_ORM=typeorm. Migrations use the TypeORM CLI — see TypeORM.


Dev server

Bash
bun artisanNode serve              # Laravel-style dev server with file watcher (entry: server.ts)
bun artisanNode serve app.ts       # use a different entry file
bun artisanNode watch              # alias of `serve`

serve (alias watch) is the recommended backend dev command. It:

  • watches backend paths (app/, route/, jcc-express-mvc/, resources/views/, etc.)
  • reloads silently on code changes (no terminal clear, no restart banner)
  • keeps the same PORT from .env across restarts
  • watches public/hot so the backend picks up Vite when the dev asset server starts

Run Vite separately for frontend assets:

Bash
# Terminal 1 — backend (file watcher + Express)
bun artisanNode serve

# Terminal 2 — frontend (Vite HMR, writes public/hot)
npm run watch

npm run dev (bun --watch server.ts) is a simpler alternative without the Laravel-style watcher. Prefer bun artisanNode serve when you want silent reloads, stable ports, and public/hot integration.


Queue, routes, build, schedule, SSR

Bash
bun artisanNode queue:work
bun artisanNode route:list
bun artisanNode build
bun artisanNode key:generate
bun artisanNode cache:clear        # alias: clear:cache
bun artisanNode inertia:start-ssr
bun artisanNode schedule:run
bun artisanNode schedule:list

Publish

publish copies a framework component's stub files into your app and wires it up (config, providers, routes). It is idempotent — re-run it safely; existing files are skipped unless you pass force=true.

Bash
bun artisanNode publish                       # list available publishables
bun artisanNode publish Monitor               # publish the Monitor component
bun artisanNode publish Monitor force=true    # overwrite existing files
bun artisanNode publish Cloudinary            # publish Cloudinary config + provider
bun artisanNode publish Cloudinary force=true # overwrite existing Cloudinary config

Some publishables take extra arguments. The Monitor publishable accepts a view stack — pick the one your app uses (default jsblade):

Bash
bun artisanNode publish Monitor               # jsBlade templates → resources/views/monitor/
bun artisanNode publish Monitor react         # React + Inertia    → resources/js/Pages/Monitor/
bun artisanNode publish Monitor vue           # Vue 3 + Inertia    → resources/js/Pages/Monitor/
bun artisanNode publish Monitor vue force=true  # view + force, in any order

See Monitor for details on each stack.

Cloudinary — wires config and the service provider so req.storeToCloudinary() works:

Bash
bun artisanNode publish Cloudinary

See Cloudinary for credentials and usage.


Custom commands

Custom commands live in app/Console/Command and are auto-discovered when they expose signature and handle.