Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Kogan.com Dev Blog 8 min read Case study mediumAdept

Moving from Django DRF to Ninja API / Pydantic

Kogan.com is shifting its Django APIs from Django REST Framework's serializers, viewsets and routers to Django Ninja with Pydantic schemas, defining each endpoint as a type-hinted function with separate input Schema and output ModelSchema classes. A side-by-side CRUD example for a Product model shows that Ninja requires more explicit endpoint definitions than DRF's auto-generated routes. In return it gives less hidden framework magic, automatic OpenAPI docs, and cleaner separation between API code and business logic. The listed tradeoffs are a learning curve for DRF developers, the need for an iterative migration on large codebases, and DRF's larger plugin ecosystem.

Related posts

  • Moving Railway's Frontend Off Next.js

    Railway mediumAdept

    Railway migrated its entire production frontend (dashboard, canvas, marketing site, 200+ routes) from the Next.js Pages Router to Vite + TanStack Router/Start in two PRs with zero downtime. The first PR removed all Next.js-specific dependencies such as next/image, next/head and next/router. The second swapped the framework, generating routes from the original page tree, moving 500+ redirects, headers and caching rules into Nitro config, and replacing Node polyfills with browser-native APIs. Builds dropped from over 10 minutes to under two. Railway gave up built-in image optimization (now handled by Fastly at the edge) and some ecosystem plugins, and accepted the immaturity of TanStack Start.

  • How we use GraphQL at Europe's largest fashion e-commerce company

    Zalando Engineering easyNovice

    Zalando replaced a sprawl of per-page and per-platform Backend-for-Frontend services with a single unified GraphQL API owned via a shared monorepo across 12+ domain teams. The BFFs had duplicated effort, fragmented security and observability, and produced inconsistent data across web and app. The graph is built on Entities such as Product and Campaign and runs on their own GraphQL engine, graphql-jit, under a strict no-business-logic rule. Since 2018 it has grown to serve over 80% of web and 50% of app use cases, with adoption driven by documentation, training and schema consultation, and god-component risk handled through contribution principles, circuit breakers, timeouts, retries and per-platform bulkhead deployments.

  • Upgrading MLflow Pipelines Across a Python Version Boundary

    Zalando Engineering mediumAdept

    Upgrading Databricks Runtime from 14.3 (Python 3.10) to 17.3 (Python 3.12) broke loading of registered MLflow models, because cloudpickle embeds Python bytecode that the newer interpreter can't parse. Retraining five model types per product category on TB-scale data was not viable, so Zalando ran a one-time "Load and Repack" job: load the old pickles in a matching DBR 14.3 environment, extract the inner CatBoost, PyTorch and sklearn artifacts, and relog them under standardized PythonModel wrappers with code_paths and uv-pinned dependencies. Next they plan to drop pickle entirely by moving to native serialization flavors (.cbm, pt2, skops) and MLflow Models from Code.

  • Build Apps in Deno with Frameworks such as React, Vue, Express, and more.

    Deno mediumAdept

    Deno 1.28's npm support lets you use npm-distributed frameworks like Express, React and Vue directly via `npm:` specifiers. You don't need package.json, node_modules or a separate install step, and Deno's built-in toolchain is available throughout. Step-by-step examples build a dinosaur API with Express. They then build the same dinosaur list/detail app in React (Vite scaffold via create-vite-extra, an Oak backend with CORS, react-router-dom) and in Vue (reactive store, Suspense, vue-router).

  • Migrating Shop app from React Native to native

    Shopify Engineering mediumAdept

    Shopify rebuilt the Shop app from React Native into native Swift/SwiftUI and Kotlin/Jetpack Compose in 12 weeks, with coding agents porting features using the existing React Native app as a reference. Native builds cut cold start by 23% on iOS and 50% on Android, raised session stability from 99.5%+ to 99.95%+, shrank the Android app by 109 MB, reduced Android release build time by about 75%, and reached 120 FPS scrolling on Pixel. The team built a Pi agent extension with subagents for source analysis, planning, implementation and parity review, with plan approval tied to a content hash. They also built Tardis, a tool that exposes live app events, logs and state to agents and compares analytics payloads between the old and new apps. Native expertise, linting, tests and code review were still needed to catch duplication, architectural drift and performance problems in generated code.

The quest for software engineering knowledge.

Look:
Layout: