Skip to content

basilex/promenade

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

557 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Promenade

Go Version PostgreSQL Tests License DDD

Modern Enterprise Resource Planning (ERP) system built with Domain-Driven Design

Replace multiple SaaS tools with one modular platform: CRM, Orders, Inventory, Billing, Accounting, and Fiscal compliance β€” designed for Ukrainian and European SMB market.


πŸ“Š Business Capabilities

Customer Relationship Management (CRM)

Manage your entire sales pipeline from lead to customer, track interactions, and grow your business.

  • Customer Management β€” Companies, contacts, segmentation, lifecycle tracking
  • Deal Pipeline β€” Sales opportunities, stages, probability scoring, forecasting
  • Interaction History β€” Calls, meetings, emails, notes with full audit trail
  • Sales Analytics β€” Revenue reports, conversion metrics, team performance

🎯 For: Sales teams, account managers, customer success
πŸ“š Documentation: Customer Management Context

Order Management & Fulfillment

Process orders efficiently with automated workflows, real-time tracking, and fulfillment orchestration.

  • Order Processing β€” Multi-channel orders, complex pricing, promotions
  • Fulfillment Workflows β€” Automated state machines: pending β†’ confirmed β†’ processing β†’ fulfilled
  • Saga Orchestration β€” Coordinate inventory, billing, and fiscal operations
  • Order Analytics β€” Sales metrics, fulfillment KPIs, bottleneck detection

🎯 For: E-commerce, B2B distributors, service businesses
πŸ“š Documentation: Order Management Context

Warehouse & Inventory

Track inventory across multiple locations with real-time visibility and automated stock management.

  • Multi-Warehouse β€” Unlimited locations with hierarchical organization
  • Product Catalog β€” SKU management, categories, variants, pricing
  • Stock Movements β€” Receipts, reservations, transfers, adjustments with full audit
  • Low Stock Alerts β€” Automated reorder points, stock forecasting

🎯 For: Retailers, distributors, manufacturers
πŸ“š Documentation: Warehouse Context

Billing & Invoicing

Generate invoices, track payments, and manage recurring billing with automatic subscription handling.

  • Invoice Generation β€” Automatic from orders, manual creation, templates
  • Payment Tracking β€” Multiple payment methods, partial payments, refunds
  • Recurring Billing β€” Subscriptions, trials, plan upgrades, automatic renewals
  • Payment Analytics β€” Cash flow, aging reports, revenue recognition

🎯 For: SaaS companies, subscription businesses, B2B services
πŸ“š Documentation: Billing Context

Accounting & Finance

Complete financial management with chart of accounts, journal entries, and financial reporting.

  • Chart of Accounts β€” Flexible account hierarchy, multi-currency support
  • Journal Entries β€” Double-entry bookkeeping, automatic posting, audit trail
  • Cost Centers & Budgets β€” Department tracking, budget planning, variance analysis
  • Financial Reports β€” Balance sheet, P&L, cash flow, custom reports

🎯 For: Finance teams, accountants, CFOs
πŸ“š Documentation: Accounting Context

Banking Integration

Connect to bank accounts, import transactions, and automate reconciliation.

  • Bank Accounts β€” Multiple accounts per organization, multi-currency
  • Transaction Import β€” Bank statement parsing, automatic categorization
  • Reconciliation β€” Match transactions with invoices and payments
  • Cash Management β€” Cash position, forecast, treasury operations

🎯 For: Finance teams, treasury management
πŸ“š Documentation: Banking Context

Fiscal Compliance (Ukraine/EU)

Built-in integration with Ukrainian tax authorities and ПРРО (fiscal cash registers).

  • Checkbox Integration β€” Automatic receipt generation, fiscal reporting
  • ПРРО Support β€” Cash register operations, Z-reports, fiscal documents
  • Tax Compliance β€” VAT tracking, tax reports, electronic submission
  • Audit Trail β€” Complete transaction history for tax audits

🎯 For: Ukrainian businesses, tax compliance officers
πŸ“š Documentation: Fiscal Context

Identity & Access Management

Enterprise-grade user management with role-based access control.

  • User Management β€” Users, contacts, profiles, multi-organization support
  • Authentication β€” JWT-based, secure password hashing (Argon2id), MFA-ready
  • Authorization β€” Role-based access control (RBAC), permissions, API keys
  • Audit Logging β€” User actions, security events, compliance tracking

