Case study · Full-stack · Oct 25 – Nov 15, 2026
Yüküm — a freight marketplace
Shippers post loads, carriers bid on them, the shipper picks an offer and the job is tracked until delivery and rated. I wrote the native SwiftUI app; the .NET 10 Web API and SQL Server database were built with a multi-agent AI setup under my direction.
01 — Why
A real problem from home
My family farms in Mersin. When we ship agricultural supplies, a carrier from Ankara may quote 8–10 for a trip that costs 5: if he can't find a load for the way back he drives home empty, so that risk is priced in. Carriers wait in markets for days looking for a return load. Yüküm puts both sides in one open marketplace — shippers get competing offers, carriers fill empty return trips.
02 — The brief
What I was asked to build — and what was delivered
The project started from a written brief by a senior engineer: a freight marketplace with a RESTful .NET backend, SQL Server and a SwiftUI client, built step by step with a report and a roadmap rather than "let the AI do it". Every line of that brief is mapped below.
| The brief asked for | How it was delivered | Status |
|---|---|---|
| RESTful Web API that iOS, Android and Web could all use | .NET 10 Web API, versioned /api/v1, OpenAPI 3.1 contract, client-agnostic JSON | Done |
| .NET 10 / .NET Core, MSSQL, VS Code | .NET 10 + EF Core 10 (LTS) · SQL Server 2025 in Docker · built in VS Code | Done |
| Login is checked in the API; on success it returns what the app needs as JSON | Identity + JWT; login returns access token, rotating refresh token and the user summary | Done |
| All CRUD in the API, returned as JSON; SwiftUI integrates | 65 endpoints, ProblemDetails errors, one decoding path on iOS | Done |
| Two user types with separate registrations that can't enter each other's screens/services | Separate sign-up endpoints and forms, role policies, an authorization-matrix test on every endpoint | Done |
| EF Core with the Repository pattern | Generic IRepository<T> + IUnitOfWork plus dedicated read repositories | Done |
| SwiftUI with the patterns current job ads ask for | Swift 6, @Observable MVVM, async/await, actors, protocol-based DI, Swift Testing + XCUITest | Done |
| One generic GET/POST/PUT method with request/response models, reusable everywhere | APIClient.send<Response>(method, path, query, body); every service is one function per endpoint | Done |
| Make it work first, then a good-looking design | MVP first (stages A–F), then a design system, dark mode and action animations | Done |
| Auto-login / remember me, the most robust way | Refresh token in Keychain, rotated on every use, stolen-token detection, silent restore on launch | Done |
| Login / register, post a load, list loads | Done for both roles | Done |
| Filter by location, "near me 5 km" (not a priority) | Radius filter + nearest-first sorting from district centroids; user location never stored | Done |
| Save loads as favourites | Favourites with live counts for the owner | Done |
| Mail or push after posting a load | Push for offers, decisions, job stages and reviews; e-mail used for verification and password reset | Partial |
| Track how many people viewed / bid (views first) | Unique daily views, favourites and offer counts on the owner's listing | Done |
| Bid page — the carrier sets the price | Bid with amount, vehicle and estimated delivery date | Done |
| Only the shipper can post a load | Enforced by role policy and tested (403 for carriers) | Done |
| Profiles show past agreed jobs on both sides | Active jobs, history and public profiles for both roles | Done |
| Filter / sort by price, location, reference price, destination | Price, destination, vehicle, date, weight, distance; reference price shown on the detail page | Done |
| City → district selection from a ready table + service | 81 provinces / 973 districts, verified and seeded, cached endpoints | Done |
| Push when a load is liked; push when an offer arrives | Offer push done (verified on a real iPhone); favourite push not yet | Partial |
| Rate the carrier after delivery, highlight by rating | 1–5 rating + comment after delivery; offers can be sorted by rating | Done |
| Carrier profile with average rating and past reviews | Done | Done |
| Optional: AI check for banned words | Not implemented (optional in the brief); report & block added instead | Not done |
| No "just let the AI do it": notes, report, roadmap, step-by-step | Technical report, step-by-step plan, 24 decision records, daily log, commented code | Done |
| Professional project and folder structure | Clean Architecture on the backend; documented iOS folder guides | Done |
03 — Features
Two roles, one product
Shipper
- Post a load: origin / destination (province → district), weight, vehicle type, pickup date, budget
- Compare offers with the carrier's rating, vehicle and promised delivery date; sort by 7 criteria; accept or reject
- Live counters (views, favourites, offers) and a market reference price for the route
- Track the job, chat, request mutual cancellation, rate the carrier
Carrier
- Browse open loads with route, budget, vehicle, date and weight filters, a "near me" radius and "fits my vehicles"
- Bid with a chosen vehicle and an estimated delivery date; favourite loads
- Manage vehicles (plate, make, model, year); advance the job stage
- Get every decision instantly through push notifications
Both roles: separate sign-up flows, auto-login, e-mail verification, forgot password, profile photo, public profiles, notification centre, report & block, account deletion.
04 — iOS
The SwiftUI app — where I spent most of my time
30 screens and 24 view models for two roles. Views only draw and forward taps; every decision lives in a view model, every request in a service, and every service goes through one client. Each folder starts with a guide file listing what is inside and which endpoint it calls.
Architecture
- MVVM with
@MainActor @Observableview models; views contain no networking or session code (audited) - Protocol-based DI:
init(service: OfferServicing = OfferService())— real by default, fakes in tests - Swift 6 strict concurrency,
async/await, structured tasks (polling chat stops when the view disappears) - Folders:
App · Design · Models (Auth, Listings, Offers, Networking, Security…) · ViewModels · Views
Networking & session
- One generic client for every endpoint; services are one function per endpoint
- Server errors (RFC 7807) decode once into
APIError— Turkish message + machine code (e.g.email_not_verifiedopens the code screen) - AuthSession actor: access token in memory, refresh token in Keychain, device-bound; five concurrent 401s → one refresh
- Silent restore on launch = remember me without storing the password
Platform features
- APNs push: permission after login, token per device, tap → deep link to the right list, badge sync
- CoreLocation "near me" radius — asked only when switched on, never stored
- PhotosPicker profile photo, resized to a 512 px JPEG on device before upload
- E-mail verification, forgot password with
.oneTimeCodeautofill, report & block (App Store 1.2)
Design & motion
- Design system:
Palette(light / dark / system), shared form components, loading states - Role-based action animations: shipper — a parcel gets taped / cut; carrier — a tyre track / unloading
- RealityKit login: one box falls with physics recorded once and replayed identically, then snapshotted to an image to save battery
- Accessibility identifiers drive 7 XCUITest flows (login, sign-up, forgot password, auto-login…)
Two pieces of the code
// One request method for every endpoint (Models/Networking/APIClient.swift) func send<Response: Decodable>(_ method: HTTPMethod = .get, _ path: String, query: [URLQueryItem] = [], body: (any Encodable)? = nil, authorized: Bool = true, fallback: String = "Bir hata oluştu.") async throws -> Response let offers: [CarrierOffer] = try await api.send(.get, "/api/v1/offers/mine") // Concurrent 401s share ONE refresh (Models/Networking/AuthSession.swift) actor AuthSession { private var refreshTask: Task<LoginResponse, Error>? func refresh() async throws -> LoginResponse { if let task = refreshTask { return try await task.value } // already refreshing → wait for it let task = Task { try await performRefresh() } refreshTask = task defer { refreshTask = nil } return try await task.value } }
05 — Architecture
Clean layers on both sides
iOS (SwiftUI) .NET 10 Web API
View ─► ViewModel ─► Service ─► APIClient ══HTTPS/JSON══► Controller ─► Handler ─► Repository / UoW ─► SQL Server
@Observable 1 fn = 1 endpoint (thin) (rules, (EF Core 10)
AuthSession actor ◄── refresh token rotation validation)
Keychain │
push ◄══ APNs (HTTP/2) ◄── PushWorker (BackgroundService) ◄── outbox ◄──┘
Dependency rule: Domain knows nothing; Application knows only Domain and declares interfaces;
Infrastructure implements them (EF Core, Identity, APNs, e-mail); Api wires everything together. Business rules are testable without a database.
One request, end to end — a carrier places a bid
- The detail screen calls
ListingDetailViewModel.submit(), which validates the form locally. OfferService.create()→APIClient.send(.post, "/api/v1/listings/{id}/offers")adds the Bearer token. On a 401 theAuthSessionactor refreshes once — even if five requests fail at the same moment — and retries.CreateOfferHandler: FluentValidation → is the listing open? → does the carrier own a complete vehicle? → is the delivery date within pickup + 90 days? → has either side blocked the other?- The offer and a notification row are saved in one transaction (outbox). A background worker sends the APNs push; tapping it deep-links the shipper to the offers screen.
- Any failure returns RFC 7807 ProblemDetails with a Turkish message, decoded in one place and shown to the user.
06 — Backend
.NET 10 Web API
| Topic | How | Why |
|---|---|---|
| Clean Architecture | Domain / Application / Infrastructure / Api + unit & integration test projects | Rules independent of DB and web framework |
| CQRS-lite | ICommandHandler / IQueryHandler, auto-registered; startup fails if a command has two handlers | Clear read/write split without MediatR (now commercially licensed) |
| EF Core 10 | Generic IRepository<T> + IUnitOfWork; dedicated read repositories where SQL matters | Repository pattern; filters compile to one SQL query |
| Entities | Central timestamps, soft-delete query filter, RowVersion optimistic concurrency | Two simultaneous accepts can't both win |
| Validation | FluentValidation with Turkish messages; one PasswordPolicy shared with Identity | Same rule everywhere, field-level errors |
| Auth | ASP.NET Identity (PBKDF2), JWT (15 min), rotating refresh token (30 days, hashed, device-bound, reuse revokes the family), lockout 10 → 5 min, rate limiting | Secure "remember me" |
| Search | Dynamic predicate, stable paging, price/date sorting, Haversine distance from district centroids | "Near me" without storing user location |
| Reference price | Median of completed jobs on the same route + vehicle, last 180 days, min 3 samples | One outlier can't mislead |
| Push | Outbox row in the same transaction → PushWorker → APNs HTTP/2 with an ES256 provider token | No lost notifications |
| 6-digit codes stored as SHA-256 hashes, 15 min, 5 attempts, 60 s cooldown; Resend in production | Verification & reset without account enumeration | |
| Contract | OpenAPI + Scalar UI, /api/v1, camelCase JSON, enums as strings, UTC ISO-8601 | The iOS client decodes one contract |
07 — Technology choices
Why these technologies
Before writing code I researched 2026 job postings and official docs (Microsoft Learn, Apple Developer) and wrote the decisions down in a technical report. The rule: no features beyond the brief — research only updated the technology choices.
| Topic | Choice | Why |
|---|---|---|
| Runtime | .NET 10 + EF Core 10 — both LTS (supported to Nov 2028) | Requested in the brief; long support window |
| Architecture | Clean Architecture + CQRS-lite (command/query handlers, feature folders) | Most backend job ads list both; keeps rules testable |
| Mediator / mapper | No MediatR, no AutoMapper — handlers via DI, mapping by hand | Both moved to commercial licences in 2025; knowing why I avoided them is part of the design |
| API docs | Built-in Microsoft.AspNetCore.OpenApi (OpenAPI 3.1) + Scalar UI | Templates dropped Swashbuckle since .NET 9 |
| Auth | JWT + rotating refresh tokens + role policies | What job ads ask for (JWT, RBAC); secure remember-me |
| Tests | xUnit + NSubstitute + Testcontainers (real SQL Server) | Integration tests that hit a real database, not an in-memory fake |
| Delivery | Dockerfile + docker-compose, GitHub Actions CI | One-command environment; every push builds and tests |
| iOS UI | SwiftUI (UIKit only if needed) | Baseline expectation in 2026 iOS job ads |
| iOS architecture | MVVM + protocol-based DI; VIPER/TCA compared but not used | VIPER is overkill for most apps, TCA is niche; MVVM is the default |
| Concurrency | Swift 6 async/await, @MainActor view models, an actor for token refresh | Approachable concurrency in Xcode 26; actors prevent double refreshes |
| State | Observation framework (@Observable, @State, @Bindable) | Modern replacement for ObservableObject |
| Networking | URLSession + one generic APIClient, no third-party libraries | Exactly what the brief asked for |
08 — Database
SQL Server 2025 · 20 tables · 24 migrations
Identity users and roles, shipper/carrier profiles, vehicles, refresh tokens, provinces and districts (seeded from a verified JSON),
listings, offers, messages, reviews, favourites, daily views, notifications, device tokens, blocks, reports and verification codes.
Integrity is enforced in the database as well: filtered unique indexes (one active offer per carrier per listing), unique favourite / view / block pairs,
cascade rules and RowVersion columns. Integration tests run every endpoint against a real SQL Server started by Testcontainers.
09 — Security & privacy
Built in, not bolted on
- Secrets never in the repo: user-secrets locally, environment variables in production; the API refuses to start with a missing JWT key or a development e-mail sink in production.
- Role and ownership checks on the server; an authorization-matrix test fails the build if an endpoint is accidentally anonymous.
- Identical responses for "unknown user" and "wrong password" (plus a dummy hash check) — no account enumeration.
- KVKK/GDPR: consent timestamps, separate terms of use, account deletion by anonymisation, profile photo deleted with the account.
- App Store guideline 1.2: report & block with two-way effects, zero-tolerance terms.
10 — Quality
Tested and continuously integrated
Swift Testing covers every view-model function plus a contract test for each service endpoint; XCUITest drives the main flows. The backend runs every endpoint against a real SQL Server in Docker (Testcontainers). GitHub Actions builds and tests on every push.
11 — Built with a multi-agent team
How it was built: me on iOS, a team of AI agents on the backend
The brief asked for the backend to be built "with an agent mindset" — but not as "let the AI do it". So the work was split on purpose:
iOS — my code
- I built the app screen by screen in Swift — networking, session, view models and views — with the agents explaining concepts along the way
- For the later features I pair-programmed with the agents and reviewed every change before it went in
- Every file is commented with what it does and what it connects to, so I can walk through any line
Backend & DB — a multi-agent team, directed by me
- Claude Code CLI was the main agent; Codex, Antigravity and OpenCode worked as its sub-agents
- Together they implemented the .NET API, EF Core migrations and SQL in small slices
- Each slice: I approved the plan, the agent wrote code + tests, I checked it in Scalar and on the device, then it was committed
- Research before decisions (2026 job ads, Microsoft & Apple docs) — recorded in 24 decision records
The order was fixed in a written plan: database → repository → handler → controller → API check → tests → iOS model → view model → view → device test → commit.
- ASetup
.NET 10 SDK, SQL Server 2025 in Docker, repository layout, product naming, written plan and technical report.
- BBackend foundation
Four-project Clean Architecture solution, global ProblemDetails errors, Serilog,
/api/v1versioning, user-secrets,BaseEntity(timestamps, soft delete, RowVersion), DB health check, generic repository + unit of work, CQRS-lite handler pipeline. - CFirst connection
81 provinces / 973 districts verified against multiple sources and seeded; cached anonymous endpoints; the generic iOS
APIClienttalks to the API for the first time. - DIdentity
Two registrations (shipper / carrier), login with lockout, rotating refresh tokens bound to a device, role policies, rate limiting, an authorization-matrix test; Keychain-based auto-login on iOS.
- EListings
Create / edit / cancel loads; carrier search with dynamic filters, sorting and stable paging.
- FOffers — MVP
Bidding, accept / reject with optimistic concurrency (two accepts at once → only one wins), my offers, history. First full flow on a real iPhone.
- GJobs & ratings
Job stages (picked up → in transit → delivered), completion, 1–5 reviews, carrier and shipper public profiles.
- HEngagement
Favourites, unique daily views, live counters for the listing owner.
- INotifications
In-app notification centre; outbox + background worker + APNs push verified on a device; tapping a push deep-links to the right screen.
- JLocation & price
"Near me" radius filter and nearest-first sorting; market reference price (180-day median).
- KHardening
Account deletion (anonymisation), report & block, terms of use, e-mail verification, forgot password with real e-mail (Resend), privacy manifest, CI.
- LPolish
Design system with dark mode, 2D action animations, a RealityKit login scene, vehicles, chat, mutual cancellation, profile page.
12 — What's next
Honest status, source & docs
Feature-complete and running end to end on a real iPhone against the API. Deliberately not done yet: public hosting (server, domain, HTTPS), an admin panel for reviewing reports, TestFlight / App Store submission, OpenTelemetry tracing and a Bayesian rating score.
Source and documentation
- github.com/isaanilkoca/yukum — full source, step-by-step README, CI status
- Backend guide — folder map, every endpoint with its role, naming rules (Turkish)
- How to read the code — three real requests traced file by file (Turkish)
- Decision records · daily log · technical report (PDF) · step-by-step plan (PDF)
- API contract cards · e-mail verification design
3D model: “Truck” by ROY (Sketchfab), CC BY 4.0 — recoloured, glass cargo box and load added.
