Skip to content

alfariiizi/v04-dep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

177 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Vandor Ecosystem

Architecture-agnostic Go backend scaffolding and package management system

Go Version License Status

Vandor is a comprehensive ecosystem for building production-ready Go backends with a focus on:

  • πŸ—οΈ Architecture Flexibility - Support for multiple architecture patterns (Hexagonal, EDA, Clean, Minimal)
  • πŸ“¦ Package Management - VPKG system for reusable components
  • 🎨 Interactive CLI - Beautiful TUI with Catppuccin themes
  • 🧩 Domain-Driven Design - Business capability-focused domain organization
  • πŸš€ Developer Experience - Code generation, hot reload, comprehensive tooling

πŸš€ Quick Start

One-Line Installation

Using curl:

curl -fsSL https://raw.githubusercontent.com/alfariiizi/vandor/main/install.sh | bash

Using wget:

wget -qO- https://raw.githubusercontent.com/alfariiizi/vandor/main/install.sh | bash

Custom installation directory:

INSTALL_DIR=/usr/local/bin curl -fsSL https://raw.githubusercontent.com/alfariiizi/vandor/main/install.sh | bash

Initialize Your First Project

# Interactive wizard (recommended)
vandor init my-project

# Or use presets for quick setup
vandor init my-api --preset=web-api --non-interactive

Build from Source (Alternative)

If you prefer to build from source:

# Clone the repository
git clone https://github.com/alfariiizi/vandor.git
cd vandor

# Build the CLI
cd cli
go build -o vandor main.go

# Install (optional)
sudo mv vandor /usr/local/bin/

πŸ“š Documentation

New to Vandor? Start with our comprehensive documentation navigation system:

Document Purpose Audience
Documentation Index πŸ“– Master index of all files Everyone
Quick Reference ⚑ Quick reference card Developers
Structure Guide 🌳 Visual tree structure Explorers
Getting Started πŸŽ“ Complete tutorial Beginners
Installation Guide πŸ’Ώ Installation guide New users
VPKG Quick Start πŸ“¦ Package system guide Developers

Learning Paths

For Users:

  1. Installation Guide
  2. Getting Started
  3. Interactive Mode Guide

For Contributors:

  1. CLAUDE.md - Project overview
  2. TODO.md - Implementation roadmap
  3. Architecture Decisions

For Architects:

  1. Final Architecture Decisions
  2. Domain Granularity Strategy
  3. Architecture-Agnostic Structure

πŸ—οΈ Repository Structure

vandor/                            # Repository root
β”œβ”€β”€ cli/                           # πŸ› οΈ Vandor CLI Tool (main component)
β”‚   β”œβ”€β”€ cmd/                       # CLI commands
β”‚   β”œβ”€β”€ internal/                  # Generators, TUI, VPKG
β”‚   └── README.md                  # CLI documentation
β”‚
β”œβ”€β”€ templates/                     # πŸ“‹ Project Templates
β”‚   β”œβ”€β”€ base/                      # Minimal base template
β”‚   └── hexagonal/                 # Hexagonal architecture template
β”‚
β”œβ”€β”€ test/                          # πŸ§ͺ Test Suite
β”‚   β”œβ”€β”€ fixtures/                  # Generated test projects
β”‚   β”œβ”€β”€ scripts/                   # Validation scripts
β”‚   └── manual/                    # Manual test files
β”‚
β”œβ”€β”€ discussion/                    # πŸ“– Design Discussions
β”‚   β”œβ”€β”€ architecture/              # 11 architecture decision docs
β”‚   └── design/                    # VPKG and design philosophy
β”‚
β”œβ”€β”€ docs/                          # βœ… Project Documentation
β”‚   β”œβ”€β”€ completed/                 # Completion reports
β”‚   β”œβ”€β”€ current/                   # Active development docs
β”‚   └── archive/                   # Historical decisions
β”‚
└── guide/                         # πŸ“š User Guides
    β”œβ”€β”€ getting-started.md         # Complete beginner tutorial
    β”œβ”€β”€ installation.md            # Installation instructions
    └── interactive-mode-guide.md  # TUI wizard guide

