Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
00d7817
feat: implement v1.0.0 readiness plan
yss-ef Jun 1, 2026
20bdc35
fix: resolve test failures and add missing yaml import
yss-ef Jun 1, 2026
abfbd58
feat: add MongoDB support to init and deploy commands
yss-ef Jun 1, 2026
d3148e8
feat: implement full NestJS support across all CLI commands
yss-ef Jun 1, 2026
4a07002
feat: implement NodeJS/Express support across CLI
yss-ef Jun 1, 2026
eae10c8
feat: implement ReactJS (Vite + TS) support across CLI
yss-ef Jun 1, 2026
52f1231
feat: implement NextJS support across CLI
yss-ef Jun 1, 2026
aed3b16
feat: implement FastAPI support across CLI
yss-ef Jun 1, 2026
abb6f75
feat: implement Django support across CLI
yss-ef Jun 1, 2026
7caa98a
feat: implement Svelte support across CLI
yss-ef Jun 1, 2026
f7d8c30
feat: implement Go (Fiber) support across CLI
yss-ef Jun 1, 2026
8a106e5
refactor: remove emojis and clean up CLI output for professional look
yss-ef Jun 1, 2026
26fcd2e
merge: feat/mongodb and refactor output
yss-ef Jun 1, 2026
7855879
merge: feat/nestjs and refactor output
yss-ef Jun 1, 2026
505a109
merge: feat/nodejs-express and refactor output
yss-ef Jun 1, 2026
406358e
Merge feat/reactjs and refactor output
yss-ef Jun 1, 2026
3911c96
merge: feat/nextjs and refactor output
yss-ef Jun 1, 2026
aa10b73
merge: feat/fastapi and refactor output
yss-ef Jun 1, 2026
b438cdd
merge: feat/django and refactor output
yss-ef Jun 1, 2026
0202245
merge: multiple features and refactor output
yss-ef Jun 1, 2026
eb18916
merge: final features and refactor output
yss-ef Jun 1, 2026
379e9ce
refactor: finalize professional output and merge all stacks
yss-ef Jun 1, 2026
26dfafc
test(qa): add full test suite for all commands and generators
yss-ef Jun 1, 2026
64e1535
chore: fix ruff linting and formatting issues
yss-ef Jun 1, 2026
0a6c27d
docs: overhaul README and add COMMANDS.md reference
yss-ef Jun 1, 2026
767c631
Merge branch 'main' into dev
yss-ef Jun 1, 2026
719d49f
fix: resolve regressions and broken code in runner and scanner
yss-ef Jun 1, 2026
eb7b635
fix: ruff formatting in scanner.py
yss-ef Jun 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 99 additions & 0 deletions COMMANDS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# devctl Commands Reference

This document provides a comprehensive list of all commands available in the `devctl` CLI.

## Overview

`devctl` is organized into logical command groups. You can always run `devctl --help` or `devctl [command] --help` to get immediate assistance.

---

## 1. Project Initialization (`devctl init`)

Initialize a new project with a standard boilerplate and optimized configuration.

| Command | Usage | Description |
| :--- | :--- | :--- |
| **Spring Boot** | `devctl init spring [name]` | Downloads a Spring Boot project from start.spring.io. |
| **Angular** | `devctl init angular [name]` | Scaffolds a new Angular project. |
| **Vue.js** | `devctl init vue [name]` | Scaffolds a new Vue 3 project via Vite. |
| **NestJS** | `devctl init nest [name]` | Scaffolds a new NestJS backend. |
| **NodeJS** | `devctl init nodejs [name]` | Scaffolds a clean Express + TypeScript project. |
| **ReactJS** | `devctl init react [name]` | Scaffolds a new React project via Vite. |
| **NextJS** | `devctl init nextjs [name]` | Scaffolds a new NextJS project with App Router. |
| **FastAPI** | `devctl init fastapi [name]` | Scaffolds a new FastAPI (Python) project. |
| **Django** | `devctl init django [name]` | Scaffolds a new Django REST Framework project. |
| **Svelte** | `devctl init svelte [name]` | Scaffolds a new SvelteKit project. |
| **Go** | `devctl init go [name]` | Scaffolds a new Go (Fiber) project. |

