create-benja-app
v1.1.1
Published
CLI scaffold for a React + Express + SQLite fullstack app with CRUD, reports, and optional role-based auth
Maintainers
Readme
create-fullstack-app
Interactive CLI scaffold for a React + Express + SQLite fullstack app — inspired by the SIMS project pattern.
Usage
npx create-fullstack-appOr install globally:
npm install -g create-fullstack-app
create-fullstack-appWhat it generates
The wizard asks you for:
| Step | What you provide |
|------|-----------------|
| Project name | Folder + app name |
| Database name | SQLite .db filename |
| Role-based auth? | Adds admin / user roles + JWT |
| Tables | Name, columns (name + type + required), actions (create / read / update / delete) |
Then it scaffolds:
my-app/
├── backend/
│ ├── src/
│ │ ├── app.js ← Express entry point
│ │ ├── config/db.js ← SQLite setup + CREATE TABLE
│ │ ├── controllers/ ← one file per table + auth + reports
│ │ ├── routes/ ← one file per table + auth + reports
│ │ └── middleware/auth.js ← JWT guard (if RBAC enabled)
│ ├── .env
│ └── package.json
├── frontend/
│ ├── src/
│ │ ├── api/client.js ← Axios instance (+ JWT interceptor if RBAC)
│ │ ├── components/
│ │ │ ├── Navbar.jsx
│ │ │ └── Modal.jsx
│ │ ├── pages/
│ │ │ ├── Login.jsx
│ │ │ ├── Register.jsx
│ │ │ ├── Dashboard.jsx ← summary cards
│ │ │ ├── <TableName>.jsx ← one page per table with form + table
│ │ │ └── Reports.jsx ← tabbed report view
│ │ └── App.jsx
│ ├── tailwind.config.js
│ └── package.json
└── schema.sql ← ready-to-run SQL for your DBStack
- Frontend: React 18 · Vite · Tailwind CSS · React Router · Axios
- Backend: Express 5 · SQLite3 · bcrypt · (jsonwebtoken if RBAC)
- Database: SQLite (file-based, zero setup)
Getting started after scaffold
# Terminal 1 — backend
cd my-app/backend
npm install
npm run dev
# Terminal 2 — frontend
cd my-app/frontend
npm install
npm run devOpen http://localhost:5173 — backend API on http://localhost:7000.
License
MIT