🎯 For: IT administrators, security teams
πŸ“š Documentation: Identity Context


🎯 Who Is This For?

🏒 Small & Medium Businesses (SMB)

Replace expensive ERP systems (SAP, 1C, Bitrix24) with flexible, cost-effective solution:

  • E-commerce stores β€” Integrate with online shops, manage inventory, automate fulfillment
  • B2B distributors β€” Handle complex pricing, track customer relationships, manage warehouses
  • Service businesses β€” Manage projects, track time, invoice clients, recurring billing

Business Value: Market Analysis & ROI

πŸ’» Software Development Companies

Build custom business solutions on proven foundation:

  • SaaS platforms β€” Use as backend for vertical SaaS products
  • Custom ERP β€” Extend with industry-specific modules
  • Integration projects β€” Connect existing systems via event-driven architecture

Technical Details: Architecture Overview

πŸ‡ΊπŸ‡¦ Ukrainian Market Focus

Purpose-built for Ukrainian business requirements:

  • Fiscal compliance β€” ПРРО, Checkbox, tax reporting
  • Local banking β€” Monobank, PrivatBank integration (roadmap)
  • Language support β€” Ukrainian, Russian, English interfaces
  • Market opportunity: $45M+ TAM, 180K+ potential customers

Market Strategy: Ukraine Market Analysis


πŸš€ Quick Start

Get Promenade running in 5 minutes:

Prerequisites

3-Command Start

# 1. Clone repository
git clone https://github.com/basilex/promenade.git
cd promenade

# 2. Start PostgreSQL and run migrations
make docker-up
make migrate

# 3. Start API server
make dev

πŸŽ‰ That's it! Server is running at http://localhost:8081

Verify Installation

# Health check
curl http://localhost:8081/health

# API documentation (Swagger UI)
open http://localhost:8081/api/docs/index.html

What's Next?


πŸ—οΈ Architecture

Domain-Driven Design Foundation

Promenade is built on strict DDD principles with 8 bounded contexts that communicate only via events:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        Event Bus                            β”‚
β”‚            (Async communication layer)                      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
     β”‚        β”‚        β”‚        β”‚        β”‚        β”‚        β”‚
     β–Ό        β–Ό        β–Ό        β–Ό        β–Ό        β–Ό        β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚Identity β”‚Customer β”‚  Order  β”‚ Billing β”‚Warehouseβ”‚ Fiscal  β”‚Accountingβ”‚
β”‚         β”‚  Mgmt   β”‚  Mgmt   β”‚         β”‚         β”‚         β”‚  & Bank  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
   Own DB    Own DB    Own DB    Own DB    Own DB    Own DB    Own DB

Core Principles

  1. Bounded Context Autonomy

    • Each context owns its domain model, database schema, and business logic
    • No shared database tables between contexts
    • Independent deployment and scaling
  2. No Cross-Context Imports

    • Contexts communicate only through Event Bus
    • No direct Go imports between contexts
    • Uses Anti-Corruption Layer (ACL) for integration
  3. Clean Architecture Layers

    • Domain Layer β€” Aggregates, entities, value objects, business rules
    • Application Layer β€” Use cases, orchestration, transaction boundaries
    • Infrastructure Layer β€” Database, HTTP, event handlers
    • Presentation Layer β€” DTOs, HTTP handlers, API routes
  4. Event-Driven Integration

    • Domain events published after state changes
    • Asynchronous processing with guaranteed delivery
    • Saga pattern for distributed transactions

πŸ“š Learn More:

Technology Stack

Backend Core:

  • Language: Go 1.24 β€” Performance, concurrency, type safety
  • Database: PostgreSQL 16+ β€” ACID compliance, JSON support
  • HTTP: Gin framework β€” High performance, middleware ecosystem
  • Auth: JWT (RS256) β€” Stateless, secure, scalable

Infrastructure:

  • Event Bus: In-memory (dev), Redis (production) β€” 377K events/sec
  • Cache: Redis β€” Session storage, rate limiting
  • Migrations: Custom manager β€” Multi-namespace, rollback support
  • Monitoring: Health checks, metrics, structured logging

Development:

  • Testing: 4-tier strategy β€” Unit, smoke, integration, benchmarks
  • API Docs: Swagger/OpenAPI 3.0 β€” Interactive documentation
  • Git Hooks: Pre-commit linting, pre-push testing
  • CI/CD: GitHub Actions β€” Automated testing, deployment

