Skip to content

buildwithhp/gophex

Repository files navigation

🚀 Gophex - Go Project Generator

A powerful, cross-platform CLI tool that generates production-ready Go projects with comprehensive database support, intelligent change detection, automated workflows, and clean architecture principles.

✨ Key Features

🌍 Universal Cross-Platform Support

  • Windows, macOS, Linux - Full feature parity across all platforms
  • Platform-Specific Scripts - Generates .bat files for Windows, .sh for Unix
  • Smart Tool Detection - Auto-installs required tools (golang-migrate, etc.)
  • Native Integration - Uses platform-specific commands and file managers

🏗️ Intelligent Project Generation

  • Clean Architecture - Domain-driven design with proper separation of concerns
  • Interactive Database Configuration - PostgreSQL, MySQL, and MongoDB support
  • Multiple Database Configurations - Single instance, read-write split, and cluster setups
  • Custom Environment Generation - Automatic .env and .env.example creation with real values
  • Database-Specific Migrations - SQL migrations for PostgreSQL/MySQL, initialization scripts for MongoDB

🚀 Post-Generation Workflow Automation

  • Interactive Menu System - Continue working after generation without exiting
  • Quick Start - One-click setup: dependencies → database → start application
  • Development Workflow - Full automated setup with testing and validation
  • Tool Auto-Installation - Automatically installs golang-migrate when needed
  • Multi-Project Sessions - Generate and manage multiple projects in one session

🔐 Production-Ready Security

  • JWT Authentication - Complete auth system with secure middleware
  • Security Middleware - CORS, rate limiting, request logging, input validation
  • Password Security - bcrypt hashing with proper salting
  • Environment Security - Secure credential management and configuration

🗄️ Universal Database Support

  • PostgreSQL - Full support with connection pooling, SSL, clustering
  • MySQL - Complete integration with TLS, read-write splits
  • MongoDB - Document database with replica sets, authentication, sharding
  • Flexible Configurations - Single, read-write split, and cluster setups
  • Migration Management - Database-specific migration tools with auto-installation

📋 Smart Project Management & Metadata

  • Dynamic Project Metadata - Automatically generated gophex.md files with project hierarchy and progress tracking
  • Activity Tracking - Monitors completion status of project activities (dependencies, migrations, tests, etc.)
  • "Re-" Prefix System - Intelligent prefixes for repeated actions (e.g., "re-Install dependencies")
  • Project Loading - Load existing Gophex projects by specifying directory path
  • Smart Validation - Checks for gophex.md file existence and provides helpful feedback
  • Secure Metadata - Tracks database configuration without storing sensitive credentials

🛡️ Intelligent Change Detection & Safety

  • Manual Change Detection - Automatically detects user modifications
  • Step-by-Step Updates - Break large changes into confirmable steps
  • Backup & Rollback - Safe update process with rollback capabilities
  • Code Protection - Never overwrites custom business logic without confirmation
  • Git Integration - Tracks changes through Git history analysis

🎯 Enhanced Developer Experience

  • Fully Interactive CLI - All functionality through user-friendly MCQ prompts
  • No Command-Line Arguments - Simple, consistent interface without complex flags
  • Project Continuity - Seamlessly continue working on existing projects
  • Single Binary - Templates embedded using Go's embed filesystem
  • Comprehensive Documentation - Auto-generated README and migration guides
  • Real-Time Feedback - Progress indicators and status updates
  • Error Recovery - Graceful error handling with helpful suggestions

🛠️ Installation

🌍 Cross-Platform Support

Gophex works on Windows, macOS, and Linux with full feature parity.

Install from GitHub

go install github.com/buildwithhp/gophex@latest

Build from Source

git clone https://github.com/buildwithhp/gophex.git
cd gophex
go build -o gophex main.go

Platform-Specific Installation

Windows:

# Requires Go 1.19+
go install github.com/buildwithhp/gophex@latest

macOS:

# Using Homebrew (if Go not installed)
brew install go
go install github.com/buildwithhp/gophex@latest

Linux:

# Ubuntu/Debian
sudo apt install golang-go
go install github.com/buildwithhp/gophex@latest

🎯 Usage

🎮 Interactive MCQ Interface

Gophex uses a fully interactive Multiple Choice Question (MCQ) interface - no command-line arguments needed! Simply run gophex and navigate through user-friendly menus.

