create-quas-app 0.5.5
A basic Quick API Setup using Flask, intended for rapid project initiation.

# QUAS (Quick API Setup) CLI Tool

`create-quas-app` is a command-line tool that sets up a structured and scalable Flask API project boilerplate, designed for rapid project initiation.

This setup is ideal for developers looking to streamline the creation of Flask APIs, with built-in structure for routes, authentication, error handling, and database configurations.

## Table of Contents
- Features
- Installation
- Usage
- Project Structure
- Configuration
- Contributing
- License

## Features

- **Quick Project Setup:** Creates a boilerplate Flask API project with organized folders and essential configurations.

- **Standardized Structure:** Organized routes, controllers, models, and utilities.

- **Virtual Environment and Dependencies:** Automatically creates a virtual environment and installs dependencies from a requirements.txt.

- **Customizable Project Structure:** Provides a standardized, scalable layout for efficient development.

- **Cross-Platform Compatibility:** Works seamlessly across Windows, macOS, and Linux systems.

## Prerequisites
- Python 3.9+
- Git: Ensure Git is installed and accessible from your terminal.
- pip: The Python package manager should be installed.
- Virtualenv (optional but recommended)


## Installation
You can install create-quas-app from PyPI using pip:
```bash
pip install create-quas-app
```

## Usage
To create a new Flask API project, run the following command, replacing `<project_name>` with your desired project name:

```bash
create-quas-app <project_name>
```

### Example
```bash
create-quas-app my-new-api
```

#### This command will:

- Clone the QUAS boilerplate into a new folder named my-new-api.

- Set up environment variables in .env.example.

- Create a virtual environment in the project.

- Install all necessary dependencies listed in requirements.txt.

Once completed, the project will be ready for immediate development.

## Project Structure
The generated project has a consistent, organized structure, making it easier to maintain and scale. Hereâ€™s an example structure:

```
my-new-api/
â”œâ”€â”€ app/
â”‚   â”œâ”€â”€ __init__.py          # Initializes the Flask application
â”‚   â”œâ”€â”€ blueprints.py        # Registers app blueprints
â”‚   â”œâ”€â”€ core/                # Core logic, routes, and controllers
â”‚   â”‚   â”œâ”€â”€ api/
â”‚   â”‚   â””â”€â”€ cpanel/
â”‚   â”œâ”€â”€ models/              # Database models
â”‚   â”œâ”€â”€ static/              # Static assets (CSS, JavaScript, images)
â”‚   â”œâ”€â”€ templates/           # HTML templates
â”‚   â””â”€â”€ utils/
â”‚       â”œâ”€â”€ helpers/         # Helper functions
â”‚       â””â”€â”€ decorators/      # Common decorators
â”œâ”€â”€ .env.example             # Environment variable template
â”œâ”€â”€ config.py                # Configuration file
â”œâ”€â”€ requirements.txt         # Project dependencies
â”œâ”€â”€ README.md                # Project documentation
â””â”€â”€ run.py                   # Main entry point to run the application

```

### Example Output
After running `create-quas-app <project_name>`, youâ€™ll see output similar to:
```
------------------------- INFO -------------------------
Setting up project folder
--------------------------------------------------------

------------------------- INFO -------------------------
Creating Virtual environment
--------------------------------------------------------

------------------------- INFO -------------------------
Installing dependencies
--------------------------------------------------------

------------------------- INFO -------------------------
my-awesome-api created successfully!
--------------------------------------------------------
```

## Configuration
To set up environment variables:

1. Copy .env.example to .env.

2. Customize the values in .env as needed. Hereâ€™s an example:

    ```
    FLASK_APP=run.py
    FLASK_ENV=development
    DATABASE_URL=postgres://user:password@localhost/db_name
    SECRET_KEY=your_secret_key
    ```

    - **FLASK_APP:** Entry point for running the app.
    - **FLASK_ENV:** Environment mode (development, production).
    - **DATABASE_URL:** Database connection URL.
    - **SECRET_KEY:** Secret key for session management and security.

## Contributing
We welcome contributions! If youâ€™d like to contribute to `create-quas-app`, please follow these steps:

- Fork the repository.
- Create a new branch with a descriptive name.
- Make your changes and commit them with clear messages.
- Push to your branch and submit a pull request.
- For major changes, please open an issue to discuss what you would like to change.


## License
This project is licensed under the **MIT License**. See the LICENSE file for details.
***


### Additional Notes
- Troubleshooting: If you encounter any issues during installation or setup, please ensure you have the required dependencies installed (e.g., Python 3.9+, Git).
- Issues: Report bugs or suggest new features through the Issues page on GitHub.