πŸ“š Learn More:


πŸ“‚ Project Structure

promenade/
β”œβ”€β”€ cmd/                          # Application entry points
β”‚   β”œβ”€β”€ api/                      # HTTP API server
β”‚   β”‚   β”œβ”€β”€ main.go              # Entry point
β”‚   β”‚   β”œβ”€β”€ bootstrap.go         # Infrastructure setup
β”‚   β”‚   β”œβ”€β”€ dependencies.go      # Custom DI container
β”‚   β”‚   └── server.go            # HTTP routing
β”‚   β”œβ”€β”€ migrate/                 # Migration runner
β”‚   └── seed/                    # Test data seeder
β”‚
β”œβ”€β”€ internal/                     # Private application code
β”‚   β”œβ”€β”€ contexts/                # Bounded contexts (DDD)
β”‚   β”‚   β”œβ”€β”€ identity/           # Users, auth, permissions
β”‚   β”‚   β”œβ”€β”€ customer-mgmt/      # CRM, deals, interactions
β”‚   β”‚   β”œβ”€β”€ order-mgmt/         # Orders, fulfillment
β”‚   β”‚   β”œβ”€β”€ billing/            # Invoices, payments
β”‚   β”‚   β”œβ”€β”€ warehouse/          # Inventory, products
β”‚   β”‚   β”œβ”€β”€ fiscal/             # Cash registers, receipts
β”‚   β”‚   β”œβ”€β”€ accounting/         # Chart of accounts, journals
β”‚   β”‚   └── banking/            # Bank accounts, reconciliation
β”‚   └── infrastructure/         # Cross-cutting concerns
β”‚       β”œβ”€β”€ database/           # Connection, transactions
β”‚       β”œβ”€β”€ auth/               # JWT, password hashing
β”‚       └── http/               # Middleware, responses
β”‚
β”œβ”€β”€ pkg/                         # Reusable packages
β”‚   β”œβ”€β”€ bus/                    # Event Bus (377K events/sec)
β”‚   β”œβ”€β”€ aggregate/              # Base aggregate, change tracking
β”‚   β”œβ”€β”€ jsonstore/              # Type-safe JSON fields
β”‚   β”œβ”€β”€ uuidv7/                 # Time-ordered UUIDs
β”‚   └── middleware/             # Auth, CORS, rate limiting
β”‚
β”œβ”€β”€ migrations/                  # Database migrations
β”‚   └── postgres/               # PostgreSQL migrations
β”‚       β”œβ”€β”€ core/               # System tables
β”‚       β”œβ”€β”€ identity/           # Identity context
β”‚       β”œβ”€β”€ customer-mgmt/      # Customer management
β”‚       └── .../                # Other contexts
β”‚
β”œβ”€β”€ test/                        # Test suites
β”‚   β”œβ”€β”€ integration/            # Full workflow tests
β”‚   β”œβ”€β”€ smoke/                  # Fast CRUD checks
β”‚   └── benchmark/              # Performance tests
β”‚
β”œβ”€β”€ docs/                        # Documentation
β”‚   β”œβ”€β”€ business/               # Business overviews (8 languages)
β”‚   β”œβ”€β”€ concepts/               # Architecture concepts
β”‚   β”œβ”€β”€ guides/                 # Development guides
β”‚   β”œβ”€β”€ deployment/             # Kubernetes, AWS, Docker
β”‚   └── adr/                    # Architecture Decision Records
β”‚
└── config/                      # Configuration files
    β”œβ”€β”€ app.postgres-dev.yaml   # PostgreSQL development
    β”œβ”€β”€ app.postgres-prod.yaml  # PostgreSQL production
    └── .../                     # Other configs

Each Bounded Context follows clean architecture:

internal/contexts/{context}/
β”œβ”€β”€ {aggregate}/              # Domain subdomain
β”‚   β”œβ”€β”€ aggregate/           # Domain entities & business logic
β”‚   β”œβ”€β”€ repository/          # Repository interface
β”‚   β”œβ”€β”€ usecase/             # Application use cases
β”‚   β”œβ”€β”€ adapter/
β”‚   β”‚   β”œβ”€β”€ repository/
β”‚   β”‚   β”‚   └── postgres/    # PostgreSQL implementation
β”‚   β”‚   └── http/            # HTTP handlers
β”‚   β”œβ”€β”€ dto/                 # Data Transfer Objects
β”‚   └── errors.go            # Domain error constants
└── README.md                 # Context documentation

