kodama.js
<p align="center"> <img src="config/kodama.webp" width="400" alt="Kodama Logo"> </p>
Kodama.js is a powerful Command-Line Interface (CLI) Tool designed to simplify the development of Node.js, Express.js, and Sequelize-based projects. With Kodama.js, you can quickly generate essential components like services, controllers, routes, and models, streamlining your workflow and reducing repetitive tasks.
To get started with Kodama.js, ensure you have Node.js installed on your system. Then, follow these steps to set up the tool:
-
Install Kodama.js directly from npm:
npm i -g kodama.js
Or clone the repository:
git clone https://github.com/barisatay0/kodama.js.git
-
Navigate to the project directory and install dependencies:
cd kodama.js npm install
-
Link the CLI globally using the
npm link
command:npm link
After running npm link
, the koda
command becomes globally available on your system, allowing you to generate API components anywhere.
Below is the structure of a typical Kodama.js project:
app.js # Application entry file
config # Configuration files
console # Console commands
package.json # Dependencies and project info
package-lock.json # Dependency lock file
src # Application's core code
sync.js # Database synchronization
Kodama.js is designed to boost productivity by automating repetitive tasks. Here are its main features:
- CLI Tool: Generate components quickly using simple terminal commands.
- Code Generator: Automatically creates controllers, services, models, and APIs.
- Node.js & Express.js Integration: Built to work seamlessly with Express.js and Sequelize for backend development.
- Saves time by reducing boilerplate code.
- Ensures consistent project structure.
- Simplifies API development with intuitive commands.
Kodama.js provides a variety of commands to make API development faster and easier:
-
Controller: Generate a new controller file:
koda create controller <controller_name>
-
Service: Generate a new service file:
koda create service <service_name>
-
Model: Generate a new model file:
koda create model <model_name>
-
API: Generate a controller, service, and model file all at once:
koda create api <api_name>
-
To create a controller named
UserController
:koda create controller User
-
To create an entire API for
User
:koda create api User
This will generate the following files:
UserController.js
UserService.js
UserModel.js
- Setup: Complete the setup process by following the Getting Started section.
-
Generate Components: Use
koda create
commands to generate the desired components (controller, service, model, or API). - Develop Faster: Use the generated boilerplate code as a foundation and focus on the core logic of your application.
We welcome contributions to Kodama.js! If you have ideas for improvements or want to fix bugs, feel free to:
- Fork the repository.
- Create a new branch for your changes.
- Submit a pull request with a detailed explanation of your updates.
Your contributions will help make Kodama.js even better for everyone!
This project is licensed under the MIT License. Feel free to use, modify, and distribute it as per the terms of the license.