Santekno
Projects/Promo Page for Seller Apps — Multi-Device Ads & Promotions
Tokopedia logoPart of Tokopedia · Software Engineer, Shop Team
Backend / APILive

Promo Page for Seller Apps — Multi-Device Ads & Promotions

Supported the Promo Page (Ads & Promotions) feature on the seller mobile app — extended an existing endpoint to render promos across multiple devices (including the single-device case), designed data-storage customization so new promos ship faster via an internal operations tool, and prepared a clean handover with HLD, LLD, and endpoint docs while migrating the code into a new service repository owned by a downstream platform team.

2022-promopage-seller-apps · main
# E-Commerce / Ads & Promotions
$ go -X POST /2022-promopage-seller-apps/v1/sync
→ 201 Created
{ "status": "ok" }
publish 2022-promopage-seller-apps.synced
Role
Backend Engineer
Timeline
2022
Team
3
Domain
E-Commerce / Ads & Promotions
Stack
7 tech
Status
Live
01

Overview

The Promo Page (Ads & Promotions) feature on the seller mobile app surfaces promos to sellers directly inside their operations flow. As the backend engineer supporting this feature — alongside a mobile-apps team — I extended the existing Promo Page endpoint to support multiple devices, shaped the data storage so ops could iterate on promos quickly through an internal operations tool, and prepared a clean handover to a downstream platform team that would own the feature going forward.

A backend has no screens, so its "UI" is the operational surface: the extended Promo Page API contract, the internal-ops configuration flow, and the handover documentation package.

API contract — extended Promo Page endpoint with multi-device rules
Ops view — configuring an Ads & Promotions entry per device
Docs — HLD / LLD / endpoint reference prepared for the handover
03

Problem & Solution

Problem

The original Promo Page endpoint was tuned for a single delivery surface, and every new promo type or targeting change tended to require code work. On top of that, some promos were valid on only one device, so the endpoint needed a way to express and enforce that constraint. At the same time, long-term ownership of this surface was moving out of our service, so anything I built had to be documented and migratable — not just working.

Solution

I extended the existing Promo Page endpoint to become device-aware: a single contract now serves multiple devices, with a per-promo rule that keeps single-device-only promos correctly scoped. I customized the underlying data storage so schema changes for future promo types would not require a full endpoint rewrite, and I aligned the endpoint shape with an internal operations tool so ops could configure Ads & Promotions entries directly, minimizing per-promo integration effort. For the handover, I prepared HLD, LLD, endpoint reference and related tech documentation, and migrated the code into a new service repository owned by a downstream platform team.

04

Workflow

Three actors interact with the service; the diagrams are written in English to stay consistent across both languages.

flowchart diagram

fetch Ads & Promotions

configure promo

admin API

filter by device

render eligible

metrics

Seller Mobile App

Promo Page Service

Ops User

Internal Operations Tool

Promo Storage

Device Rule

Prometheus / Grafana

Use case interaction
sequence diagram
Seller Mobile AppPromo StoragePromo Page ServiceInternal Operations ToolOps UserSeller Mobile AppPromo StoragePromo Page ServiceInternal Operations ToolOps Userconfigure promo (device targeting)upsert promo (admin API)persist promo entryfetch Ads & Promotions (device=X)query eligible promospromos matching device Xrender list
Sequence flow — multi-device Ads & Promotions
05

Architecture

flowchart diagram

rpc

metrics

handover

Seller Mobile App

Promo Page Service · Go

Internal Operations Tool

Promo Storage · Managed RDS

Promotion Service

Prometheus / Grafana

New Service Repository · Downstream Platform Team

System architecture
Architecture notes

The Promo Page service (Go) owns the Ads & Promotions read path for the seller mobile app and the admin write path used by an internal operations tool. Promo entries live in a Managed RDS with a schema shaped for future customization; a device-aware filter runs inside the extended endpoint so the same contract serves every supported device while still honoring single-device-only promos. The service exposes RPC and HTTP surfaces, and Prometheus and Grafana track request health. For the handover, the code was migrated into a new service repository owned by a downstream platform team, with HLD, LLD, and endpoint documentation kept alongside it.

state diagram

device targeting set

eligible on target device

device mismatch

device matches later

validity ended

drafted

configured

published

hidden

expired

Promo entry lifecycle
06

Features

Ads & Promotions
  • Promo Page endpoint for the seller mobile app
  • Multi-device rendering rules for a single promo
  • Single-device-only promo constraint handling
Data & System
  • Data-storage customization for future promo changes
  • Endpoints designed for rapid change via an internal operations tool
  • Existing endpoint reused and extended to minimize integration effort
Handover
  • HLD, LLD, and endpoint documentation
  • Related tech documentation for downstream owners
  • Code migration into a new service repository owned by a downstream platform team
07

Tech Stack

language
Go
framework
RPC framework
protocol
RPCHTTP
database
Managed RDS
observability
PrometheusGrafana
08

Engineering Challenges

01
Multi-device support on an existing endpoint

The Promo Page endpoint originally assumed a single delivery surface, but promos now had to fan out across multiple devices — and some promos were still restricted to a single device. Fix: extended the existing endpoint with a device-aware filter so one contract could serve every device the seller mobile app supported, while the single-device constraint stayed enforceable per promo.

02
Designing for rapid change via an internal operations tool

New promos were expected to keep landing quickly, so the schema and endpoints could not be locked to today's exact fields. Fix: customized the data-storage layout and shaped the endpoints so ops teams could push new Ads & Promotions entries through an internal operations tool without a code change per promo, keeping integration effort low.

03
Clean handover to a downstream platform team

Long-term ownership was moving to a downstream platform team, and the receiving team needed enough context to run the feature without back-and-forth. Fix: prepared HLD, LLD, endpoint reference, and related tech documentation, then migrated the code into a new service repository so the downstream team took over a self-contained, documented feature.

09

Outcomes

multi-device
device support scope
1
existing endpoint extended (not rebuilt)
handover
HLD/LLD prepared & code migrated
10

Lessons Learned

Extending an existing endpoint instead of building a new one paid off twice: it kept the mobile-apps integration cheap and it left a single contract to hand over. Shaping storage and endpoints around the internal operations tool meant new promos could go live without a code change per promo — the kind of design-for-change decision that quietly compounds. And a good handover is a design deliverable, not an afterthought: HLD, LLD, endpoint docs, and a clean migration into a new service repository let the downstream platform team pick the feature up on day one.

11

Related Santekno Tutorials

Interested in working together?

Order, payment, or high-traffic event pipelines — let's talk architecture and trade-offs.