Skip to main content

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

Core utilities used across all modules:
  • Result monad for functional error handling
  • Preconditions for runtime validation
  • Event system for domain events
  • Versioning support
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

Full double-entry accounting system:
  • Chart of accounts management
  • Transaction processing with proper debits/credits
  • Account balances and projections
  • Transaction reversal support
Sophisticated pricing engine:
  • Multiple calculator types (fixed, percentage, tiered)
  • Parameter-based pricing
  • Price interpretation modes
  • Pricing composition and strategies
Product catalog management:
  • Product definitions with constraints
  • Batch management and tracking
  • Product categorization
  • Feature-based product modeling
Organization and party management:
  • Address management with lifecycle
  • Party capabilities and roles
  • Contact information tracking
  • Party relationship modeling
Comprehensive inventory management:
  • Product instance tracking (serial numbers, batches)
  • Resource-based availability
  • Temporal and pool-based inventory
  • Lock and reservation support
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

Graph algorithms and data structures:
  • Cycle detection
  • Influence analysis
  • Scheduling algorithms
  • User journey modeling
Rule engine and scoring:
  • Logical predicates with composition
  • Event-based rule engine
  • Scoring algebra (simple, fuzzy, explainable)
  • Discount rule chains
Planning and execution tracking:
  • Plan definitions
  • Execution monitoring
  • Variance analysis
  • Resolution mismatch detection

Design Philosophy

Archetypy Oprogramowania follows these core principles:
1

Domain-Driven Design

Rich domain models with behavior, not anemic data structures. Entities and value objects properly modeled.
2

Functional Programming Patterns

Immutable data structures where appropriate, Result monad for error handling, pure functions for calculations.
3

Type Safety

Strong typing for domain concepts - Money vs double, OrderId vs String, proper units for quantities.
4

Testability

Clean separation of concerns, dependency injection support, comprehensive test coverage included.

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

Archetypy Oprogramowania is licensed under CC BY-NC-SA 4.0 (Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International).
  • ✅ Free for learning and non-commercial projects
  • ❌ Commercial use requires permission from the authors
See the LICENSE file for details.

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

Build docs developers (and LLMs) love