Gig Economy Software System: Reference Architecture and Retrospection

Retrospective case-study (shitposting) of gig economy software system, its architecture, implementation and mistakes made during development.

Gig Economy Platform

A two-sided digital platform that matches independent service providers with consumers for on-demand transactions, integrating e-commerce functionalities with algorithmic workforce management..

DISCLAIMER: It’s the major thing (as greatest in scale) that I have acomplished so far, yet no meaningful way to describe it comes to my mind. I have decided to publish it (as a draft) which hopefully will get updated someday.

Been major contributor in project (Feb 2023 - Oct 2024) which can be conceptualized as Uber for cleaning which captured essence of most software domains that can be met in commercial spaces. With unconvinient chain of events and major disagreement with other team members during my cadence in project I decided to stepdown and rethink my carrer choices. This document is retrospective case-study of mistakes, observations and research made during time.

This was brownfield project which was started by previous founding engineer and was later taken over by software architect and later on by me. I don’t want to go into details what were mine responsibilities, as it would be shorter to mention ones that were not mine.

Implementation of project was done in TypeScript and Nest.js (w/ typeorm) and utilization of cloud-native services from AWS (Amazon Web Services). Althrough this document will not focus on implementation details and what was really done as it would be too long to describe all mistakes done - I have decided to contain correct implementation of software system of project like one in my past, for future reference.

Software System Overview

Gig economy software system contains multiple subsystems which can be either implemented from scratch or simply integration can be made to connect with existing software component.

TODO: Add C4 Diagram TODO: Add actors overview?

Identity and Access Management (IAM)

System is built around Identity and Access Management (IAM) which is responsible for managing user identities, roles, and permissions. It provides secure access to the platform’s resources and services.

Authentication (AuthN)

Authentication is the process of verifying the identity of a user or system. It ensures that only authorized users can access the platform’s resources.

Authenication methods include:

  • Basic Authentication
  • Passwordless Authentication
  • Multi-Factor Authentication (MFA)
  • Single Sign-On (SSO)
  • OAuth 2.0 and OpenID Connect (OIDC)
  • JWT (JSON Web Tokens)
Basic Authentication
Passwordless Authentication
Multi-Factor Authentication (MFA)
Single Sign-On (SSO)
OAuth 2.0 and OpenID Connect (OIDC)

Authorization (AuthZ)

Identity Management

Identity <- { Customer, Worker, Administrator }
Customer Management
Shipping Address
Billing Address
Session

Content Management System (CMS)

The Content Management System (CMS) is responsible for managing the platform’s content, including service information, user-generated content, and other relevant data. It provides a structured way to organize and present information to users.

Service Information Management (SIM)

Localization and Internationalization (i18n)

Commerce

Cart

Checkout

  • Coupons
  • Gift Cards
  • Digital Wallet

Payment

Invoicing

Communication

Direct Messaging

Notifications

Email Notifications
Push Notifications
SMS Notifications
In-App Notifications
  • Payment Service Provider (PSP)
    • Payment Gateway / Payment Processor
    • Buy now, Pay later (BNPL)
    • Digital Wallet
    • Payment Method
    • Invoice
    • Cash On Delivery (COD)
    • Secure Payment
    • Payment Confirmation
  • Customer Appointment Management (CAM)
  • Enterprise Resource Planning (ERP)
  • Workforce Management (WFM)
  • Checkout
  • Booking
  • Storefront, Provider/Worker Appplication, Front-Office Administration, Back-Office Administration

Application Programming Interface Gateway

Content Negotiation

Storefront

Server-side rendered.

Provider Mobile Application

Customer Mobile Application

Administration Panel (Front-Office)

Key points

Adoption of Nix-based Development Environment

Local reproduction of development version of software system been taking multiple hours which even for simple device change was inefficient. Introduction of devenv reduced onboarding time from hours into ~30 minutes and reduced probability of environment-induced bugs (such as incompatible versions of local tooling) by declarative definition of environment.

Problems & Pain-Points

Ignorance towards RFCs and Open Standards

I may be at times person impossible to collaborate, I am fine with people telling me this. However, disrespect of existing standards (as solution to problem on which braindeads spent months) just because I said such is unbearable. I guess I should advice to mine clients that they should disregard every working standard because I have empty backlog for incomming 2 years.

RRules

iCalendar (RFC 5545) standard which was beneficial towards application domain. Software system have been introducing subscriptions and cyclic events that have been happening to customers. Implementation of Recurrence Rule would solve most domain problems which have been with company since first founding engineer - yet, it’s by the book so ofc why somebody should do that. I don’t know if people are that much of a idiots or they have ego to challenge official standards thinking they can do better (seen results, they didn’t).

OpenTelemetry
  • Forcing “NewRelic” over OpenTelemetry as solution to problems where application didn’t had well-configured logging layer and interceptors that would allow for aspect-oriented log collection from application. Cargo-cult towards software as a service without implementation inside system.

Implementation

System can be easily built by bootstrapping from middle rather than boilerplating into middle, which means if our software system is meant to be ex. food delivery application we should start from Customer -place_order-> Order and Order -accept_order-> Rider, this would shape necessary parts of the system and will open possibility to iterate over design mistakes early.

Cost

Everything

Every software engineer have this one project in one’s life where one can say… I have delivered, but at what cost?….

It been thoughest 4 000 hours of my whole carrer and I really had more complicated projects than this one - but this one was the most painful. There’s nothing more painful than working with people who don’t understand what they are doing and don’t want to step up to their incompetence.

It’s been around 35 000 USD as compensation for 1.5 year of mine work, it was not bad salary after all. However, I have lost more than 10x of that in opportunity cost - as mine time goes - this do not recover mine health, mental state and burnout to which management contributed by gratifying incompetence. I think, it’s what I wanted after all and I got it - I hope this is worth it.

It’s fair, I belive 6 years of experience in software development to be somewhere near competent is worth somewhere around McDonald’s salary. Not even mentioning fact of spending whole 2025 in recovery (which in mine case melted down another 5 000 USD for being alive apperently).

It’s just funny how overall compensation for software development carrer is somewhere around 11 000 USD per year (cosidering backouts from life as side-effect of such great carrer). It’s not like I was expecting to be paid 100k+ per year, but I was expecting to be paid reasonably okay for at least 10 000 hours of mine time put into profession. But from the other hand, I would not respect myself either - you can replace developer at any time on current market, and claude code already outperforms me in most cases, so I guess I should be happy with what I have.

During such time market shifted significantly and even through I have real-world experience in software development, more or less portfolio of little personal pursuits - through (so far) 300 applications during 2025 I have been invited to 3 interviews (2 times to same by accident) and rejected from all of them.

I would like to know what I did wrong but I guess it’s just that I have not enough experience, oh! don’t forget that I was the problem everywhere I went - and you all are right, I guess I could have never decide to do things that I do - everyone would be happy.

I wonder, why I do this to myself?…