Why MCQ-only?

  • Beginner Friendly - No need to memorize complex command flags
  • Consistent Experience - Same interface across all platforms
  • Error Prevention - Guided choices prevent invalid configurations
  • Discovery - Easily explore all available options
  • Accessibility - Works great with screen readers and assistive tools

🚀 Quick Start

# Install Gophex
go install github.com/buildwithhp/gophex@latest

# Start interactive mode
gophex

📋 Interactive Workflow

Step 1: Start Gophex

gophex
# Choose from:
# - Generate a new project
# - Load existing project  ← NEW!
# - Show version
# - Show help
# - Quit

Step 2: Interactive Configuration

  1. Project Type Selection - Choose from API, webapp, microservice, or CLI
  2. Project Name - Enter your project name
  3. Database Configuration (for API projects):
    • Database type: PostgreSQL, MySQL, or MongoDB
    • Configuration type: Single instance, read-write split, or cluster
    • Connection details: Host, port, credentials, SSL settings
  4. Path Confirmation - Confirm or change the generation directory

Step 3: Post-Generation Menu

✅ Project 'myapi' is ready at /path/to/myapi
🌐 API project with database integration

🚀 What would you like to do next?

⚡ Quick start (install deps + start app)
🔄 Development workflow (full auto-setup)
📁 Open project directory
🗄️ Run database migrations/initialization
📦 Install dependencies (go mod tidy)
🚀 Start the application
🧪 Run tests
📖 View project documentation
🔍 Run change detection
🆕 Generate another project
❌ Exit

📂 Loading Existing Projects

NEW! Gophex can now load and continue working on existing projects:

gophex
# Select: Load existing project

📁 Load Existing Gophex Project
💡 Enter the path to a directory containing a 'gophex.md' file

? Enter the path to a Gophex project directory: ./myapi

📂 Loading project: myapi (api)
📍 Location: ./myapi
🕒 Last updated: 2 hours ago

🚀 What would you like to do next?

⚡ Quick start (install deps + start app)
🔄 Development workflow (full auto-setup)
📁 Open project directory
🗄️ re-Run database migrations/initialization  ← "re-" prefix for completed activities
📦 re-Install dependencies (go mod tidy)       ← Shows what's been done before
🚀 Start the application
🧪 Run tests
📖 View project documentation
🔍 Run change detection
🆕 Generate another project
❌ Exit

If no gophex.md file is found:

? Enter the path to a Gophex project directory: ./some-directory

❌ No Gophex metadata file (gophex.md) found in: /path/to/some-directory

? Would you like to create a new project? (Y/n)

Key Features:

  • Manual Path Input - Simple, direct path specification without system-wide searching
  • Smart Validation - Checks for gophex.md file existence and validity
  • Smart Activity Tracking - Shows "re-" prefix for activities that have been completed before
  • Time-Aware Display - Shows when projects were last updated
  • Fallback to Generation - Option to create new project if no metadata found
  • Seamless Integration - Loaded projects work exactly like newly generated ones

💻 Interactive Interface

# Start Gophex interactive mode
gophex

# Main menu options:
# - Generate a new project
# - Show version
# - Show help  
# - Quit

📋 Project Types

🌐 REST API (Production-Ready)

Generates a comprehensive REST API with clean architecture, database integration, and your choice of web framework:

🚀 Framework Options

  • Gin - High-performance HTTP web framework with JSON validation
  • Echo - Minimalist web framework with middleware support
  • Gorilla - Powerful toolkit with flexible routing and middleware
gophex
# Select: Generate a new project
# Select: api - REST API with clean architecture
# Enter project name: myapi
# Choose framework: Gin/Echo/Gorilla
# Choose database: PostgreSQL/MySQL/MongoDB
# Configure database setup: Single/Read-Write/Cluster
# Enter connection details

Generated Structure:

