Categorygithub.com/jonesrussell/goforms
repository
0.0.0-20250128035417-84048cf2426f
Repository: https://github.com/jonesrussell/goforms.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

GoForms

A modern Go web application for form management with MariaDB backend.

Features

✨ Core Features

  • Form Management System
    • Contact Form Submissions
    • Email Subscription Management
    • Status Tracking
    • Validation
  • RESTful API
    • OpenAPI/Swagger Documentation
    • Versioned Endpoints (v1)
    • Standardized Response Format
  • Modern UI
    • Server-side Rendering
    • Dark Mode Support
    • Responsive Design
  • MariaDB Database
    • Connection Pooling
    • Migration System

šŸ› ļø Technical Features

  • Clean Architecture
    • Domain-Driven Design
    • Separation of Concerns
    • SOLID Principles
  • Dependency Injection (Uber FX)
  • Structured Logging (Zap)
  • Comprehensive Testing
    • Unit Tests
    • Mock Implementations
    • Test Utilities
  • Task Automation
  • Docker Development

Architecture

The project follows Clean Architecture principles with clear separation of concerns:

Core Domain Layer (/internal/core/)

Contains business logic and domain entities:

  • Domain Models and Interfaces
  • Business Rules and Validation
  • Use Cases and Services
  • No External Dependencies

Platform Layer (/internal/platform/)

Implements infrastructure and technical concerns:

  • Database Implementations
  • Server Configuration
  • Error Handling
  • External Integrations

Application Layer

/internal/
ā”œā”€ā”€ api/          - API endpoints and versioning
ā”œā”€ā”€ handlers/     - Request handlers
ā”œā”€ā”€ middleware/   - HTTP middleware
ā”œā”€ā”€ response/     - Response formatting
└── validation/   - Input validation

Infrastructure Layer

/internal/
ā”œā”€ā”€ app/          - Application bootstrapping
ā”œā”€ā”€ config/       - Configuration management
ā”œā”€ā”€ database/     - Database connections
ā”œā”€ā”€ logger/       - Logging infrastructure
└── web/         - Web server setup

Presentation Layer

/internal/
ā”œā”€ā”€ components/   - UI components
ā”œā”€ā”€ ui/          - UI logic
└── view/        - View templates

Dependencies

The project follows a strict dependency rule where dependencies point inward:

  • Core Domain: No external dependencies
  • Platform: Implements core interfaces
  • Application: Depends on core and platform
  • Infrastructure: Configures and connects components
  • Presentation: Consumes application services

Project Structure

/internal/
ā”œā”€ā”€ api/          - API endpoints and handlers
ā”œā”€ā”€ app/          - Application setup
ā”œā”€ā”€ components/   - UI components
ā”œā”€ā”€ config/       - Configuration
ā”œā”€ā”€ core/         - Business logic
ā”œā”€ā”€ database/     - Database layer
ā”œā”€ā”€ handlers/     - HTTP handlers
ā”œā”€ā”€ logger/       - Logging
ā”œā”€ā”€ middleware/   - HTTP middleware
ā”œā”€ā”€ models/       - Data models
ā”œā”€ā”€ platform/     - Platform code
ā”œā”€ā”€ response/     - API responses
ā”œā”€ā”€ ui/          - UI code
ā”œā”€ā”€ validation/   - Input validation
ā”œā”€ā”€ view/        - View templates
└── web/         - Web server

Quick Start

  1. Prerequisites:

    • Docker
    • VS Code with Dev Containers
    • Git
  2. Clone and Setup:

    git clone https://github.com/jonesrussell/goforms.git
    cd goforms
    code .
    
  3. Start Development:

    • Click "Reopen in Container" when prompted
    • Copy environment file: cp .env.example .env
    • Install dependencies: task install
    • Start server: task dev
  4. View the application at http://localhost:8090

Documentation

šŸ“š Comprehensive documentation is available in the docs directory:

Tech Stack

  • Go 1.23
  • MariaDB 10.11
  • Echo v4
  • Uber FX
  • Zap Logger
  • Task Runner

Contributing

We welcome contributions! Please see our Contributing Guide for details.

License

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