{"_id":"@bodheesh/create-bodhi-node-app","name":"@bodheesh/create-bodhi-node-app","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@bodheesh/create-bodhi-node-app","version":"1.0.0","description":"Create a production-ready Node.js REST API with zero configuration","main":"index.js","bin":{"create-bodhi-node-app":"bin/create-bodhi-node-app.js"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["node","express","mongodb","rest-api","boilerplate","starter","generator","cli","bodhi","create-node-app"],"author":{"name":"Bodhi Team"},"license":"MIT","dependencies":{"chalk":"^4.1.2"},"engines":{"node":">=14.0.0"},"_id":"@bodheesh/create-bodhi-node-app@1.0.0","_nodeVersion":"18.17.1","_npmVersion":"10.9.0","dist":{"integrity":"sha512-3KzoTwsYUFsG1wDf1DAOWwYRZKy0Htb05KLzDuMJWbaEy2RpPB0T1qYTVULpnMIADCgxfJs89YVzY1CQPspCnA==","shasum":"7f32cc107036a949a0a196b9978f68b96158c455","tarball":"https://registry.npmjs.org/@bodheesh/create-bodhi-node-app/-/create-bodhi-node-app-1.0.0.tgz","fileCount":38,"unpackedSize":379814,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDLQcQ7rrM2UU0QzmP5qI6LXWiCF2iwLsPynblnG/edCAiEAl6yVghZs5wzAW98m0th9YinCzZVnv9y8J1Sny4DmXRE="}]},"_npmUser":{"name":"bodheesh","email":"vcbodheesh@gmail.com"},"directories":{},"maintainers":[{"name":"bodheesh","email":"vcbodheesh@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/create-bodhi-node-app_1.0.0_1738577700989_0.3724033113646752"},"_hasShrinkwrap":false}},"time":{"created":"2025-02-03T10:15:00.878Z","1.0.0":"2025-02-03T10:15:01.181Z","modified":"2025-02-03T10:15:01.434Z"},"maintainers":[{"name":"bodheesh","email":"vcbodheesh@gmail.com"}],"description":"Create a production-ready Node.js REST API with zero configuration","keywords":["node","express","mongodb","rest-api","boilerplate","starter","generator","cli","bodhi","create-node-app"],"author":{"name":"Bodhi Team"},"license":"MIT","readme":"# @bodhi/crud-api-generator\n\nA powerful CLI tool that generates Express.js REST APIs or GraphQL endpoints from a simple JSON schema.\n\n## Features\n\n- 🚀 Instant API generation from JSON schema\n- 💾 Support for MongoDB, PostgreSQL, and Firebase\n- 🔄 Auto-generated CRUD operations\n- 📚 Swagger documentation generation\n- ⚡ GraphQL support\n- 🎯 Clean and maintainable code generation\n\n## Installation\n\n```bash\nnpm install -g @bodhi/crud-api-generator\n```\n\n## Usage\n\n1. Create a JSON schema file (e.g., `schema.json`):\n\n```json\n{\n  \"name\": \"User\",\n  \"fields\": {\n    \"name\": {\n      \"type\": \"String\",\n      \"required\": true\n    },\n    \"email\": {\n      \"type\": \"String\",\n      \"required\": true,\n      \"unique\": true\n    },\n    \"age\": {\n      \"type\": \"Number\"\n    }\n  }\n}\n```\n\n2. Generate the API:\n\n```bash\nbodhi-crud generate -s schema.json -d mongodb -t rest\n```\n\nOptions:\n- `-s, --schema`: Path to JSON schema file (required)\n- `-d, --database`: Database type (mongodb, postgres, firebase) (default: mongodb)\n- `-t, --type`: API type (rest, graphql) (default: rest)\n- `-o, --output`: Output directory (default: ./generated)\n\n## Generated Structure\n\nThe tool will generate the following files:\n\n```\ngenerated/\n├── models/\n│   └── user.model.js\n├── controllers/\n│   └── user.controller.js\n├── routes/\n│   └── user.routes.js\n└── swagger.json\n```\n\n## Database Support\n\n### MongoDB\n- Uses Mongoose for schema definition and validation\n- Generates complete CRUD operations\n- Includes pagination and filtering\n\n### PostgreSQL (Coming Soon)\n- Sequelize ORM integration\n- Migration generation\n- Complex queries support\n\n### Firebase (Coming Soon)\n- Firestore integration\n- Real-time updates\n- Security rules generation\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nMIT\n\n\n\n📦 rest-api\n ┣ 📂 src\n ┃ ┣ 📂 config\n ┃ ┃ ┣ 📄 index.js           # Central configuration\n ┃ ┃ ┗ 📄 swagger.js         # Swagger/OpenAPI configuration\n ┃ ┣ 📂 controllers\n ┃ ┃ ┣ 📂 auth\n ┃ ┃ ┃ ┗ 📄 auth.controller.js  # Authentication controller\n ┃ ┃ ┗ 📂 user\n ┃ ┃   ┗ 📄 user.controller.js  # User management controller\n ┃ ┣ 📂 middleware\n ┃ ┃ ┣ 📄 error.middleware.js   # Global error handler\n ┃ ┃ ┗ 📂 validation\n ┃ ┃   ┣ 📄 auth.middleware.js  # JWT authentication\n ┃ ┃   ┣ 📄 auth.validation.js  # Auth input validation\n ┃ ┃   ┣ 📄 role.middleware.js  # Role-based access control\n ┃ ┃   ┗ 📄 user.validation.js  # User input validation\n ┃ ┣ 📂 models\n ┃ ┃ ┗ 📄 user.model.js         # User model schema\n ┃ ┣ 📂 routes\n ┃ ┃ ┣ 📂 auth\n ┃ ┃ ┃ ┗ 📄 auth.routes.js      # Auth routes\n ┃ ┃ ┗ 📂 user\n ┃ ┃   ┗ 📄 user.routes.js      # User routes\n ┃ ┣ 📂 utils\n ┃ ┃ ┣ 📄 db.util.js           # Database utilities\n ┃ ┃ ┣ 📄 error.util.js        # Error classes\n ┃ ┃ ┣ 📄 logger.util.js       # Logging utility\n ┃ ┃ ┗ 📄 response.util.js     # Response formatter\n ┃ ┗ 📄 index.js               # Application entry point\n ┣ 📂 logs                     # Log files directory\n ┣ 📄 .env.example             # Environment variables example\n ┣ 📄 .gitignore              # Git ignore file\n ┣ 📄 package.json            # Project dependencies\n ┗ 📄 README.md               # Project documentation","readmeFilename":"README.md"}