{"id":29655807,"url":"https://github.com/mohamedashraf701/node-initdb","last_synced_at":"2025-07-22T08:06:04.472Z","repository":{"id":239076517,"uuid":"798434867","full_name":"MohamedAshraf701/node-initdb","owner":"MohamedAshraf701","description":"node-initdb is a CLI tool for initializing database configurations and structures in Node.js projects.","archived":false,"fork":false,"pushed_at":"2025-05-29T05:41:20.000Z","size":2377,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-09T10:19:04.163Z","etag":null,"topics":["expressjs","mongoose","nodejs","npmjs-packages","sequalize"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/node-initdb","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MohamedAshraf701.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-05-09T19:12:26.000Z","updated_at":"2025-05-29T05:41:23.000Z","dependencies_parsed_at":"2024-05-09T21:37:36.559Z","dependency_job_id":"a7191a47-7f52-419e-a7aa-15068a5a6608","html_url":"https://github.com/MohamedAshraf701/node-initdb","commit_stats":{"total_commits":19,"total_committers":3,"mean_commits":6.333333333333333,"dds":0.4736842105263158,"last_synced_commit":"6e3ff50ea6fe41f23dcbc302dcb8dd243eba9be9"},"previous_names":["mohamedashraf701/node-cli"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MohamedAshraf701/node-initdb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohamedAshraf701%2Fnode-initdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohamedAshraf701%2Fnode-initdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohamedAshraf701%2Fnode-initdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohamedAshraf701%2Fnode-initdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MohamedAshraf701","download_url":"https://codeload.github.com/MohamedAshraf701/node-initdb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohamedAshraf701%2Fnode-initdb/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266455207,"owners_count":23931357,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["expressjs","mongoose","nodejs","npmjs-packages","sequalize"],"created_at":"2025-07-22T08:06:03.771Z","updated_at":"2025-07-22T08:06:04.459Z","avatar_url":"https://github.com/MohamedAshraf701.png","language":"JavaScript","readme":"\n\u003cdiv align=\"left\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/fb911b79-9749-4edb-8aea-594262ef4365\" height=\"70\" width=\"70\" alt=\"ashraf704\" align=\"left\" style=\"vertical-align: middle; margin-right: 10px;\" /\u003e\n  \u003ch3\u003enode-initdb\u003c/h3\u003e\n  \u003cp\u003eCLI tool for initializing project configurations and structures in Node.js projects.\u003c/p\u003e\n\u003c/div\u003e\n\n---\n\nnode-initdb is a CLI tool for initializing project configurations and structures in Node.js projects. **It now requires you to select a database, a web framework, a language (JavaScript or TypeScript), and a package manager for the tool to work.** In addition to setting up your chosen database and framework, node-initdb now supports file upload functionality and JWT-based authentication.\n\n![Node InitDB Plugin Demo](https://github.com/user-attachments/assets/997d5cfc-5187-49e9-8c5b-713d5ea9d9cb)\n\n## Installation\n\nInstall node-initdb globally using npm:\n\n```bash\nnpm install -g node-initdb\n```\n\n## Usage\n\nNavigate to your project directory and run node-initdb with the appropriate options. **You must choose one option each for:**\n\n- **Database:**\n  - MongoDB: `--mongo` or `-m`\n  - Sequelize: `--seque` or `-s`\n\n- **Web Framework:**\n  - Express: `--express` or `-e`\n  - Fastify: `--fastify` or `-f`\n  - Elysia: `--elysia` or `-el`\n\n- **Language:**\n  - JavaScript: `--javascript` or `-j`\n  - TypeScript: `--typescript` or `-t`\n\n- **Package Manager:**\n  - Npm: `--npm` or `-n`\n  - Bun: `--bun` or `-b`\n  - Yarn: `--yarn` or `-ya`\n  - Pnpm: `--pnpm` or `-pn`\n\n**Important:** All four categories (database, framework, language, and package manager) are required. If any one is missing, node-initdb will not run.\n\nOptionally, you can add `--yes` (or `-y`) to skip interactive prompts and use default values.\n\n### Examples\n\n- **MongoDB, Express, and TypeScript with npm:**\n\n  ```bash\n  node-initdb --mongo --express --typescript --npm\n  # or shorthand:\n  node-initdb -m -e -t -n\n  ```\n\n- **Sequelize, Fastify, and JavaScript with bun:**\n\n  ```bash\n  node-initdb --seque --fastify --javascript --bun\n  # or shorthand:\n  node-initdb -s -f -j -b\n  ```\n\n- **Sequelize, Elysia, and JavaScript with yarn:**\n\n  ```bash\n  node-initdb --seque --elysia --javascript --yarn\n  # or shorthand:\n  node-initdb -s -el -j -ya\n  ```\n\n### Add Module Task\n\nTo add a new module using `node-add`, run:\n\n```bash\nnode-add \u003cmoduleName\u003e [options]\n```\n\nReplace `\u003cmoduleName\u003e` with your desired module name. Use the same options for database, framework, language, and package manager:\n\n- Database: `-m` / `--mongo`, `-s` / `--seque`\n- Framework: `-e` / `--express`, `-f` / `--fastify`, `-el` / `--elysia`\n- Language: `-j` / `--javascript`, `-t` / `--typescript`\n- Package Manager: `-n` / `--npm`, `-b` / `--bun`, `-ya` / `--yarn`, `-pn` / `--pnpm`\n\n#### Example\n\n```bash\nnode-add \"user\" -m -e -t\n```\n\n## Folder Structure\n\nAfter running node-initdb, your project will have the following structure:\n\n```\n- config/\n- Controllers/\n- Routes/\n- Models/\n- Middleware/\n- uploads/\n- Utils/\n```\n\n## Files Created\n\nnode-initdb creates essential files such as controllers, routes, models, configuration files, and middleware. In addition, the setup includes:\n\n- **File Upload:** Pre-configured file upload functionality.\n- **JWT Authentication:** Setup for JWT-based authentication.\n\n## Dependencies\n\nDepending on your chosen configuration, node-initdb installs the following dependencies:\n\n- **Database:**\n  - **MongoDB:** `mongoose`\n  - **Sequelize:** `sequelize`, `mysql2`\n- **Web Framework:**\n  - **Express:** `express`\n  - **Fastify:** `fastify`\n  - **Elysia:** `elysia`\n- **New Features:**\n  - **File Upload:** `multer`\n  - **JWT Authentication:** `jsonwebtoken`\n\n## Contributing\n\nContributions are welcome! Fork the repository, implement your changes, and submit a pull request. Please follow the existing coding style and guidelines.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Get in Touch\n\nFor questions or support, feel free to reach out:\n\n- **Email:** ashrafchauhan567@gmail.com\n- **GitHub:** [@MohamedAshraf701](https://github.com/MohamedAshraf701)\n\n## Support\n\nIf you find node-initdb useful, please consider supporting the project:\n\n\u003cp\u003e\n  \u003ca href=\"https://www.buymeacoffee.com/ashraf704\"\u003e\n    \u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" height=\"50\" width=\"210\" alt=\"ashraf704\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n","funding_links":["https://www.buymeacoffee.com/ashraf704"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohamedashraf701%2Fnode-initdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohamedashraf701%2Fnode-initdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohamedashraf701%2Fnode-initdb/lists"}