myapi/
├── cmd/api/                    # Application entry point
│   └── main.go                 # Graceful shutdown, DB connections
├── internal/
│   ├── api/                    # HTTP layer
│   │   ├── handlers/           # Request handlers
│   │   │   ├── auth.go         # JWT authentication
│   │   │   ├── users.go        # User CRUD operations
│   │   │   ├── posts.go        # Post management
│   │   │   └── health.go       # Health checks
│   │   ├── middleware/         # HTTP middleware
│   │   │   ├── auth.go         # JWT validation
│   │   │   ├── cors.go         # CORS handling
│   │   │   ├── logging.go      # Request logging
│   │   │   └── ratelimit.go    # Rate limiting
│   │   ├── routes/             # Route definitions
│   │   │   └── routes.go       # API routing setup
│   │   └── responses/          # Response formatting
│   │       ├── error.go        # Error responses
│   │       └── success.go      # Success responses
│   ├── database/               # Universal database layer
│   │   ├── database.go         # Database interface & implementations
│   │   ├── config.go           # Database configuration
│   │   └── factory.go          # Database factory
│   ├── domain/                 # Business logic
│   │   ├── user/               # User domain
│   │   │   ├── model.go        # User entity
│   │   │   ├── repository.go   # Repository interface
│   │   │   └── service.go      # Business logic
│   │   └── post/               # Post domain
│   │       ├── model.go        # Post entity
│   │       ├── repository.go   # Repository interface
│   │       └── service.go      # Business logic
│   ├── infrastructure/         # External dependencies
│   │   ├── database/           # Database implementations
│   │   │   ├── postgres/       # PostgreSQL repositories
│   │   │   └── redis/          # Redis caching
│   │   └── auth/               # Authentication
│   │       ├── jwt.go          # JWT implementation
│   │       └── password.go     # Password hashing
│   ├── config/                 # Configuration management
│   │   └── config.go           # App configuration
│   └── pkg/                    # Shared utilities
│       ├── validator/          # Input validation
│       ├── logger/             # Structured logging
│       └── errors/             # Custom error types
├── migrations/                 # Database migrations
│   ├── 000001_create_users_table.up.sql    # User table migration
│   ├── 000001_create_users_table.down.sql  # Rollback migration
│   ├── 000002_create_posts_table.up.sql    # Post table migration
│   ├── 000002_create_posts_table.down.sql  # Rollback migration
│   ├── mongodb_init.js         # MongoDB initialization (if MongoDB)
│   └── README.md               # Migration documentation
├── scripts/                    # Utility scripts
│   ├── migrate.sh              # Database migration script
│   └── detect-changes.sh       # Change detection script
├── .env                        # Environment variables (with real values)
├── .env.example                # Environment template
├── .gophex-generated           # Generation metadata
├── gophex.md                   # Project metadata and activity tracking (NEW!)
├── go.mod                      # Go modules
└── README.md                   # Project documentation

🎯 Framework-Specific Features

Gin Framework:

  • High-performance HTTP routing with radix tree
  • Built-in JSON validation and binding
  • Middleware chaining with context passing
  • Automatic content negotiation

Echo Framework:

  • Minimalist design with powerful middleware
  • Built-in request/response binding
  • Automatic TLS support
  • Extensible middleware system

Gorilla Framework:

  • Flexible routing with URL patterns
  • Powerful middleware toolkit
  • WebSocket support ready
  • Session management capabilities

Features Included:

  • Universal Database Support - PostgreSQL, MySQL, MongoDB with all configuration types
  • Cross-Platform Scripts - Windows .bat and Unix .sh files generated automatically
  • Auto-Tool Installation - golang-migrate and other tools installed automatically
  • Post-Generation Workflow - Interactive menu for immediate development
  • Smart Project Metadata - Dynamic gophex.md with project hierarchy and activity tracking
  • Project Loading - Load and continue working on existing Gophex projects
  • Activity Awareness - "Re-" prefix system for repeated actions
  • JWT Authentication System - Complete auth with secure middleware
  • User Management - Full CRUD operations with validation
  • Post Management System - Content management with author relationships
  • Security Middleware - CORS, rate limiting, request logging, input validation
  • Database Migrations - SQL migrations and MongoDB initialization scripts
  • Environment Configuration - Custom .env generation with real database credentials
  • Change Detection - Automatic detection of manual code modifications
  • Health Check Endpoints - Application and database health monitoring
  • Clean Architecture Pattern - Domain-driven design with proper separation
  • Repository Pattern - Abstract data access layer
  • Dependency Injection - Loose coupling between components
  • Graceful Shutdown - Proper resource cleanup and signal handling
  • Development Automation - One-click setup from generation to running app

🌍 Web Application

gophex
# Select: Generate a new project
# Select: webapp - Web application with templates