πŸ“š Learn More: Context Structure Guide


πŸ§ͺ Testing Strategy

Promenade uses 4-tier testing approach for comprehensive quality assurance:

Test Pyramid

Level Count Speed Database Purpose
Unit 200+ < 1s ❌ Mock Business logic, pure functions
Smoke 26 < 5s βœ… Real Basic CRUD, fast feedback loop
Integration 29 ~30s βœ… Real Full workflows, cross-aggregate
Benchmark 15+ < 10s ⚑ Memory Performance, regression detection

Run Tests

# All tests (recommended before commit)
make test

# Individual test levels
make test-unit           # Unit tests only (fast)
make test-smoke          # Smoke tests (basic CRUD)
make test-integration    # Integration tests (full workflows)
make test-benchmark      # Performance benchmarks

# Pre-push validation (lint + all tests + build)
make pre-push

# Specific package
go test ./internal/contexts/customer-mgmt/...
go test ./pkg/bus/... -bench=.

Current Test Status

βœ… All tests passing

  • Unit: 200+ tests, 100% passing
  • Smoke: 26/26 contexts, < 5s runtime
  • Integration: 29/29 tests, full database workflows
  • Benchmarks: Event Bus 377K events/sec, UUID 100M/sec

Test Best Practices

  • Unit tests β€” Next to source files (*_test.go)
  • Smoke tests β€” Mirror structure in test/smoke/contexts/
  • Integration tests β€” Group by context in test/integration/contexts/
  • Coverage target β€” 80%+ for critical business logic

πŸ“š Learn More: Complete Testing Guide


πŸ“š Documentation

Business Documentation

For Decision Makers & Stakeholders

  • Business Overview β€” Platform capabilities, market opportunity, ROI
    • Available in: πŸ‡¬πŸ‡§ English, πŸ‡ΊπŸ‡¦ Ukrainian, πŸ‡ͺπŸ‡Έ Spanish, πŸ‡©πŸ‡ͺ German, πŸ‡«πŸ‡· French, πŸ‡΅πŸ‡Ή Portuguese, πŸ‡¨πŸ‡³ Chinese, πŸ‡―πŸ‡΅ Japanese
  • Ukraine Market Strategy β€” Market analysis, TAM $45M+, GTM strategy
  • Implementation Status β€” Feature completion, development roadmap
  • Deployment Options β€” Kubernetes, AWS, Docker Compose, monitoring

Developer Documentation

Getting Started

Architecture & Patterns

Development Guides

Architecture Decision Records

Bounded Context Documentation

Each context has detailed README with domain model, use cases, and API examples:

Package Documentation

Reusable packages with usage examples and benchmarks:

  • Event Bus β€” In-memory & Redis, 377K events/sec
  • Aggregates β€” Base aggregate, change tracking, Touch()
  • JSON Store β€” Type-safe JSONB fields
  • UUIDv7 β€” Time-ordered IDs, 100M/sec generation
  • Value Objects β€” Email, phone, money, address

API Examples


🀝 Contributing

We welcome contributions! Promenade follows strict code standards to maintain quality.

Before You Start

  1. Read CONTRIBUTING.md β€” Code standards, PR process
  2. Set up git hooks: make setup-hooks β€” Automatic linting and testing
  3. Review Architecture Decision Records β€” Understand design choices

Development Workflow

# 1. Create feature branch
git checkout -b feature/your-feature-name

# 2. Make changes and test
make test              # Run all tests
make lint              # Check code style

# 3. Pre-push validation (automatic via git hook)
make pre-push          # Lint + tests + build

# 4. Commit and push
git add .
git commit -m "feat: add amazing feature"
git push origin feature/your-feature-name

Code Standards

  • Go β€” Follow Effective Go and project conventions
  • DDD β€” Respect bounded context boundaries, no cross-context imports
  • Testing β€” Add tests for new features (smoke + integration)
  • Documentation β€” Update README and context docs for public APIs
  • Commits β€” Follow Conventional Commits

What to Contribute

High-Priority Areas:

  • πŸ”Œ Integrations β€” Payment gateways, shipping providers, accounting systems
  • 🌍 Localization β€” UI translations, fiscal compliance for other countries
  • πŸ“Š Analytics β€” Reports, dashboards, data visualization
  • πŸ”’ Security β€” Audit, penetration testing, security hardening
  • πŸ“± Clients β€” SDKs for popular languages (Python, PHP, JavaScript)

