{"id":42558,"library":"create-numz-app","title":"create-numz-app","description":"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.","status":"active","version":"1.0.4","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install create-numz-app","lang":"bash","label":"npm"},{"cmd":"yarn add create-numz-app","lang":"bash","label":"yarn"},{"cmd":"pnpm add create-numz-app","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Runtime dependency for the generated backend's database pool in db.js","package":"mysql2","optional":false},{"reason":"Runtime dependency for the generated backend server","package":"express","optional":false},{"reason":"Runtime dependency for the generated frontend","package":"react","optional":false},{"reason":"Runtime dependency for frontend routing in the generated App.jsx and page components","package":"react-router-dom","optional":false}],"imports":[{"note":"Do not install globally; the deprecated pattern pollutes global scope. Use npx to run the latest version.","wrong":"npm install -g create-numz-app && create-numz-app","symbol":"create-numz-app CLI","correct":"npx create-numz-app"},{"note":"The generated backend uses CommonJS (require/module.exports). Do not replace with ES module syntax unless you configure package.json with type:module.","wrong":"export default router;","symbol":"Generated backend API route (e.g., users.js)","correct":"import { Router } from 'express';\nconst router = Router();\n// ... routes\nmodule.exports = router;"},{"note":"The generated frontend uses default export for page components. Using named export may break lazy loading or router imports. Ensure consistency.","wrong":"export const Users = ({ data }) => { ... }","symbol":"Generated frontend React component","correct":"export default function Users({ data }) { ... }"}],"quickstart":{"code":"// 1. Run the CLI (no install needed)\nnpx create-numz-app\n\n// Provide inputs when prompted:\n// Project name: myapp\n// MySQL database name: mydb\n// Output directory: (press Enter for current folder)\n// Paste SQL (example):\nCREATE TABLE Users (\n  UserID   INT PRIMARY KEY AUTO_INCREMENT,\n  Username VARCHAR(100) NOT NULL,\n  Password VARCHAR(255) NOT NULL,\n  Role     VARCHAR(50)  DEFAULT 'staff'\n);\n\nCREATE TABLE Orders (\n  OrderID   INT PRIMARY KEY AUTO_INCREMENT,\n  UserID    INT NOT NULL,\n  Total     DECIMAL(10,2),\n  OrderDate DATE,\n  FOREIGN KEY (UserID) REFERENCES Users(UserID)\n);\n\n// 2. After generation:\ncd myapp/backend\nnpm install\n# Edit .env with your MySQL credentials\nnpm run dev  # starts backend on http://localhost:5000\n\ncd ../frontend\nnpm install\nnpm run dev  # starts frontend on http://localhost:5173\n\n// 3. The generated backend includes db.js (mysql2 pool), .env template, and route files.\n// The frontend includes Vite config with proxy to backend, React pages with forms and dropdowns for foreign keys.\n// Database must exist: mysql -u root -p -e \"CREATE DATABASE mydb;\"","lang":"javascript","description":"Runs the CLI without global install, generates backend and frontend from SQL CREATE TABLE statements, then starts both servers."},"warnings":[{"fix":"Add .env to .gitignore before git init, or use a vault service for secrets.","message":"The 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.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Always use the standard FOREIGN KEY constraint syntax in your SQL.","message":"Foreign 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.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Consider using React.lazy() for each page component.","message":"The 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.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"After generation, convert files to .ts or use @babel/preset-typescript for frontend; install ts-node for backend.","message":"The 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.","severity":"deprecated","affected_versions":">=1.0"},{"fix":"Add a start script: node server.js in backend/package.json.","message":"The 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.","severity":"gotcha","affected_versions":">=1.0"}],"env_vars":null,"search_vec":"'1.0.4':30 '18':92 '2025':34 'app':4 'applic':23 'april':33 'autom':38 'backend':18 'cadenc':37 'cli':88 'command':89 'complet':74 'config':44 'constraint':66 'creat':2,26 'create-numz-app':1 'creation':40 'crud':22 'differenti':61 'dom':81 'dropdown':59 'environ':83 'express':45 'express.js':17 'foreign':57,64 'foreign-key':56 'form':53 'frontend':21 'full':15 'full-stack':14 'generat':12,68 'get/post/put/delete':48 'input':54,71 'instanc':96 'javascript':97 'key':58,60,65 'last':31 'low':35 'mysql':42,95 'node':91 'numz':3 'output':72 'packag':6 'page':51 'pars':63 'pool':43 'project':75 'react':20,50,79 'react-router-dom':78 'relat':69 'releas':32,36 'requir':90 'rout':46 'router':80 'scaffold':9 'select':70 'singl':87 'sql':25 'stack':16 'statement':28 'tabl':27 'templat':84 'tool':10 'version':29 'vite':77","created_at":"2026-06-05T16:55:33.447803+00:00","updated_at":"2026-06-05T16:55:33.447803+00:00","problems":[{"fix":"Run 'npm install' in the backend directory.","cause":"Missing dependency in generated backend; npm install not run.","error":"Error: Cannot find module 'mysql2'"},{"fix":"Ensure all tables with FOREIGN KEY are defined earlier in the SQL input, or create them separately in the correct order.","cause":"MySQL schema requires referenced tables to exist; the SQL pasted must include all referenced tables.","error":"foreign key constraint fails"},{"fix":"Ensure all frontend files use ES module syntax (import/export) consistently. The generated files are already correct.","cause":"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).","error":"TypeError: (0 , react_router_dom__WEBPACK_IMPORTED_MODULE_1__.Link) is not a function"},{"fix":"Kill the existing process or change the port in backend/server.js and frontend/vite.config.js proxy accordingly.","cause":"Another process is running on the default backend port.","error":"Port 5000 is already in use"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"create-numz-app","openapi_spec":null,"status_page":null,"smithery":null,"categories":["productivity"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-05","next_check":"2026-09-03","install_tag":null}}