Skip to main content

Domain-Driven Design and Hexagonal Architecture for backend services

Project description

Forze

PyPI Python OpenSSF Scorecard

Forze is a lightweight infrastructure toolkit for building backend services with Domain-Driven Design (DDD) and Hexagonal Architecture.

It provides a set of reusable primitives, contracts, and structural patterns that help organize backend applications into clear, maintainable layers.

Design Goals

Forze aims to support backend systems that are:

  • Layered — clear separation between domain, application, and infrastructure
  • Explicit — well-defined ports, adapters, and boundaries
  • Testable — components can be tested in isolation
  • Composable — infrastructure pieces can be replaced or extended
  • Framework-agnostic — the core does not depend on a specific framework

The library focuses on providing structure and contracts, not a full-stack framework.

Quick Start

Install the core package:

uv add forze

Install with optional integrations:

uv add 'forze[fastapi,postgres,socketio]'

Documentation

Full documentation is available at https://morzecrew.github.io/forze/.

Agent Skills

Forze ships with AI agent skills that help assistants understand the framework's architecture, patterns, and conventions. Install them to improve code generation and refactoring when working with Forze.

Install:

npx skills add morzecrew/forze

Available skills:

Skill Description
forze-architecture Understand the Forze framework's DDD/hexagonal architecture, layer boundaries, and import constraints. Use when creating new modules, refactoring code, or reviewing architecture compliance.
forze-application-layer Work with Forze's application layer including usecases, middleware, CQRS, composition, execution context, and facades. Use when creating usecases, configuring middleware, or setting up document/storage/search operations.
forze-domain-modeling Create and work with Forze domain models including Document, CoreModel, BaseDTO, mixins, and update validators. Use when defining new entities, value objects, or domain logic.
forze-ports-and-adapters Work with Forze's ports (contracts), specs, dependency injection, and adapter patterns. Use when implementing new adapters, defining ports, configuring specs, or wiring dependencies.
forze-fastapi-integration Build HTTP APIs with Forze's FastAPI integration including routers, document routes, route features, error handling, and dependency injection. Use when creating API endpoints, configuring routers, or integrating Forze with FastAPI.

Versioning

Forze follows Semantic Versioning (SemVer). Pre-release builds may include experimental APIs and are not guaranteed to be stable.

Contributing

Contributions, issues, and feature requests are welcome. See CONTRIBUTING.md for details.

Security

Please report security vulnerabilities privately as described in SECURITY.md.

License

Forze is licensed under the MIT License - see LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

forze-0.1.13.tar.gz (404.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

forze-0.1.13-py3-none-any.whl (305.5 kB view details)

Uploaded Python 3

File details

Details for the file forze-0.1.13.tar.gz.

File metadata

  • Download URL: forze-0.1.13.tar.gz
  • Upload date:
  • Size: 404.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for forze-0.1.13.tar.gz
Algorithm Hash digest
SHA256 b7708c8b6b6e05612ecf22ee70b7b08a12bd4d5daa55005138c11c3a26bb24b2
MD5 4fa2c5b3a8ffc869ec465ee0bfa463ae
BLAKE2b-256 b5bfadd4fe8af36a1d53ae4634e7c041924593d124e6f69f85a7f43ae7ba0372

See more details on using hashes here.

Provenance

The following attestation bundles were made for forze-0.1.13.tar.gz:

Publisher: release.yaml on morzecrew/forze

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file forze-0.1.13-py3-none-any.whl.

File metadata

  • Download URL: forze-0.1.13-py3-none-any.whl
  • Upload date:
  • Size: 305.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for forze-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 7e50b850833cadb3f821f121ef89c12c6714a7fa6b53111e3e0db0ebbdc2bc2f
MD5 7fef4a4f2bf8abd6758d17f240aa0ce4
BLAKE2b-256 198c6401484c50a239df4d8f6841d603b525e0d1d1e3f362f9efbcd60b33d535

See more details on using hashes here.

Provenance

The following attestation bundles were made for forze-0.1.13-py3-none-any.whl:

Publisher: release.yaml on morzecrew/forze

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page