Automates the generation of type-safe, native API client layers for mobile applications.
1.0K
Visit https://docs.3squaredcircles.com for a deep dive into configuration.
Feedback welcomed at https://www.linkedin.com/company/3-squared-circles/
The Self-Writing API Client for Mobile.
3SC Pactum is a CI/CD-native tool that automates the generation of type-safe, native API client layers for mobile applications (iOS and Android). It performs a deep static analysis of your backend source code (e.g., .NET, Java, Go) to discover data transfer objects (DTOs) and generates corresponding native models (e.g., Swift structs, Kotlin data classes) and the boilerplate code required to serialize them.
Pactum eliminates one of the most tedious, error-prone, and time-consuming tasks in mobile development: manually writing and maintaining API client code that perfectly mirrors the backend.
Pactum is the Latin word for "agreement," "contract," or "pact." This name was chosen because the tool transforms the implicit, trust-based understanding between backend and mobile teams into an explicit, verifiable, and machine-enforced contract. It ensures both sides adhere to the same data agreement.
As a leader responsible for delivering high-quality mobile applications on schedule, you need to minimize friction between your backend and mobile teams. Data contract mismatches are a common source of bugs, delays, and wasted developer hours. Pactum automates and governs this entire synchronization process.
Pactum answers your critical questions:
decodingError.dataCorrupted crashes, and other common issues caused by manual data contract drift.interactive UI provides a central "Governance Hub" for architects and leads to define exactly which backend types are exposed to mobile and how they are mapped.pactum/config.json file becomes the version-controlled source of truth for the mobile data contract. Mobile developers simply git pull to receive the latest, type-safe client, eliminating miscommunications.Pactum creates a seamless, "define in UI, run in CI" workflow that separates the concerns of backend development, architectural governance, and mobile development.
interactive mode. This launches a local web UI—the Governance Hub.
System.DateTime -> Date) and can override names and types for specific properties.pactum/config.json file, and commits it.execute mode): The CI/CD pipeline runs Pactum's execute command, which reads the config file, regenerates the native Swift and Kotlin client code, and commits it back to the repository.git pull to receive the latest, type-safe API client layer.As an operator, you require tools that are secure, automatable, and consistent. Pactum is a containerized, self-hosted application designed for safe and seamless integration into any CI/CD pipeline.
execute The primary CI mode. It reads a checked-in pactum/config.json file, generates the native mobile client files, and commits them back to the repository.interactive: Starts the local web-based "Governance Hub" UI used to create and manage the pactum/config.json file.serve-docs: Starts a lightweight server to display embedded tool documentation.Verifying Image Signatures All published images are signed with Cosign. To verify:
Install cosign: https://docs.sigstore.dev/cosign/system_config/installation/ Download our public key: curl -O https://www.3squaredsquaredcircles.com/keys/3squaredcircles.pub Verify: cosign verify --key 3squaredcircles.pub 3squaredcircles/pactum:latest
Content type
Image
Digest
sha256:cd2555e7c…
Size
348.5 MB
Last updated
6 months ago
docker pull 3squaredcircles/pactum