Skip to content

Pattern Catalog

Public Summary

Student Obrok uses explicit, practical patterns to keep modules understandable and evolvable across backend and frontend.

Internal Details

PatternPurposeWhere Used
Dependency Injection ContainerCentral composition root for services/controllersapps/server/src/container.js
Controller-Service-RepositorySeparation of transport, business, and persistence concernsapps/server/src/modules/*
Strategy + RegistryPlug-in market scraper implementationsapps/server/src/modules/scraper/markets and apps/server/src/modules/scraper/scraper.registry.js
Middleware PipelineOrdered cross-cutting HTTP concernsapps/server/src/app.js
Feature Flag GateRuntime enablement of risky/experimental featuresapps/server/src/modules/feature-flag and apps/client/src/store/featureFlagStore.js
Query Key FactoryPredictable cache keys and invalidationapps/client/src/features/*/hooks
Axios Interceptor RetryAccess token refresh and replayapps/client/src/hooks/useAxiosPrivate.js
Persisted UI StoreClient preferences across sessionsapps/client/src/store/themeStore.js

Risks and Trade-offs

  • Pattern consistency reduces cognitive load, but drift appears quickly if new modules skip standard layering.
  • Some patterns are manually enforced; automated linting or architecture checks can further reduce drift.

Student Obrok engineering documentation.