Generates a web application with HTML templates and static file serving.

🔧 Microservice

gophex
# Select: Generate a new project
# Select: microservice - Microservice with gRPC support

Creates a lightweight microservice with health checks and service endpoints.

💻 CLI Tool

gophex
# Select: Generate a new project
# Select: cli - Command-line tool

Generates a CLI application using Cobra framework.

🏗️ Architecture Principles

Clean Architecture

  • Domain Layer: Business logic and entities
  • Infrastructure Layer: External dependencies (database, APIs)
  • API Layer: HTTP handlers and middleware
  • Dependency Inversion: Interfaces define contracts

Best Practices

  • Separation of Concerns - Each layer has a single responsibility
  • Dependency Injection - Loose coupling between components
  • Repository Pattern - Abstract data access
  • Service Layer - Business logic encapsulation
  • Middleware Pattern - Cross-cutting concerns
  • Error Handling - Consistent error responses
  • Configuration Management - Environment-based config
  • Structured Logging - Observability and debugging
  • Input Validation - Data integrity and security
  • Testing Structure - Unit and integration tests

🔧 Technology Stack & Automation

🤖 Automated Tool Management

Auto-Installation Features:

  • golang-migrate: Automatically installed when needed for database migrations
  • Platform Detection: Installs appropriate tools for your operating system
  • Version Verification: Ensures tools are properly installed and accessible
  • Error Recovery: Provides helpful guidance if installation fails

Tool Installation Process:

# When you run database setup, Gophex automatically:
⚠️  golang-migrate tool is not installed
   This tool is required for postgresql database migrations

? Would you like Gophex to install golang-migrate for you? Yes

📦 Installing golang-migrate tool...
   Running: go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
✅ golang-migrate installed successfully!
   📋 Version: v4.16.2
   🎯 Ready for postgresql database migrations

🗄️ Database Support

  • PostgreSQL: Full support with connection pooling, SSL, read-write splits, clustering
  • MySQL: Complete integration with TLS, connection pooling, cluster support
  • MongoDB: Document database with replica sets, authentication, cluster configurations
  • Redis: Caching layer (optional)
  • Migrations: golang-migrate for SQL databases (auto-installed), custom scripts for MongoDB

🏗️ Core Dependencies

  • HTTP Router: Gorilla Mux
  • Database Drivers:
    • PostgreSQL: lib/pq
    • MySQL: go-sql-driver/mysql
    • MongoDB: go.mongodb.org/mongo-driver
  • Authentication: JWT with secure token handling
  • Password Hashing: bcrypt with proper salting
  • Configuration: Environment-based configuration
  • Logging: Structured logging with levels
  • Validation: Custom validation package

🛠️ Development Automation

  • Workflow Automation: One-click setup from generation to running application
  • Change Detection: Automatic detection of manual modifications via Git analysis
  • Migration Management: Database-specific migration tools with auto-installation
  • Testing Integration: Automated test running and validation
  • Documentation Generation: Auto-generated README and migration guides
  • Safety Features: Backup, rollback, and change protection capabilities

🌍 Cross-Platform Tools

  • Windows: Batch files (.bat), CMD integration, Explorer opening
  • macOS: Shell scripts (.sh), Terminal integration, Finder opening
  • Linux: Shell scripts (.sh), Terminal integration, file manager opening
  • Universal: HTTP client for health checks, Go tools for all operations

🚀 Getting Started with Generated Projects

🎯 Recommended Workflow (Easiest)

  1. Generate and Auto-Setup:

    gophex
    # Select: Generate a new project
    # Follow interactive prompts
    # Select "⚡ Quick start" from post-generation menu

    This automatically:

    • Installs dependencies
    • Sets up database (installs golang-migrate if needed)
    • Starts the application
    • Tests health endpoint
  2. Start Developing:

    # API is running on http://localhost:8080
    # Health check: http://localhost:8080/api/v1/health
    # Ready for development!

📋 Manual Setup (Step-by-Step)

  1. Generate the project:

    gophex
    # Select: Generate a new project
    # Select: api - REST API with clean architecture
    # Enter project name: myapi
    # Choose database type: PostgreSQL/MySQL/MongoDB
    # Configure database setup and credentials
  2. Use Post-Generation Menu:

    # After generation, choose from menu:
    📦 Install dependencies (go mod tidy)
    🗄️ Run database migrations/initialization
    🚀 Start the application
  3. Or Manual Commands:

    cd myapi
    go mod tidy
    
    # Windows
    scripts\migrate.bat up
    
    # Unix/Linux/macOS
    ./scripts/migrate.sh up
    
    go run cmd/api/main.go

