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;"
Errors
Common errors & fixes
Error: Cannot find module 'mysql2'
Missing dependency in generated backend; npm install not run.
fixRun '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.
fixEnsure 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).
fixEnsure 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.
fixKill the existing process or change the port in backend/server.js and frontend/vite.config.js proxy accordingly.
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