Educational Content & Community Service
I connected video course purchases, small community rewards, and point grants based on offline package payments in a single educational service backend, incorporating language, country, and currency rules into the models.
- Company
- Korea Institute of Psychological Education
- Service
- Goodbye Blue
- Period
- 2025.09–2026.05 · 9 months
- Role
- Backend Engineer
- Responsibility
- User/Admin API · DB · Async/Batch · AWS Ops
- Team
- BE 1 · FE 2 · Designer 1 · PM/Ops 1
- NestJS
- TypeScript
- PostgreSQL
- Prisma
- BullMQ
- Redis
- AWS
- NICEPAY · PayPal (PG)
- Claude · Codex
Project Overview
I consolidated distributed content and member activity into one educational service backend
The initial task was to consolidate scattered video, review, and member data into one service, connecting course discovery, purchases, entitlement issuance, and community participation in the same user journey.
As the project progressed, this flow expanded to payments and refunds, point accounting, referrals and tiers, events and notifications, and operational infrastructure. I treated it as a backend integration effort that redefined responsibilities and state criteria for content, access, orders, rewards, and notifications, rather than as a single feature addition.
Community activity provided small point rewards, while administrative grants based on offline package payments were the primary source of large point grants. I unified their settlement structure so that grants, spending, and refunds followed the same recording rules instead of scattering the two flows across separate logic.
I owned the backend overall, designing and implementing boundaries for registration, email verification, social account linking, consent to terms, courses, entitlements, community features, payments, rewards, notifications, settlement, and administrative APIs. I built a structure that connected purchase and activity events to operational policies and point accounting while supporting reprocessing after failure.
Ownership
My direct responsibilities
- Refined point, referral, tier, and refund policies with product planning and operations, and shared Swagger/OpenAPI-based API contracts with the frontend team
- Implemented unified membership, email/social authentication, consent to terms, user/admin access boundaries, and administrative APIs
- Implemented course discovery, purchases, entitlements, community features, and NICEPAY card, virtual account, point payment, and refund flows
- Unified small post/comment rewards and large point grants based on offline package payments in one settlement structure, managing grant, spending, and refund histories
- Built language, country, and currency policy models and PostgreSQL, Redis, and AWS deployment and operations environments
Constraints
Constraints to address first
- While consolidating existing members, email/social authentication, service-specific access, and consent to terms needed separate responsibilities, with admin approval and role boundaries maintained independently.
- Community rewards and administrator-issued points differed in their basis and amount, requiring separate scheduled grants, finalized change histories, and current balances.
- Repeated events or batch runs and overlapping accruals, spending, and refunds had to avoid duplicate postings and ledger/balance discrepancies.
- Reward, tier, referral, catalog, language, country, and currency policies changed at different rates, requiring preservation of change histories and the rules in effect at each transaction.
- Failures in external integrations such as payments and notifications had to preserve finalized monetary records and allow only the failed follow-up work to be rerun.
Implementation Timeline
How course and community requirements expanded into payments, rewards, and operations
I organized the requirements arising from course purchases and community participation into phases, based on design and architecture documentation and retrospectives. Select a phase to see the problem identified at that stage and how it led to the architecture and verification criteria.
Membership and Authentication
Project Infrastructure
I migrated from a single EC2 instance and shared ALB to a dedicated ALB and ASG
I migrated from a shared ALB, single EC2 instance, and SSH deployment to a dedicated ALB, ASG, and CodeDeploy structure, separating replacement, verification, and recovery criteria.
- I used Outbox and NotificationDelivery states to determine which operations were finalized and where processing had stopped.
- I classified DEAD, FAILED, and stalled entries for reprocessing by type, cause, and idempotency criteria, rather than rerunning everything.
- I diagnosed queue backlogs, external provider outages, and FCM outages using operational criteria distinct from domain transaction failures.
- I did not report inaccessible p95 response latency, error rate, or uptime data as performance results; I retained only evidence from states, logs, and operational documentation.
Shared ALB and Single EC2 → CodeDeploy → Dedicated ALB and ASG
I first moved SSH deployment into a CodeDeploy pipeline, then organized execution, replacement, and verification units around a service-dedicated ALB and ASG.
Selecting a stage updates both the explanation on the right and the infrastructure diagram below.
Shared ALB, Single EC2 Instance, and SSH Deployment
Before the migration, services were separated by Host Header rules on a shared ALB and deployed to a single EC2 instance through SSH.
- Multiple services shared ALB Host Header rules, creating strong coupling between services
- A single EC2 instance required manual recovery after failure because it was not automatically replaced
- The remaining SSH deployment flow limited tracking of deployment targets and execution results
- Direct changes inside an instance could be lost on replacement, requiring defined sources for configuration changes
Rendering the diagram.
Outcome & Review
I documented both an operational consistency structure and its remaining risks
- During four months from 2026.04?07, I personally reviewed and verified settlement results each month, closing monthly settlement without duplicate payouts, ledger/balance discrepancies, or manual corrections.
- I operated the flow from small community rewards and point grants based on offline package payments through settlement, spending, refunds, and expiration, with recovery criteria separated into states, logs, and operational documentation.
- The causes and change histories of accruals, spending, refunds, and expiration can be traced through finalized records and spending sources.
- Both service code and database constraints defend against reruns, duplicate events, and concurrent balance changes.
- Separating domain events from notification failures reduced the failure scope of monetary processing.
Outcome
Verifiable outcomes
- Operated grant, settlement, spending, refund, and expiration flows connecting small community rewards with point grants based on offline package payments
- Protected against duplicate payouts and balance discrepancies through conditional claiming, Wallet row locks, and Ledger idempotency keys
- Defined model and service boundaries so categories, terms, notifications, and payment currencies share language/country rules
- Tracked point spending, refunds, and expiration through Lots from original transactions
- Connected policy-based tier/referral rewards to Outbox and notification pipelines
Limitations
Limitations and unimplemented scope
- I do not publish exact monthly processed record counts, TPS, or P95 figures because I could not verify them from preserved operational data.
- State validation in some cancellation APIs could be made more atomic through conditional updates.
- Retry policies by notification delivery class and WebSocket channels remain future extensions.
- Multi-region routing and a multi-entity point platform are presented only as ADRs and a long-term transition strategy, not as completed implementation.