Good First Issues: Check GitHub Issues


πŸ“‹ Roadmap

βœ… Completed (v0.1.0 - Current)

  • βœ… 8 bounded contexts with clean architecture
  • βœ… Customer Management (CRM)
  • βœ… Order Management with fulfillment workflows
  • βœ… Warehouse & Inventory
  • βœ… Billing & Invoicing
  • βœ… Accounting (Chart of Accounts, Journal Entries)
  • βœ… Banking Integration
  • βœ… Fiscal Compliance (ПРРО, Checkbox)
  • βœ… Event-driven architecture (377K events/sec)
  • βœ… Comprehensive test coverage (200+ tests)
  • βœ… API documentation (Swagger/OpenAPI)

πŸ”„ In Progress (v0.2.0 - Q1 2026)

  • πŸ”„ Multi-tenancy β€” Organization isolation, data partitioning
  • πŸ”„ Frontend β€” Next.js admin panel, Flutter mobile app
  • πŸ”„ Advanced Analytics β€” BI dashboards, custom reports
  • πŸ”„ Monobank Integration β€” Bank statement import, automatic reconciliation
  • πŸ”„ Email/SMS β€” Transactional notifications, marketing campaigns

🎯 Planned (v0.3.0+ - 2026)

  • πŸ“… CRM Enhancements β€” Marketing automation, lead scoring, pipeline analytics
  • πŸ“… Advanced Billing β€” Usage-based pricing, revenue recognition, dunning
  • πŸ“… Procurement β€” Purchase orders, supplier management, receiving
  • πŸ“… Manufacturing β€” Bill of materials, production orders, shop floor tracking
  • πŸ“… Project Management β€” Projects, tasks, time tracking, resource planning
  • πŸ“… HR Module β€” Employees, payroll, attendance, leave management
  • πŸ“… Mobile Apps β€” iOS/Android native apps with offline support
  • πŸ“… AI/ML β€” Demand forecasting, churn prediction, smart recommendations

πŸ“š Full Roadmap: Project Roadmap


πŸ“„ License & Commercial Offerings

Core Backend (This Repository)

MIT License β€” See LICENSE file for details.

The core Promenade backend API (v0.1.0-dev) is free and open source:

  • βœ… Backend API with 11 bounded contexts
  • βœ… PostgreSQL database layer (pgx driver)
  • βœ… Event-driven architecture
  • βœ… Complete documentation and tests
  • βœ… Free for commercial and non-commercial use
  • βœ… Self-hosted deployment

Commercial Modules (Private Repositories)

Advanced features are available under commercial licenses in separate private repositories:

🎨 Promenade UI (promenade-ui - private repository)

  • Next.js Admin Panel with modern UI/UX
  • Flutter Mobile App (iOS/Android)
  • Design system and component library
  • White-label customization
  • License: Proprietary, paid subscription required

🏒 Promenade Enterprise (promenade-enterprise - private repository)

  • Multi-tenancy and organization isolation
  • Advanced analytics and BI dashboards
  • Bank integrations (Monobank, PrivatBank, etc.)
  • Advanced billing and subscription management
  • Email/SMS notifications
  • Priority support and SLA
  • License: Proprietary, enterprise agreement required

Pricing

Community (Free)

  • Core backend API (this repo)
  • Self-hosted
  • Community support

Professional ($99/month)

  • Core backend API
  • UI/UX (web + mobile)
  • Up to 3 organizations
  • Email support

Enterprise (Custom)

  • Everything in Professional
  • Unlimited organizations
  • Advanced analytics
  • Bank integrations
  • Priority support
  • Custom development

Contact: alexander.vasilenko@gmail.com for commercial inquiries

Note: This open-core model ensures the core backend remains free and open source, while protecting commercial investments in UI/UX and enterprise features. Commercial modules are kept in private repositories to prevent unauthorized use.


πŸ™ Acknowledgments

Built with love using:

  • Go β€” Google's systems programming language
  • PostgreSQL β€” World's most advanced open source database
  • Gin β€” High-performance HTTP framework
  • Redis β€” In-memory data structure store
  • Swagger β€” API documentation and testing

Special thanks to the DDD community and all contributors!


πŸ“ž Support & Community


⭐ Star us on GitHub β€” it helps!

Documentation β€’ API Reference β€’ Contributing

Made with ❀️ for Ukrainian businesses

About

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors