Registry / productivity / create-numz-app

create-numz-app

JSON →
library1.0.4jsnpmunverified

This package is a scaffolding tool that generates a full-stack Express.js backend and React frontend CRUD application from SQL CREATE TABLE statements. Version 1.0.4 (last released April 2025, low release cadence) automates the creation of MySQL pool configs, Express routes with GET/POST/PUT/DELETE, and React pages with form inputs and foreign-key dropdowns. Key differentiator: it parses FOREIGN KEY constraints to generate relational select inputs, outputting a complete project with Vite, react-router-dom, and environment templates in a single CLI command. Requires Node >=18 and a MySQL instance.

npm install create-numz-app
INSTALL
IMPORT
SIG · CREATE-NUMZ-APP
C
create-numz-app
productivityjavascriptv1.0.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

create-numz-app CLI
✓ npx create-numz-app
✗ npm install -g create-numz-app && create-numz-app
Do not install globally; the deprecated pattern pollutes global scope. Use npx to run the latest version.
Generated backend API route (e.g., users.js)
✓ import { Router } from 'express'; const router = Router(); // ... routes module.exports = router;
✗ export default router;
The generated backend uses CommonJS (require/module.exports). Do not replace with ES module syntax unless you configure package.json with type:module.
Generated frontend React component
✓ export default function Users({ data }) { ... }
✗ export const Users = ({ data }) => { ... }
The generated frontend uses default export for page components. Using named export may break lazy loading or router imports. Ensure consistency.

Runs the CLI without global install, generates backend and frontend from SQL CREATE TABLE statements, then starts both servers.

// 1. Run the CLI (no install needed) npx create-numz-app // Provide inputs when prompted: // Project name: myapp // MySQL database name: mydb // Output directory: (press Enter for current folder) // Paste SQL (example): CREATE TABLE Users ( UserID INT PRIMARY KEY AUTO_INCREMENT, Username VARCHAR(100) NOT NULL, Password VARCHAR(255) NOT NULL, Role VARCHAR(50) DEFAULT 'staff' ); CREATE TABLE Orders ( OrderID INT PRIMARY KEY AUTO_INCREMENT, UserID INT NOT NULL, Total DECIMAL(10,2), OrderDate DATE, FOREIGN KEY (UserID) REFERENCES Users(UserID) ); // 2. After generation: cd myapp/backend npm install # Edit .env with your MySQL credentials npm run dev # starts backend on http://localhost:5000 cd ../frontend npm install npm run dev # starts frontend on http://localhost:5173 // 3. The generated backend includes db.js (mysql2 pool), .env template, and route files. // The frontend includes Vite config with proxy to backend, React pages with forms and dropdowns for foreign keys. // Database must exist: mysql -u root -p -e "CREATE DATABASE mydb;"
Debug
Known issues
gotchaThe generated .env file contains placeholder credentials—do not commit to version control with real secrets. Replace the .env.example or use environment variables in production.
fix
Add .env to .gitignore before git init, or use a vault service for secrets.
affects: >=1.0
gotchaForeign key detection relies on explicit FOREIGN KEY (col) REFERENCES table(col) syntax. Inline REFERENCES (e.g., col INT REFERENCES Table) is not parsed, so dropdowns will not be generated.
fix
Always use the standard FOREIGN KEY constraint syntax in your SQL.
affects: >=1.0
gotchaThe generated frontend uses full-page reloads; the react-router setup does not include lazy loading or code splitting. Larger apps may benefit from manual optimization.
fix
Consider using React.lazy() for each page component.
affects: >=1.0
deprecatedThe underlying Express project scaffolding does not include TypeScript support. All files are plain JavaScript (ES modules for frontend, CommonJS for backend). Migrating to TypeScript requires manual .ts conversion and tsconfig setup.
fix
After generation, convert files to .ts or use @babel/preset-typescript for frontend; install ts-node for backend.
affects: >=1.0
gotchaThe generated package.json for backend does not include a start script that runs the app in production mode. npm run dev uses nodemon, which is for development only.
fix
Add a start script: node server.js in backend/package.json.
affects: >=1.0
Errors
Common errors & fixes
Error: Cannot find module 'mysql2'
Missing dependency in generated backend; npm install not run.
fix
Run 'npm install' in the backend directory.
foreign key constraint fails
MySQL schema requires referenced tables to exist; the SQL pasted must include all referenced tables.
fix
Ensure all tables with FOREIGN KEY are defined earlier in the SQL input, or create them separately in the correct order.
TypeError: (0 , react_router_dom__WEBPACK_IMPORTED_MODULE_1__.Link) is not a function
Incorrect import of Link from react-router-dom in a component (likely using import { Link } from 'react-router-dom' instead of import { Link } from 'react-router-dom' — this error arises when mixing ES module and CommonJS imports).
fix
Ensure all frontend files use ES module syntax (import/export) consistently. The generated files are already correct.
Port 5000 is already in use
Another process is running on the default backend port.
fix
Kill the existing process or change the port in backend/server.js and frontend/vite.config.js proxy accordingly.
Upgrade
Version history
1.0.4latest on npm
Audit
Dependencies
mysql2requiredRuntime dependency for the generated backend's database pool in db.js
expressrequiredRuntime dependency for the generated backend server
reactrequiredRuntime dependency for the generated frontend
react-router-domrequiredRuntime dependency for frontend routing in the generated App.jsx and page components
Agent activity
21 hits · last 30 days
node
18
OpenAI (training)
1
Resources
create-numz-app — npm install create-numz-app · libregistry