Enterprise · C# .NET · Backend

CP Ryzen —
Shipping Management
System

How I built an enterprise-grade logistics platform from scratch — 318 commits, 205 unit tests, 80% code coverage, and a CI/CD pipeline that cut monthly costs by 95%.

Stack: C# · .NET · SQL Server · Entity Framework · GitHub Actions Duration: Multi-sprint, agile Role: Full-stack developer (sole contributor)
318
Commits
205
Unit Tests
80%
Code Coverage
95%
CI/CD Cost Cut

What is CP Ryzen?

CP Ryzen is a full-featured shipping and logistics management system built with C# and .NET. The system handles end-to-end operations across three core entities — customers, orders, and shipments — with role-based access, enterprise authentication, and a time-based licensing model.

The project was structured around 85+ user stories spanning 10 epics, developed using agile sprint cadences with Kanban board tracking. Every feature shipped was supported by unit tests — resulting in 205 tests maintaining 80% code coverage across the codebase.

The challenge

The brief called for an enterprise-grade system — not a student project. That meant real-world patterns: proper layered architecture, a secure authentication model, test coverage that would survive a code review, and a deployment pipeline that wouldn't rack up unnecessary cloud bills.

The hardest constraints weren't technical — they were discipline. Maintaining test coverage while shipping features quickly, designing an auth model that covered both SSO (SAML + OAuth 2.0) and time-based licensing, and keeping onboarding documentation good enough that a new developer could be productive in 15 minutes.

Why these technologies?

Every stack choice was deliberate — optimised for enterprise maintainability and NZ employer expectations.

🔷
C# & .NET Framework
Strongly typed, mature ecosystem, first-class enterprise adoption. Ideal for CRUD-heavy systems needing long-term maintainability.
Decision: Most NZ enterprise companies run .NET stacks — this is a direct hire-signal investment.
🗄️
SQL Server + Entity Framework
EF Core provides type-safe queries, migration management, and reduces boilerplate. SQL Server integrates natively with the .NET ecosystem.
Decision: ORM chosen over raw SQL to demonstrate modern data access patterns while keeping the query layer auditable.
⚙️
GitHub Actions CI/CD
Free tier, tight GitHub integration, YAML-based pipelines. Configured to run tests on every PR and build on merge to main.
Decision: Pipeline optimisation brought monthly minutes from ~100 down to ~10 — a 95% reduction.
🔐
SAML + OAuth 2.0 SSO
Dual-protocol SSO support covers both legacy enterprise SAML identity providers and modern OAuth 2.0 flows.
Decision: Supporting both standards future-proofs the system against enterprise client identity provider variation.
🧪
xUnit + Moq
Industry-standard .NET testing stack. xUnit for test runners, Moq for dependency injection mocking across service and repository layers.
Decision: 205 tests across all layers — not just happy-path — targeting real production failure modes.
📦
Layered Architecture
Controller → Service → Repository separation enforces single-responsibility, makes unit testing easy, and matches what NZ employers expect to see.
Decision: Architecture documented explicitly so any dev can understand the codebase in 15 minutes.

What it does

85+ user stories across 10 epics, covering the full logistics lifecycle.

  • Full CRUD for customers, orders, and shipments with validation and error handling
  • SSO via SAML and OAuth 2.0 — compatible with enterprise identity providers
  • Time-based software licensing system with expiry enforcement and renewal flow
  • Code obfuscation applied to the licensing module for IP protection
  • 205 unit tests covering service, repository, and controller layers
  • GitHub Actions pipeline — test on PR, build on merge, auto-deploy on release
  • Kanban-tracked sprints with defined acceptance criteria per story
  • Architecture documentation enabling 15-minute developer onboarding

What was hard

CI/CD pipeline cost was unsustainable

Early pipeline builds were running the full test suite on every event without caching, resulting in ~100 billable GitHub Actions minutes per month. Free tier limits would be exhausted quickly at that rate, and the slow feedback loop was affecting development velocity.

Solution

Restructured the pipeline: dependency caching with actions/cache, path-based triggers to skip irrelevant runs, and parallelised test jobs. Reduced billable minutes from ~100 to ~10 per month — a 95% cost reduction — while improving feedback speed.

Designing a dual-protocol SSO system

Supporting both SAML (legacy enterprise) and OAuth 2.0 (modern cloud) from a single auth layer required careful abstraction. Hardcoding either protocol would break the other. The authentication flow needed to be protocol-agnostic at the application level.

Solution

Implemented an authentication interface with protocol-specific adapters injected at startup. The application layer calls the interface — never the concrete implementation — so adding a third protocol in future requires no application changes.

Keeping test coverage at 80% while shipping fast

Shipping features quickly creates a natural tension with maintaining test coverage. Coverage tends to erode sprint-over-sprint unless tests are treated as first-class deliverables, not afterthoughts. The risk was "coverage debt" that becomes expensive to repay.

Solution

Adopted a test-with-the-feature discipline: no user story is marked Done without passing tests for the new code path. The CI pipeline enforces a coverage gate — builds fail below the threshold, preventing any regression from being merged unnoticed.

Building a licensing system without exposing the logic

A time-based license system needs to verify expiry, handle renewals, and enforce access restrictions — while keeping the enforcement logic opaque enough that it isn't trivially bypassed by inspecting the binary.

Solution

Isolated the licensing logic into a dedicated module and applied code obfuscation to the compiled output. License keys are validated server-side against a time-limited signature, with client-side checks as a secondary layer.

Measurable outcomes

Quantified impact across pipeline efficiency, test quality, and developer experience.

Code Coverage80%
User Stories Completed85+ / 10 epics
CI/CD Cost Reduction95%
Developer Onboarding Time≤ 15 minutes
318
commits — disciplined, atomic history
205
unit tests across all layers
10
epics fully documented & tracked
~10
CI/CD minutes/month (down from 100)

What I took away

01
Tests are a design tool, not a checkbox
Writing tests before or alongside features forced cleaner interfaces. If something was hard to test, it was usually too tightly coupled — the tests revealed design problems early.
02
Pipeline efficiency compounds over time
The 95% CI/CD cost reduction took one focused day of work but saves every future sprint. Investing in tooling pays recurring dividends — infrastructure is worth the upfront cost.
03
Documentation is part of the product
The 15-minute onboarding target was a forcing function for good architecture docs. Writing for a new developer clarified my own understanding — you only truly know something if you can explain it simply.
04
Abstraction enables future flexibility
The auth adapter pattern cost extra upfront but made the dual SAML/OAuth SSO clean to implement. The right abstraction in the right place removes entire categories of future problems.

Interested in working together?

I'm looking for part-time junior developer or IT support roles in Auckland. Let's talk.