Skip to content

DoYouLikeFIx/FIXYZ

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

255 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FIXYZ

API Docs Docs Publish Supply Chain Security

FIXYZ is a Korean securities trading simulator built to show systems thinking beyond CRUD: Channel/CoreBanking/FEP separation, Redis-backed session integrity, risk-based MFA and order step-up, FIX 4.2 translation, pessimistic locking for position safety, and evidence-driven release readiness.

Current badge reality is intentional: the repository already publishes API docs and supply-chain evidence, while the broader acceptance and release gate rollout is tracked in Epic 10.

Quick Start

The local stack is Vault-backed. docker compose up is not enough on its own because the runtime services fail fast until INTERNAL_SECRET is resolved from Vault.

cp .env.example .env
# set VAULT_DEV_ROOT_TOKEN_ID and INTERNAL_SECRET_BOOTSTRAP in .env

docker compose -f docker-compose.vault.yml up -d vault vault-init

export VAULT_RUNTIME_ROLE_ID="$(docker exec vault cat /vault/file/runtime-role-id)"
export VAULT_RUNTIME_SECRET_ID="$(docker exec vault cat /vault/file/runtime-secret-id)"
export INTERNAL_SECRET="$(
  VAULT_ADDR=http://localhost:8200 \
  VAULT_RUNTIME_ROLE_ID="$VAULT_RUNTIME_ROLE_ID" \
  VAULT_RUNTIME_SECRET_ID="$VAULT_RUNTIME_SECRET_ID" \
  ./docker/vault/scripts/read-internal-secret.sh
)"

docker compose up -d
docker exec channel-service curl -fsS http://localhost:18080/actuator/health
curl -k https://localhost/health/channel

Useful endpoints after startup:

  • Channel API: http://localhost:8080
  • Channel actuator health: http://localhost:18080/actuator/health via docker exec channel-service
  • Edge health: https://localhost/health/channel
  • Vault UI: http://localhost:8200
  • Prometheus: http://127.0.0.1:9090 with COMPOSE_PROFILES=observability
  • Grafana: http://127.0.0.1:3000 with COMPOSE_PROFILES=observability
  • GitHub Pages API docs: https://doyoulikefix.github.io/FIXYZ/

If you want the FE app as part of the local walkthrough, use FE/README.md after the backend stack is healthy.

Architecture Diagram

flowchart LR
  Client["Web / Mobile Client"] --> Edge["edge-gateway :443"]
  Client --> Channel["channel-service :8080"]
  Edge --> Channel
  Channel --> Redis[(Redis)]
  Channel --> Core["corebank-service :8081"]
  Core --> Gateway["fep-gateway :8083"]
  Gateway --> Simulator["fep-simulator :8082"]
  Channel --> MySQL[(MySQL)]
  Core --> MySQL
  Gateway --> MySQL
  Simulator --> MySQL
  Vault["Vault :8200"] -. bootstrap / runtime secret .-> Channel
  Vault -. bootstrap / runtime secret .-> Core
  Vault -. bootstrap / runtime secret .-> Gateway
  Vault -. bootstrap / runtime secret .-> Simulator
Loading

What FIXYZ Demonstrates

  • Position integrity under concurrent execution via pessimistic locking and proof tests.
  • Mandatory login MFA plus elevated-risk order step-up instead of a flat auth model.
  • Resilience4j circuit breakers and recovery-aware order-session UX on the FEP path.
  • Explicit backend boundaries: Channel, CoreBanking, FEP Gateway, and FEP Simulator.
  • Vault-backed secret bootstrap and edge gateway hardening that are visible in the repo, not hand-waved.
  • FE/MOB parity backed by checked-in live and contract-oriented tests.

Reviewer Paths

Banking interviewer path

Open these in order if you want the "why this architecture?" explanation fast:

  1. README Architecture Decisions
  2. PositionConcurrencyIntegrationTest.java
  3. OrderExecutionService.java
  4. AuditLogService.java
  5. docs/ops/vault-secrets-foundation.md