### Options
* `--db [postgres|mysql|mongodb]`: Specify the database driver for Spring Boot projects (Default: `postgres`).
* `--port [number]`: Specify a custom local port for the project.

---

## 2. Resource Scaffolding (`devctl add`)

Inject business resources (Entities, Controllers, Services) into your existing project layers.

| Command | Usage | Description |
| :--- | :--- | :--- |
| **Resource** | `devctl add resource [Name]` | Generates a full-stack feature for the given name. |

### Parameters
* `--fields, -f`: Define fields in `name:type` format.
* Example: `devctl add resource Product -f "name:string,price:double"`
* Supported types: `string`, `int`, `double`, `float`, `boolean`, `date`.

---

## 3. Local Orchestration (`devctl run`)

Launch your entire development environment in a single terminal.

| Command | Usage | Description |
| :--- | :--- | :--- |
| **Run** | `devctl run` | Scans for databases, backends, and frontends and runs them. |

### Execution Logic
1. **Databases**: Starts Docker Compose services first and waits for initialization.
2. **Backends**: Launches Spring, Nest, Express, Python, or Go APIs in parallel.
3. **Frontends**: Launches Angular, Vue, React, Svelte, or NextJS dev servers.
4. **Logging**: All output is prefixed by service name and color-coded.

---

## 4. Containerization (`devctl dockerize`)

Generate optimized Dockerfiles for all detected projects.

| Command | Usage | Description |
| :--- | :--- | :--- |
| **Dockerize** | `devctl dockerize [path]` | Scaffolds Multi-stage Dockerfiles for all services. |

### Options
* `--force`: Overwrite existing Dockerfiles.
* `--dry-run`: Preview actions without writing files.

---

## 5. Deployment Preparation (`devctl deploy`)

Prepare for multi-service production or staging deployments.

| Command | Usage | Description |
| :--- | :--- | :--- |
| **Deploy** | `devctl deploy [path]` | Generates a global `docker-compose.yml` for all services. |

### Features
* **Automatic Linking**: Detects database configurations from backends and automatically links them to database services in the global compose file.
* **Context Aware**: Uses relative paths for builds to ensure the compose file is portable.

---

## 6. Utilities

| Command | Usage | Description |
| :--- | :--- | :--- |
| **Ping** | `devctl ping` | Returns "pong" to verify the CLI is operational. |
| **Help** | `devctl --help` | Displays the global or command-specific help menu. |
47 changes: 47 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Contributing to devctl

Thank you for your interest in contributing to `devctl`! We welcome contributions from the community to make this tool even better.

## How to Contribute

1. **Report Bugs**: If you find a bug, please open an issue on GitHub with a detailed description and steps to reproduce it.
2. **Suggest Features**: Have an idea for a new feature? Open an issue to discuss it.
3. **Submit Pull Requests**:
* Fork the repository.
* Create a new branch for your feature or bugfix.
* Ensure your code follows the project's style (we use [Ruff](https://github.com/astral-sh/ruff)).
* Add tests for any new functionality.
* Submit a PR with a clear description of your changes.

## Development Setup

1. Clone the repository:
```bash
git clone https://github.com/your-username/devctl.git
cd devctl
```
2. Create a virtual environment:
```bash
python -m venv .venv
source .venv/bin/activate
```
3. Install dependencies in editable mode:
```bash
pip install -e .
```
4. Run tests:
```bash
pytest
```

## Code Quality

We use `ruff` for linting and formatting. You can run it with:
```bash
ruff check .
ruff format .
```

## License

By contributing, you agree that your contributions will be licensed under the MIT License.
150 changes: 55 additions & 95 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,126 +1,86 @@
# Devctl

`devctl` is a command-line interface (CLI) that automates and orchestrates the
local development lifecycle for Spring Boot, Angular, and Vue.js
architectures.
`devctl` is a professional command-line interface (CLI) designed to automate and
orchestrate the development lifecycle for modern full-stack architectures. It
provides a unified workflow for managing backends (Spring Boot, NestJS, Go,
FastAPI), frontends (Angular, Vue, React, NextJS, Svelte), and their
containerization.

## Core Features