Note: The reference backend implementation has been moved to a separate repository: github.com/alfariiizi/vandor-backend-template


✨ Features

Vandor CLI (cli/)

  • Interactive Project Init - Beautiful TUI wizard with Catppuccin themes
  • Multiple Architecture Templates - Hexagonal, EDA, Clean, Minimal (v0.1 focuses on Hexagonal)
  • VPKG Package System - Install infrastructure components on-demand
  • Code Generators - Domain, use case, service, handler generators
  • Domain Discovery - AI-powered and rule-based domain suggestions
  • Task Runner - Integrated Taskfile support
  • Theme System - Auto-detecting Catppuccin themes

Backend Templates

  • Reference Implementation - Available at vandor-backend-template
  • Complete Stack - Ent.go, Huma v2, Chi, FX dependency injection
  • Database Tools - Atlas migrations, Ent code generation
  • Background Jobs - Asynq task queue integration
  • Observability - OpenTelemetry, structured logging

VPKG System

  • Extension Mechanism - Add HTTP, database, cache, messaging on-demand
  • Two Package Types - fx-module (libraries) and cli-command (tools)
  • Registry Support - Remote package discovery and installation
  • Dependency Resolution - Automatic dependency management

🎯 Core Philosophy

1. Architecture-Agnostic Foundation

All projects share the same top-level structure:

internal/
β”œβ”€β”€ domain/              # Business capabilities
β”œβ”€β”€ adapter/             # Infrastructure & transport
β”œβ”€β”€ pkg/                 # Logger + config only
└── vpkg/                # Installed packages

Only the internal domain structure changes per architecture.

2. Domain = Business Capability

❌ Wrong: Table-based domains (user/, product/, order_item/)
βœ… Right: Business capability domains (identity/, catalog/, order/)

Use Event Storming or business capability analysis to discover domains.

3. Minimal Base Template

Base template includes ONLY:

  • Logger
  • Configuration
  • Project structure

Everything else (HTTP, database, cache) is added via VPKG.

This supports:

  • βœ… Web APIs
  • βœ… CLI tools
  • βœ… Event processors
  • βœ… API gateways
  • βœ… Background workers

4. Hybrid Repository Strategy

Now (v0.1 Development):

  • 🎯 Monorepo for easy coordination
  • Single git clone
  • Atomic commits across components

Current Organization:

  • βœ… github.com/alfariiizi/vandor - CLI tool and templates
  • βœ… github.com/alfariiizi/vandor-backend-template - Reference implementation

Future:

  • Additional specialized templates in separate repositories

See REPOSITORY_STRATEGY.md for details.


πŸ“¦ Components

Command-line tool for project scaffolding and management.

Key Commands:

vandor init <name>              # Initialize new project
vandor add domain <name>        # Add business capability domain
vandor add handler <path>       # Add HTTP handler
vandor vpkg add <package>       # Install VPKG package
vandor tui                      # Launch interactive mode
vandor sync all                 # Regenerate code

Backend Reference Implementation

Hexagonal architecture reference implementation available at: github.com/alfariiizi/vandor-backend-template

Tech Stack:

  • Go 1.24.1+
  • Uber FX (dependency injection)
  • Ent.go (database ORM)
  • Huma v2 (HTTP framework)
  • Asynq (background jobs)
  • OpenTelemetry (observability)

Project templates for different architectures.

Available:

  • Base (templates/base/) - Minimal foundation
  • Hexagonal (templates/hexagonal/) - Ports & adapters

Planned (v0.2+):

  • Event-Driven Architecture
  • Clean Architecture
  • Custom templates

πŸ› οΈ Development

Prerequisites

  • Go 1.24.1+
  • Task (task runner)
  • Air (hot reload - optional)
  • Docker (for examples - optional)

Building Components

# Build Vandor CLI
cd cli
go build -o vandor main.go
./vandor --version

