What is Archetypy Oprogramowania?
Archetypy Oprogramowania is a production-ready Java library that implements battle-tested software design patterns and archetypes. It provides a comprehensive set of modules for building robust enterprise business applications with proper domain modeling, type safety, and functional programming patterns.Built with Java 21 - Archetypy Oprogramowania leverages modern Java features including records, pattern matching, and sealed types for clean, maintainable code.
Why Use Archetypy Oprogramowania?
Building enterprise business applications requires solving common problems repeatedly. Archetypy Oprogramowania provides proven solutions:Battle-Tested Patterns
Implementations based on industry-standard archetypes from Martin Fowler’s Analysis Patterns and other proven sources
Type-Safe Domain Modeling
Leverage Java’s type system with Money, Quantity, Result monad, and strongly-typed identifiers
Functional Error Handling
Elegant error handling with Result monad - no null pointers, no unchecked exceptions
Modular Architecture
Use only the modules you need - from accounting to ordering to inventory management
Core Modules
Archetypy Oprogramowania consists of 11 specialized modules:Foundation Modules
Common
Common
Core utilities used across all modules:
- Result monad for functional error handling
- Preconditions for runtime validation
- Event system for domain events
- Versioning support
Quantity
Quantity
Type-safe measurements and monetary values:
- Quantity type with unit conversions
- Money type with proper currency handling
- Unit abstraction for measurements
- Integration with JavaMoney (JSR 354)
Business Modules
Accounting
Accounting
Full double-entry accounting system:
- Chart of accounts management
- Transaction processing with proper debits/credits
- Account balances and projections
- Transaction reversal support
Pricing
Pricing
Sophisticated pricing engine:
- Multiple calculator types (fixed, percentage, tiered)
- Parameter-based pricing
- Price interpretation modes
- Pricing composition and strategies
Product
Product
Product catalog management:
- Product definitions with constraints
- Batch management and tracking
- Product categorization
- Feature-based product modeling
Party
Party
Organization and party management:
- Address management with lifecycle
- Party capabilities and roles
- Contact information tracking
- Party relationship modeling
Inventory
Inventory
Comprehensive inventory management:
- Product instance tracking (serial numbers, batches)
- Resource-based availability
- Temporal and pool-based inventory
- Lock and reservation support
Ordering
Ordering
Complete order processing system:
- Order lifecycle management (draft → confirmed → fulfilled)
- Multi-party orders with roles
- Line-level specifications and pricing
- Integration with inventory, payment, and fulfillment
Advanced Modules
Graphs
Graphs
Graph algorithms and data structures:
- Cycle detection
- Influence analysis
- Scheduling algorithms
- User journey modeling
Rules
Rules
Rule engine and scoring:
- Logical predicates with composition
- Event-based rule engine
- Scoring algebra (simple, fuzzy, explainable)
- Discount rule chains
Plan vs Execution
Plan vs Execution
Planning and execution tracking:
- Plan definitions
- Execution monitoring
- Variance analysis
- Resolution mismatch detection
Design Philosophy
Archetypy Oprogramowania follows these core principles:Domain-Driven Design
Rich domain models with behavior, not anemic data structures. Entities and value objects properly modeled.
Functional Programming Patterns
Immutable data structures where appropriate, Result monad for error handling, pure functions for calculations.
Type Safety
Strong typing for domain concepts - Money vs double, OrderId vs String, proper units for quantities.
Example Use Cases
Archetypy Oprogramowania is suitable for:- E-commerce platforms - Order processing, inventory, pricing
- ERP systems - Accounting, party management, product catalogs
- Booking systems - Temporal inventory, reservations, scheduling
- Financial applications - Double-entry accounting, money handling
- Supply chain systems - Inventory tracking, batch management
License
Authors
Archetypy Oprogramowania is maintained by:- Bartłomiej Słota
- Jakub Pilimon
- Sławomir Sobótka
Next Steps
Installation
Learn how to add Archetypy Oprogramowania to your Maven project
Quickstart
Build your first order processing application in 5 minutes
Core Concepts
Understand the architectural patterns and design decisions
API Reference
Explore the complete API documentation