🧪 Testing Your API

# Health check
curl http://localhost:8080/api/v1/health

# Register a user
curl -X POST http://localhost:8080/api/v1/auth/register \
  -H "Content-Type: application/json" \
  -d '{"email":"user@example.com","username":"testuser","password":"password123"}'

# Login
curl -X POST http://localhost:8080/api/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email":"user@example.com","password":"password123"}'

🔍 Change Detection & Safety

Generated projects include intelligent change detection:

# Windows
scripts\detect-changes.bat

# Unix/Linux/macOS
./scripts/detect-changes.sh

# Shows:
# - Git commits since generation
# - Modified files
# - Custom code patterns
# - Custom imports
# - Database schema changes

🛠️ Development Tools

Database Management:

# Check migration status
scripts/migrate.sh status        # Unix
scripts\migrate.bat status       # Windows

# Create new migration
scripts/migrate.sh create add_new_table

Project Management:

# Run tests
go test ./...

# Build for production
go build -o api cmd/api/main.go

# Check for changes
scripts/detect-changes.sh

API Endpoints

Generated APIs include these endpoints:

  • GET /api/v1/health - Health check
  • POST /api/v1/auth/register - User registration
  • POST /api/v1/auth/login - User login
  • GET /api/v1/users - List users (protected)
  • GET /api/v1/users/{id} - Get user (protected)
  • PUT /api/v1/users/{id} - Update user (protected)
  • DELETE /api/v1/users/{id} - Delete user (protected)
  • GET /api/v1/posts - List posts (public)
  • GET /api/v1/posts/{id} - Get post (public)
  • POST /api/v1/posts - Create post (protected)
  • PUT /api/v1/posts/{id} - Update post (protected)
  • DELETE /api/v1/posts/{id} - Delete post (protected)

🧪 Testing

Generated projects include comprehensive testing structure:

# Run all tests
go test ./...

# Run with coverage
go test -cover ./...

# Run integration tests
go test ./tests/integration/...

# Run unit tests
go test ./internal/...

📋 Project Metadata System

🆕 gophex.md File

Every Gophex project now includes a gophex.md file that contains comprehensive metadata about the project:

{
  "project": {
    "name": "myapi",
    "type": "api",
    "version": "1.0.0",
    "gophex_version": "1.0.0",
    "generated_at": "2025-08-03T20:00:00+05:30",
    "last_updated": "2025-08-03T20:05:00+05:30"
  },
  "hierarchy": {
    "cmd": {
      "api": {
        "main.go": "application_entry_point"
      }
    },
    "internal": {
      "api": {
        "handlers": {
          "auth.go": "authentication_handlers",
          "users.go": "user_management_handlers"
        }
      }
    }
  },
  "database": {
    "configured": true,
    "type": "postgresql",
    "config_type": "single",
    "is_clustered": false,
    "has_read_write_split": false,
    "ssl_enabled": false,
    "migrations_executed": true,
    "schema_initialized": true
  },
  "activities": {
    "project_generated": {
      "completed": true,
      "timestamp": "2025-08-03T20:00:00+05:30",
      "can_repeat": false
    },
    "dependencies_installed": {
      "completed": true,
      "timestamp": "2025-08-03T20:05:00+05:30",
      "can_repeat": true
    },
    "database_migrated": {
      "completed": true,
      "timestamp": "2025-08-03T20:03:00+05:30",
      "can_repeat": true
    }
  }
}

🔑 Key Features:

  • 📁 Dynamic Hierarchy - Complete file structure with descriptive labels
  • 🗄️ Database Tracking - Configuration status without sensitive credentials
  • 📊 Activity Monitoring - Tracks completion of project activities
  • 🔄 "Re-" Prefix System - Shows which activities can be repeated
  • 🕒 Timestamps - When activities were completed
  • 🔍 Project Discovery - Enables automatic project loading
  • 🛡️ Secure - No passwords or sensitive data stored

💡 Benefits:

  • Project Continuity - Resume work on any Gophex project from anywhere
  • Team Collaboration - Share project status and progress with team members
  • Development Insights - Understand what's been done and what's next
  • Automation Support - Enables intelligent tooling and workflows

🗄️ Database Configuration Examples

PostgreSQL Single Instance

# Interactive prompts will generate:
DATABASE_URL=postgres://admin:password@localhost:5432/myapi?sslmode=disable

MySQL Read-Write Split

# Interactive prompts will generate:
DATABASE_WRITE_URL=admin:password@tcp(write-host:3306)/myapi?tls=false
DATABASE_READ_URL=admin:password@tcp(read-host:3306)/myapi?tls=false

MongoDB Cluster

# Interactive prompts will generate:
DATABASE_URL=mongodb://admin:password@node1:27017,node2:27017,node3:27017/myapi?replicaSet=rs0&authSource=admin

🛡️ Change Detection & Safety Features

Automatic Change Detection

Generated projects include intelligent change detection:

# Run change detection
./scripts/detect-changes.sh

# Sample output:
🔍 Gophex Change Detection Tool
================================

✅ Gophex-generated project detected
  📅 Generated: 2025-01-02T15:04:05Z
  🏗️  Type: api
  🗄️  Database: postgresql

⚠️  Found 3 manual commits since generation
⚠️  Found 2 files modified since generation:
  📝 internal/api/handlers/users.go
  📝 internal/database/migrations/003_custom.sql

⚠️  Found custom code markers:
  🏷️  // CUSTOM: (5 matches)
  🏷️  // TODO: (2 matches)

📊 Change Detection Summary
⚠️  MANUAL CHANGES DETECTED
   This project has been manually modified since generation.
   Please review changes carefully before applying updates.

Safe Update Protocol

When updating generated projects:

  1. Change Detection: Automatically detects manual modifications
  2. Step-by-Step Updates: Breaks large changes into confirmable steps
  3. Backup & Rollback: Creates backups before making changes
  4. User Confirmation: Never overwrites custom code without permission

📦 Template System

Gophex uses Go's embedded filesystem for templates:

  • Embedded Templates: All templates are embedded in the binary
  • Database-Aware: Templates adapt based on database configuration
  • No External Dependencies: Single binary distribution
  • Fast Generation: Templates loaded from memory
  • Version Controlled: Templates are part of the codebase
  • Easy Maintenance: Each template is a separate file
  • Custom Environment Generation: Creates .env files with actual values

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Adding New Templates

  1. Create template files in internal/templates/{type}/
  2. Use .tmpl extension for template files
  3. Available template variables:
    • {{.ProjectName}} - Project name
    • {{.ModuleName}} - Go module name
    • {{.DatabaseConfig.Type}} - Database type (postgresql, mysql, mongodb)
    • {{.DatabaseConfig.ConfigType}} - Configuration type (single, read-write, cluster)
    • {{.DatabaseConfig.Host}} - Database host
    • {{.DatabaseConfig.Username}} - Database username
    • {{.DatabaseConfig.Password}} - Database password
    • {{.GeneratedAt}} - Generation timestamp
  4. Templates are automatically discovered by the embedded filesystem
  5. Use conditional logic for database-specific code:
    {{if eq .DatabaseConfig.Type "postgresql"}}
    // PostgreSQL-specific code
    {{else if eq .DatabaseConfig.Type "mongodb"}}
    // MongoDB-specific code
    {{end}}

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • Inspired by modern Go project layouts
  • Built with Go's powerful standard library
  • Uses industry-standard packages and patterns
  • Follows clean architecture principles

🎯 Key Features Summary

🌍 Cross-Platform Excellence

  • Windows, macOS, Linux: Full feature parity across all platforms
  • Platform-Specific Scripts: Generates .bat for Windows, .sh for Unix
  • Smart Tool Management: Auto-installs golang-migrate and other required tools
  • Native Integration: Uses platform-specific file managers and commands

🚀 Workflow Automation

  • Post-Generation Menu: Continue working without exiting the application
  • Project Loading: Load and continue working on existing Gophex projects
  • Quick Start: One-click setup from generation to running application
  • Development Workflow: Automated dependency installation, database setup, testing
  • Multi-Project Sessions: Generate and manage multiple projects efficiently

🗄️ Universal Database Support

  • 3 Database Types: PostgreSQL, MySQL, MongoDB
  • 3 Configuration Types: Single instance, read-write split, cluster
  • Automatic Setup: Custom environment files with real credentials
  • Migration Management: Database-specific scripts with auto-tool installation

📋 Smart Project Management

  • Dynamic Metadata: Comprehensive gophex.md files with project hierarchy and activity tracking
  • Activity Intelligence: "Re-" prefix system for repeated actions
  • Manual Project Loading: Load projects by specifying directory path
  • Project Continuity: Resume work on any project from anywhere
  • Secure Tracking: Metadata without sensitive credentials

🛡️ Intelligent Change Management

  • Change Detection: Automatically detects manual modifications via Git and file analysis
  • Safe Updates: Step-by-step confirmation process with rollback capabilities
  • Code Protection: Never overwrites custom business logic without explicit permission
  • User Control: Respects user decisions and preserves customizations

🏗️ Production-Ready Architecture

  • Clean Architecture: Domain-driven design with proper separation of concerns
  • Security First: JWT auth, CORS, rate limiting, input validation, secure password hashing
  • Performance Optimized: Connection pooling, caching, optimized middleware
  • Observability: Structured logging, health checks, error tracking
  • DevOps Ready: Migration scripts, environment management, testing structure

📞 Support

🔄 Version History

v1.1.0 (Latest) - Smart Project Management & Metadata

  • Project Loading - Load and continue working on existing Gophex projects by path
  • Smart Metadata System - Dynamic gophex.md files with project hierarchy and activity tracking
  • Activity Awareness - "Re-" prefix system for repeated actions
  • Smart Validation - Checks for gophex.md file existence with helpful feedback
  • Secure Metadata - Tracks configuration without storing sensitive credentials
  • Project Continuity - Resume work from any directory on any project
  • Time-Aware Display - Shows when projects were last updated
  • Enhanced Developer Experience - Seamless workflow between project generation and management

v1.0.0 - Complete Development Workflow

  • Cross-Platform Support - Windows, macOS, Linux with full feature parity
  • Post-Generation Workflow - Interactive menu system for continued development
  • Automated Tool Installation - Auto-installs golang-migrate and other required tools
  • Universal Database Support - PostgreSQL, MySQL, MongoDB with all configuration types
  • Interactive Database Configuration - Step-by-step database setup with real credentials
  • Custom Environment Generation - Automatic .env files with actual values
  • Platform-Specific Scripts - Windows batch files and Unix shell scripts
  • Change Detection & Safety - Intelligent detection of manual modifications
  • Development Automation - One-click setup from generation to running application
  • Clean Architecture - Domain-driven design with repository pattern
  • Production-Ready Security - JWT auth, CORS, rate limiting, input validation

🚀 What's New in v1.1.0

  • Project Loading: Load existing Gophex projects by specifying directory path
  • Smart Metadata: Dynamic project metadata with complete hierarchy tracking and activity monitoring
  • Activity Intelligence: "Re-" prefix system shows what's been done before and can be repeated
  • Smart Validation: Checks for gophex.md file existence with helpful error messages and fallback options
  • Enhanced Continuity: Seamless workflow between creating new projects and managing existing ones
  • Secure Tracking: Comprehensive metadata without storing sensitive information like passwords

🌟 Why Choose Gophex?

🎯 For Beginners

  • MCQ Interface: No command-line arguments to learn - just select from menus
  • Guided Setup: Interactive prompts guide you through every step
  • Auto-Installation: Installs required tools automatically
  • Learning Aid: Generated code follows Go best practices
  • Documentation: Comprehensive README and migration guides

🚀 For Professionals

  • Production Ready: Security, performance, and observability built-in
  • Time Saving: From idea to running API in minutes
  • Customizable: Respects and preserves your custom modifications
  • Scalable: Clean architecture supports growth and team development

🏢 For Teams

  • Consistent Structure: Standardized project layout across team
  • Change Detection: Track modifications and maintain code quality
  • Cross-Platform: Works on every developer's machine
  • Documentation: Auto-generated docs for easy onboarding

Made with ❤️ for the Go community

Gophex - Generate. Load. Configure. Deploy. Scale.

🌍 Works everywhere Go works - Windows, macOS, Linux 📂 Load any Gophex project from anywhere

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors