1.0.5 β€’ Published 4 months ago

restquick v1.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

RestQuick

RestQuick Logo

RestQuick is a CLI tool to quickly generate REST API starter templates for various frameworks, including Node.js and Django. It simplifies project scaffolding, allowing developers to start building APIs without wasting time setting up the base structure and include jwt authentication.

✨ Features

  • Multiple Frameworks Supported:
    • Hono REST API (TypeScript)
    • Encore TS (TypeScript)
    • Express.js (TypeScript)
    • NestJS (TypeScript)
    • Django REST Framework
  • Interactive Command-Line Interface using Inquirer.js.
  • Project Name Validation: Prevents overwriting existing directories.
  • Scaffold Projects Quickly with pre-configured setups.

πŸš€ Installation

npm install -g restquick

This will make restquick available globally on your system.

πŸ› οΈ Usage

Initialize a New Project

Run the following command to start generating a project:

restquick init

instanly generate using npx / pnpx

npx restquick init 
pnpx restquick init

Follow the prompts to: 1. Select your desired template. 2. Enter the name of your project.

Example Workflow

  1. Prompt 1: Choose a Template
    Choose Template
  1. Prompt 2: Enter Project Name
    If a folder with the entered name already exists, the CLI will prompt you to re-enter the name.

  2. Output:

    • The selected template is cloned into the specified directory.
    • Instructions for installing dependencies and starting development are displayed.

Commands

init

Initialize a new project from a predefined template.

 npx restquick init

Options

  • No options are currently available. The CLI is fully interactive.

🌐 Templates Available

FrameworkLanguageRepository
Hono REST APITypeScripthono-jwt-template
Encore TSTypeScriptencore-ts-auth
Express.jsTypeScripttypeExpress-jwt-template
NestJSTypeScriptnest-jwt-template
Django REST FrameworkPythondjango-rest-template

πŸ“‚ Project Structure (Example)

When you clone a template, the directory structure looks like this (e.g., Express.js template):

project-name/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ module/
        β”œβ”€β”€auth/
            β”œβ”€β”€controller.ts
            β”œβ”€β”€service.ts
β”‚   β”œβ”€β”€ utils/
    β”œβ”€β”€ types/
    β”œβ”€β”€ middlewares/
    β”œβ”€β”€ routers.ts
    └── index.ts
β”œβ”€β”€ package.json
β”œβ”€β”€ tsconfig.json
└── README.md

βš™οΈ Requirements

  • Node.js (v14 or higher)
  • npm (v6 or higher)

πŸ”— Links

πŸ‘¨β€πŸ’» Contributing

  1. Fork the repository.
  2. Create a new branch for your feature (git checkout -b feature-name).
  3. Commit changes (git commit -m 'Add some feature').
  4. Push to the branch (git push origin feature-name).
  5. Open a pull request.

πŸ›‘οΈ License

This project is licensed under the MIT License.

πŸ’¬ Feedback

If you encounter any issues or have suggestions, please open an issue or contact me at denisetiya009@gmail.com.


Made with ❀️ by Deni Setiya.