E-Commerce · Sheet 06.2 Marketplace Platform A multi-vendor marketplace with real-time inventory, escrow payments, and seller analytics.
TIMELINE 12 sprints
TEAM SIZE 4 engineers
DOMAIN E-Commerce
CLASSIFICATION Client approved
7D 30D 90D
Aggregated anonymized — sourced from production telemetry, no client identifiableStress Test Simulator Drag to simulate a traffic surge. This replays how the real auto-scaling policy responded during load testing — it is a simulation, not a live production trigger.
1,000 users Simulated load: 1,000 concurrent users 50,000 users
Within normal capacity — no scaling action required.
Run Simulation
Illustrative Engineering — conceptual, not exact configurationSYSTEM ARCHITECTURE Edge Gateway Cloudflare — DDoS protection, geographic routing Active
Frontend Next.js + TailwindCSS — edge-cached dashboard Active
Primary Switching Node Node.js microservice — transaction routing logic Active
Backup Switching Node Hot standby — same region, independent power Standby
Data Layer PostgreSQL cluster + Redis caching — read replicas Active
Security Layer JWT auth + AES-256 payload encryption Active
Disaster Recovery Simulator Simulates a primary node outage and the automatic failover response. Labeled simulation — no production system is affected.
Ready to simulate — click Run Simulation above.
COMPLIANCE POSTURE PCI-DSS aligned NDPR compliant AES-256 at rest TLS 1.3 in transit
Sanitized example — not client production codeThis mirrors a common pattern we found and fixed — reconstructed for teaching, not copied from any client's repository.
function processPayment(req, res) {
db.query(
"SELECT * FROM accounts WHERE id = "
+ req.body.accountId
, function(err, result) {
if (result) {
db.query(
"UPDATE accounts SET balance = "
+ (result.balance - req.body.amount)
);
res.send("ok");
}
});
} async function processPayment(req: Request) {
const input = paymentSchema.parse(req.body);
return db.transaction(async (tx) => {
const account = await tx.account.findUniqueOrThrow({
where: { id: input.accountId },
});
if (account.balance < input.amount) {
throw new InsufficientFundsError();
}
return tx.account.update({
where: { id: account.id },
data: { balance: { decrement: input.amount } },
});
});
} 4 → 0
SQL injection vectors
45MB → 12MB
Memory per request