- **Multi-Stack Orchestration**: Launch databases, multiple microservices, and
frontend dev servers with a single command. Includes real-time, prefixed log
streaming.
- **Full-Stack Scaffolding**: Generate consistent business resources
(Entities, DTOs, Controllers, Services) across both backend and frontend
layers simultaneously.
- **Instant Infrastructure**: Automatically generate optimized, multi-stage
`Dockerfiles` and global `docker-compose.yml` configurations by scanning
your project tree.
- **Security by Default**: Inject standardized JWT authentication and security
configurations into new projects.

## Purpose

Full-stack development involves repetitive configuration and environment
management tasks. `devctl` provides a unified control point to automate these
processes, allowing you to focus on implementation rather than infrastructure.

The tool addresses the following challenges:
- Standardized database configuration using Docker.
- Automated security boilerplate generation (JWT, filters, and configuration).
- Surgical CRUD layer generation (entities, repositories, services, and
controllers).
- Concurrent process management for multi-tier applications.
- Automated environment cleanup.
## Installation

## Architecture and integration
You can install `devctl` locally for development:

The tool uses a modular Python 3 architecture and industry-standard libraries:
```bash
git clone https://github.com/yss-ef/devctl.git
cd devctl
pip install -e .
```

- CLI engine: Typer-based interface for type-safe command execution.
- Templating: Jinja2 for dynamic generation of Java, TypeScript, and
configuration assets.
- Spring integration: Connects with the Spring Initializr API for project
bootstrapping.
- Frontend orchestration: Native support for @angular/cli and Vite.
- Orchestration engine: Recursive scanning for project detection and parallel
process management.
- Container management: Lifecycle management for Docker Compose, including
volume persistence control.
## Quick Start

## System requirements
### 1. Initialize a Full-Stack Project

The following dependencies must be in the system path:
Create a new backend and frontend in seconds:

- Python: version 3.9 or later.
- Docker and Docker Compose.
- Java: version 17 or later for Spring Boot modules.
- Node.js and npm for Angular and Vue.js modules.
- Angular CLI for Angular project initialization.
```bash
mkdir my-app && cd my-app
devctl init spring api --db postgres
devctl init angular front
```

## Installation
### 2. Add a Business Resource

1. Clone the repository:
```bash
git clone https://github.com/your-username/devctl.git
cd devctl
```
2. Configure a virtual environment:
```bash
python -m venv .venv
source .venv/bin/activate # Linux/macOS
```
3. Install the package:
```bash
pip install -e .
```
4. Verify the installation:
```bash
devctl ping
```

## Command reference

### Project initialization

Bootstrap new projects with pre-configured defaults and security standards.

- Spring Boot:
```bash
devctl init spring "api-service" --db [postgres|mysql] --port 5432
```
- Angular:
```bash
devctl init angular "web-client"
```
- Vue.js:
```bash
devctl init vue "vue-client"
```

### Resource scaffolding

Inject business resources into existing project structures. The command detects
active modules and updates both backend and frontend layers.
Generate a complete vertical slice of your application:

```bash
devctl add resource "Product" --fields "name:string,price:double,quantity:int"
devctl add resource Product -f "name:string,price:double,quantity:int"
```

### Orchestration
### 3. Run the Environment

Scan the current directory tree and launch all detected components (database,
backend, and frontend) in parallel.
Launch everything in parallel with automatic database startup:

```bash
devctl run
```

Upon termination (Ctrl+C), `devctl` stops all processes and performs a clean
teardown of Docker resources.
## Supported Stacks

### Dockerfile scaffolding
| Type | Frameworks / Technologies |
| :--- | :--- |
| **Backends** | Spring Boot, NestJS, Express (NodeJS), FastAPI, Django, Go (Fiber) |
| **Frontends** | Angular, Vue.js, ReactJS, NextJS, Svelte |
| **Databases** | PostgreSQL, MySQL, MongoDB |

Generate Dockerfiles for detected Spring Boot, Angular, and Vue/Vite services.
## Documentation

```bash
devctl dockerize
devctl dockerize ./my-workspace --dry-run
devctl dockerize --force
```
For a detailed reference of all available commands and their options, see the
[Commands Reference](COMMANDS.md).

## Contributing

Generated assets are limited to service-local `Dockerfile` files. Existing
files are skipped unless you use the `--force` flag.
Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for
development setup and code quality guidelines.

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
for details.

---
Authored by Youssef Fellah.
Personal project.
Professional Development Orchestrator.
Loading
Loading