Lee ChanyangBackend Engineer

Language

← Back to project list

Early SaaS & AR Commerce

Location-Based AR Gift Redemption Service

I designed the flow for redeeming online AR gifts via QR code at a specific location, along with the product and user data models.

Company
ToSpace
Service
PRESEND
Period
2022.09–2023.07 · 11 months
Role
Backend Engineer
Responsibility
Responsible for backend domain models and server structure
  • Go
  • Gin
  • MongoDB
  • Firebase
  • NestJS
  • TypeORM · Mongoose

Project Overview

I defined a commerce model where online gifts meet offline redemption requirements

The core challenge was that an AR gift was an online product and an offline experience, completed only when location, QR code, and reservation and redemption state requirements were met.

My responsibilities at the time also included implementing the main server, addressing a 3D file conversion bottleneck, and automating CI/CD. However, the clearest evidence available for public disclosure today is the Go/Gin main server's document models and router skeleton, followed by the separation of layers and infrastructure adapters in the NestJS codebase. This case study therefore focuses on location requirements, product types, AR resources, the gift redemption lifecycle, and execution boundaries rather than completed operational outcomes.

  • I represented location-based redemption requirements by separating store geofences from gift redemption coordinates and reservation times.
  • I handled AR, physical, ticket, and event products within a single gifting flow while separating their resource types.
  • Because only snapshot evidence remains, I disclose modeling and structural boundaries rather than phase-specific durations or operational metrics.

Ownership

My direct responsibilities

  • Designed document models for stores, products, photos, gifts, and users in location-based AR gift redemption commerce
  • Implemented a gift lifecycle separating store geofences from QR codes and reservation, redemption, and confirmation states
  • Unified AR, physical, ticket, and event products through a shared product flow and resource types
  • Implemented API and data structures and Firebase authentication integration for the Go/Gin and MongoDB main server
  • Established authentication and user functionality, relational and document storage boundaries, and AWS integration boundaries during the NestJS reimplementation

Constraints

Constraints to address first

  • A gift had to be an online payment object while also carrying an offline state that allowed redemption only at a specific physical location.
  • The service also had to support gifts without a predetermined recipient and represent a flow in which the person who arrived at the coordinates could claim the gift.
  • Products such as AR resources, physical items, tickets, and events needed to share a single listing and gifting flow despite their different representations.

Implementation Timeline

The progression from domain models to execution boundaries

Based on evidence from a single snapshot, I showed the domain dependency order and only the months that could be verified. Select a phase to see the problem identified at that stage and how it led to the architecture and verification criteria.

Phase 01 · Location & Geofence Domain

Location & Geofence Domain

Phase 01

I separated the requirement to arrive at a location before claiming a gift into explicit location conditions

I separated the store's eligible redemption area from the gift's actual redemption coordinates.

Location-Based Redemption RequirementsMermaid

Rendering the diagram.

  1. 01

    Requirements Analysis

    I treated gift redemption as an experience requiring the right place, coordinates, and reservation time, rather than a simple transfer of ownership.

    • A store provided the reference point for a physical redemption area, while a gift needed its own location for placement or redemption.
    • Because gifts without predetermined recipients also had to be supported, some cases prioritized “where” over “to whom.”
  2. 02

    Domain Modeling

    Stores hold center coordinates and a radius; gifts hold redemption coordinates and a reservation time.

    • The store's location defines the geofence, while the gift's location identifies the target of the redemption event.
    • I used a precise numeric type for coordinates rather than leaving latitude and longitude loosely represented as strings or subject to floating-point error.
  3. 03

    Architecture Decisions

    I chose circular geofences over a complex spatial model to express the initial requirements as straightforward coordinate and radius checks.

    • Polygons and floor-level spaces are more expressive but increase the complexity of the initial model.
    • A circular geofence can be explained with one center and radius per store, making it suitable for initial domain validation.
  4. 04

    Implementation & Verification

    In the archived Go models, I verified that store location and radius, and gift location and reservation time, reside in separate documents.

    • Router comments for nearby-location queries and coordinate placement point to the same domain design.
    • Where handlers remain incomplete, I do not claim actual location-validation API results.
  5. 05

    Operations & Recovery

    When investigating redemption errors in operation, both the store geofence and the gift's coordinates and reservation conditions must be checked, along with the QR code.

    • Omitting location conditions allows a domain violation: a valid code used to redeem a gift outside the intended location.
    • The public page describes the location-validation strategy without exposing actual coordinates or store information.

Project Infrastructure

Shared infrastructure is presented only in terms of execution units and adapter boundaries

I distinguished the execution units and external dependencies of the main server, reimplementation, and advertising server.

  1. 01

    Execution Units

    The Go/Gin main server, NestJS reimplementation, and NestJS advertising server remain as snapshots with different levels of maturity and responsibilities.

  2. 02

    State Storage

    The main domain is evidenced primarily by MongoDB document models, while the reimplementation is evidenced primarily by TypeORM, Mongoose, and cache module scaffolding.

  3. 03

    External Integrations

    Firebase authentication, the planned use of PASS authentication, and AWS adapter scaffolding are separated as external infrastructure boundaries.

  4. 04

    Verification Limits

    Deployment strategy, server topology, operational logs, and recovery metrics cannot be verified directly from the available sources and are not presented as public outcomes.

Outcome

Verifiable outcomes

  • Grand Prize, 2022 Anyang Youth Startup Competition Hackathon (project team)
  • Defined domain models centered on location, QR codes, and state for location-based AR gift redemption commerce
  • Made the core relationships in AR commerce explainable through store, product, photo, gift, and user models
  • Designed a polymorphic product model bringing AR, physical, ticket, and event products into a single product flow
  • Preserved execution, layer, and infrastructure boundaries in the Go/Gin main server and NestJS reimplementation
  • Distinguished completed implementation from scaffolding and unresolved design in public descriptions

Limitations

Limitations and unimplemented scope

  • Only one snapshot commit per codebase can be verified in the original repositories, so I do not make detailed claims about actual development durations by phase.
  • Incomplete main-server handlers are not presented as completed API operating results.
  • Some enum values and resource type declarations remained unresolved or inconsistent at the time of archival; these remain documented limitations.
  • No directly verifiable source material is currently available for a completed deployment pipeline, server topology, or operational metrics, so I do not make detailed claims about them.
  • I do not publish quantitative performance improvements, traffic, incident rates, or cost savings because supporting records were not preserved.
  • Internal repositories, actual service names, configuration and authentication examples, and actual API paths are not disclosed.