Running Tests

# Test Vandor CLI
cd cli
go test ./...

# Run validation scripts
./test/scripts/validate_priority5.sh

πŸ—ΊοΈ Roadmap

v0.1.0 - Core Foundation (Q1 2025) - Production Ready

  • βœ… Hexagonal architecture template
  • βœ… Interactive init wizard
  • βœ… VPKG ecosystem
  • βœ… Domain generators
  • βœ… Testing infrastructure
  • βœ… All 5 registry generators
  • βœ… CLI bug fixes (8 critical issues)
  • βœ… Architecture alignment (100%)
  • βœ… Integration testing (100% success)
  • βœ… Documentation (comprehensive quality reports)

v0.2.0 - Template Ecosystem (Q2 2025)

  • πŸ”² Separate template repositories
  • πŸ”² Template discovery system
  • πŸ”² Custom template support
  • πŸ”² API Gateway template

v0.3.0 - Specialized Templates (Q3 2025)

  • πŸ”² CLI tool template
  • πŸ”² Event processor template
  • πŸ”² Worker template

v0.4.0 - Advanced Features (Q4 2025)

  • πŸ”² Architecture migration tools
  • πŸ”² Multi-template monorepo
  • πŸ”² Cloud deployment integrations

See TODO.md for detailed progress tracking.


πŸ“– Key Documentation

Architecture & Design

Implementation

User Guides

Quality Reports

Latest Reports (2025-11-02): See docs/quality/2025-11-02/


🀝 Contributing

We welcome contributions! Here's how to get started:

  1. Understand the Architecture

  2. Pick a Task

    • Check TODO.md for open tasks
    • Look for Priority 1-2 tasks for v0.1
    • Check docs/current/ for active development
  3. Make Your Changes

    • Follow Go best practices
    • Add tests for new features
    • Update documentation
    • Use conventional commits
  4. Submit a PR

    • Ensure tests pass
    • Update TODO.md if needed
    • Add to docs/completed/ when done

πŸ“Š Status

Current Phase: v0.1.0 Released (100% complete - Production Ready)

What's Working:

  • βœ… Hexagonal template generation
  • βœ… Interactive init wizard
  • βœ… VPKG package system
  • βœ… Domain discovery
  • βœ… Code synchronization
  • βœ… Testing infrastructure
  • βœ… Registry generators (all 5 working perfectly)
  • βœ… Architecture alignment (100% compliance)
  • βœ… Integration testing (100% success rate)
  • βœ… CLI bug fixes (all 8 critical issues resolved)
  • βœ… Complete end-to-end workflow verified

v0.1.0 Released:

  • βœ… All core features implemented
  • βœ… All critical bugs fixed
  • βœ… Comprehensive testing complete (23/23 tests passed)
  • βœ… Quality documentation (6 reports, 3,900+ lines)
  • βœ… CHANGELOG.md and RELEASE_NOTES.md created
  • βœ… FAQ and Troubleshooting guides added

Recent Improvements (2025-11-02):

  • βœ… Fixed 8 critical CLI bugs
  • βœ… Achieved 100% architecture alignment
  • βœ… Fixed integration test issues (89% β†’ 100% success)
  • βœ… Fixed registry generator bugs (all 5 registries working)
  • βœ… Complete system verification (23/23 tests passed)

See: Quality Reports for detailed documentation

See TODO.md for detailed status and roadmap.


πŸ”— Links


πŸ“„ License

MIT License - See LICENSE file for details


πŸ™ Acknowledgments

Design Inspiration:

  • shadcn/ui - Component ownership philosophy
  • DDD Community - Domain-driven design patterns
  • Go Community - Best practices and idioms

Technologies:

  • Cobra - CLI framework
  • Bubble Tea - TUI framework
  • Catppuccin - Beautiful color themes
  • Ent - Database ORM
  • Huma - HTTP framework

Made with ❀️ for the Go community


🚦 Getting Help


Happy coding! πŸš€