Skip to content

Instantly share code, notes, and snippets.

@junhuif
junhuif / machine.js
Last active April 15, 2020 10:50
Generated by XState Viz: https://xstate.js.org/viz
const SERVICE_ORDER_FETCHER = "orderFetcher";
const STATE_COMPLETED = "completed";
const STATE_FAILED = "failed";
const FETCH_INTERVAL = 1000;
const MAX_FETCH_COUNT = 60;
const ERROR_ORDER_CODE_IS_UNDEFINED = new Error("orderCode is undefined");
const ERROR_FETCH_TIMES_OVER_LIMITS = new Error(
@junhuif
junhuif / machine.js
Last active April 17, 2020 02:11
Generated by XState Viz: https://xstate.js.org/viz
const SERVICE_ORDER_FETCHER = "orderFetcher";
const STATE_COMPLETED = "completed";
const STATE_FAILED = "failed";
const FETCH_INTERVAL = 500;
const MAX_FETCH_COUNT = 3;
const ERROR_ORDER_CODE_IS_UNDEFINED = new Error("orderCode is undefined");
const ERROR_FETCH_TIMES_OVER_LIMITS = new Error(
@junhuif
junhuif / iam-architecture.md
Created December 24, 2025 12:33 — forked from sunfmin/iam-architecture.md
iam-architecture.md

IAM Architecture for Admin Consoles

This document describes the Identity and Access Management (IAM) architecture for our suite of admin consoles (CMS, OMS, PIM, etc.). The architecture centralizes authentication and authorization through an API Gateway, allowing individual services to focus on business logic.

Table of Contents

  1. Overview
  2. Architecture
  3. Components
  4. Authentication Flows