Conversation anchors:

  • Why pessimistic locking over optimistic retry for position mutation
  • Why Channel owns session and orchestration while CoreBanking owns ledger truth
  • Why FIX 4.2 remains explicit even in a simulator-backed portfolio
  • Why audit, masking, and session invalidation are treated as first-class behavior

FinTech interviewer path

Open these if you want the "show me the proof" path:

  1. GitHub Pages API docs
  2. PositionConcurrencyIntegrationTest.java
  3. FepClient.java
  4. FE live order-session spec
  5. Mobile live order test
  6. Root proof-test scripts

Suggested demo sequence:

# 1. Start backend stack with Vault-resolved INTERNAL_SECRET
# 2. Run the FE live suite against the local backend
cd FE
pnpm run e2e:live:if-healthy

# 3. Or inspect root proof suites
cd ..
npm run test:client-parity
npm run test:edge-gateway

For the circuit-breaker walkthrough, inject timeout behavior into the simulator and inspect the CoreBanking breaker state:

curl -X PUT "http://localhost:8082/fep-internal/rules" \
  -H "Content-Type: application/json" \
  -d '{"action_type":"TIMEOUT","delay_ms":3000,"failure_rate":1.0}'

curl http://localhost:8081/actuator/circuitbreakers

Architecture Decisions

Security Architecture

FIXYZ treats security behavior as product behavior, not a postscript.

Environment Variables

The source of truth is split by runtime boundary:

Important local variables to understand first:

Variable Why it matters Source
VAULT_DEV_ROOT_TOKEN_ID Boots local Vault dev mode .env.example
INTERNAL_SECRET_BOOTSTRAP Seeds the Vault-managed internal boundary secret .env.example
INTERNAL_SECRET Required at runtime before backend services will boot Vault resolution step + docker/vault/scripts/read-internal-secret.sh
MYSQL_USER, MYSQL_PASSWORD, MYSQL_ROOT_PASSWORD Shared MySQL bootstrap for local compose .env.example
VITE_DEV_PROXY_TARGET FE local proxy target for same-origin cookie and CSRF behavior FE/.env.example
MOB_API_INGRESS_MODE, MOB_EDGE_BASE_URL Mobile direct vs edge validation contract MOB/README.md

Proof Tests

Representative proof points you can run or inspect directly:

Top-level proof commands:

npm run test:client-parity
npm run test:edge-gateway
npm run test:observability
npm run test:supply-chain

API Reference

  • Canonical public API docs: GitHub Pages Swagger UI
  • Channel service local docs path: /swagger-ui/index.html and /v3/api-docs in local/openapi-enabled profiles
  • Public API prefix: /api/v1/
  • Internal API prefix: /internal/v1/
  • FEP operational prefix: /fep-internal/

High-signal local endpoints:

  • GET http://localhost:8080/api/v1/auth/csrf
  • POST http://localhost:8080/api/v1/auth/login
  • POST http://localhost:8080/api/v1/orders/sessions
  • GET http://localhost:8080/api/v1/notifications/stream
  • GET http://localhost:8081/actuator/circuitbreakers
  • PUT http://localhost:8082/fep-internal/rules

Module Structure

README.md              -> reviewer-facing entry point
BE/                    -> Spring Boot services + tests + OpenAPI generation
  channel-service/     -> auth, session, order orchestration, admin, notifications
  corebank-service/    -> ledger truth, positions, order execution, resilience
  fep-gateway/         -> FIX 4.2 translation, gateway control plane, market data
  fep-simulator/       -> simulator execution + chaos control plane
FE/                    -> React web client + Playwright live suites
MOB/                   -> React Native client + Vitest/Maestro coverage
docs/                  -> ADRs, ops runbooks, evidence packaging
tests/                 -> root governance, edge, vault, observability, parity checks
_bmad-output/          -> planning and implementation artifacts that explain scope

Local Setup References

About

Let's FIX!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors