Open to backend, full-stack & AI engineering roles

Brian Ndung'u builds the part of the system you can't see, and makes it reliable.

Software engineer in Kenya focused on backend systems, APIs, and AI & machine learning. I work in Java and Spring Boot, Python and FastAPI, and React with TypeScript.

Computer Science · Chuka UniversityBased in Kenya
parknairobi / architecturelive demo ↗
BrowserLeaflet map · OSRM routes
Nginx/api · /ws proxy
↓ JWT · REST · STOMP over WebSocket
Spring Boot API
auth & roles · bookings · pricing · rate limiting
MySQLFlyway V1–V8
M-Pesaidempotent callback
Sensorsbay entry / exit
Selected work

Case studies

problem → design → trade-offs → result

Problem

Drivers in Kenyan towns lose time circling for parking, and operators have no live picture of which bays are free. Most people pay with M-Pesa, so payment has to work on a phone, over an unreliable network.

What I built

  • A live map of bays across Nairobi and other towns, with nearest-bay search from the driver's location (Haversine distance), an occupancy heatmap, and turn-by-turn routes from OSRM.
  • Bookings that reserve a bay for 15 minutes, and sensor entry/exit events that keep each bay's status accurate.
  • Live updates: every status change is broadcast over STOMP WebSockets, so every open map changes at once without refreshing.
  • An admin console for occupancy, bookings and users.

Engineering decisions

  • Payments that settle once. Safaricom can deliver the same M-Pesa callback more than once. A payment only moves from PENDING, so a repeat is ignored, and the amount paid is checked against the booking's price before it is accepted.
  • An authenticated webhook. The callback has to be public, because Safaricom sends no token, so it is verified with a shared secret or Safaricom's IP ranges instead.
  • Access control in two layers: stateless JWT with DRIVER and ADMIN roles in the security filter chain, plus @PreAuthorize on admin operations. The WebSocket channel checks the token too.
  • A versioned schema: eight Flyway migrations own the database structure, so any environment can be rebuilt from scratch.
  • Protection from abuse: a request rate-limiting filter, CORS rules, and every credential read from the environment.

Delivery

Dockerfiles and docker-compose for the whole stack, with Nginx proxying /api and /ws. Unit tests cover the distance calculations and the slot service.

Problem

Clinicians in busy Kenyan facilities often work without a colleague to sanity-check a diagnosis. General AI chat tools answer in free text, ignore the local disease burden, and are hard to build on reliably.

How it works

Engineering decisions

  • Structured output, not chat. The system prompt fixes a strict JSON schema: a green, amber or red consistency rating, red flags, 2–3 differential diagnoses, 3–5 tests, and one follow-up question.
  • Reliable parsing. The service strips stray Markdown fences and parses the reply into typed Java objects. Failures come back as a structured error field instead of a crash.
  • Consistency: temperature 0.2, so similar cases get similar answers.
  • Local context and tone. The prompt covers malaria, typhoid, TB, HIV, brucellosis and meningitis, and phrases disagreement the way a supportive colleague would.

This is a decision-support prototype, not a medical device, and it has not been clinically validated. Clinical judgement stays with the clinician.

What I built

  • Accounts: passwords hashed with BCrypt, and a signed JWT on login that a request filter validates on every later call.
  • Catalogue and orders: full product CRUD, seeded on first start, and orders that move through pending → processing → shipped → delivered.
  • M-Pesa checkout: STK Push to the customer's phone, accepting 07…, 01…, +254… and 254… number formats, plus Safaricom's callback.
  • Storefront: search, wishlist, a cart that survives reloads, and an admin page.

Next steps

The repository lists its roadmap openly: lock management endpoints to admins, record payment status on the order from the callback, cache the Daraja token, and add integration tests. ParkNairobi's payment and access-control design is where these were carried further.

What I built

  • Day-to-day school records: students, teachers, subjects, grades, attendance filtered by date, and fee payments.
  • Secure sign-in: BCrypt at cost 12, with admin and teacher roles.
  • A database that sets itself up: tables are created on first launch and a default admin account is seeded.

Design

Every screen follows FXML view → controller → DAO → PostgreSQL, so the interface, the logic and the SQL stay separate and can be tested on their own. JUnit tests cover the student data-access layer, and CI builds every push.

Capabilities

What I bring to a team

Backend & APIs

  • RESTful API design: validation, pagination, error contracts, OpenAPI
  • JWT authentication, BCrypt, role-based access
  • Mobile-money payments with idempotent callbacks
  • Layered architecture, dependency injection, SOLID

Data

  • Relational modelling and normalisation
  • SQL, indexing, transactions
  • Migrations with Flyway and Alembic
  • ORMs (JPA/Hibernate, SQLAlchemy) with the SQL in view

AI & machine learning

  • LLM applications: prompt design, structured outputs
  • Guardrails and failure handling around models
  • Knowledge representation and rule-based inference
  • ML fundamentals and model evaluation

Quality & delivery

  • Unit, integration and end-to-end testing
  • CI with GitHub Actions; pull requests and code review
  • Docker, Nginx, Linux, cloud and static hosting

Frontend

  • React with TypeScript, Vite, Tailwind
  • TanStack Query and React Router
  • Maps with Leaflet; accessible, responsive layouts

Professional

  • Turning real-world problems into scoped software
  • Explaining trade-offs to non-technical stakeholders
  • Clear technical writing and documentation
  • Agile delivery with end-to-end ownership
Languages
Java · Python · TypeScript · JavaScript · SQL · C · C++ · Prolog
Backend
Spring Boot (Web, Security, Data JPA) · FastAPI · SQLAlchemy · Pydantic · Hibernate
Data
PostgreSQL · MySQL · SQLite · Flyway · Alembic
AI / ML
LLM APIs (Groq, Llama) · structured outputs · expert systems
Testing
JUnit 5 · pytest · Vitest · Testing Library · Playwright
DevOps & tools
Docker · Nginx · GitHub Actions · Git · Maven · Linux · Netlify
About

Engineering for the places I know

I'm Brian Ndung'u, a software engineer studying Computer Science at Chuka University in Kenya.

I started with C, algorithms and logic programming, and moved into building complete systems: APIs, data models, payment flows and the interfaces people use on top of them.

Most of my projects start from a local problem, like parking in Nairobi, clinics without a second opinion, or schools running on paper. Mobile money, patchy networks and real users shape the engineering, and I like it that way.

Model the data first.A correct schema makes everything built on top of it simpler.
Design for failure.Retries, timeouts, duplicate callbacks and bad input are part of the feature.
Prove it works.Tests against real systems wherever possible, not just mocks.
Leave it readable.Code, commits and docs written for the next engineer.
Contact

Let's build something reliable.

I'm open to backend, full-stack and AI engineering roles and internships. Email is the fastest way to reach me.