From pr-review-toolkit
MercadoLibre frontend architecture skill — Nordic SSR framework (v9+), Andes Design System, Kraken auth, BFF pattern with Clean Architecture, TypeScript strict, Jest + Testing Library. Use as quality baseline for development, code review and analysis of MercadoLibre frontend projects.
How this skill is triggered — by the user, by Claude, or both
Slash command
/pr-review-toolkit:arch-frontendThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Knowledge base for MercadoLibre frontend architecture using Nordic SSR, Andes UI, and Kraken.
Knowledge base for MercadoLibre frontend architecture using Nordic SSR, Andes UI, and Kraken.
Used as a baseline by the explorer, dev-frontend, and review-frontend agents.
[Inference] for unverified contentReference: references/nordic/ssr-patterns.md
Nordic is MercadoLibre's internal SSR framework built on React + Express + Webpack (v9.7.x).
Key primitives:
apiRouter (BFF) + appRouter (SSR pages)app/nordic-pages/): page-level React components, one folder per routeconfig/default.js: Nordic configuration file (routing, APIs, permissions, CDN)@meli/express-server: MeLi Express wrapper used for the BFF layerapp/translations/Reference: references/nordic/project-structure.md
Standard dual-layer layout:
app/ # Frontend (React SSR)
components/ # Shared UI components
nordic-pages/ # Route-based page components (one folder per route)
<feature>/ # Page component + sub-components
__tests__/ # Jest + Testing Library tests co-located
server/ # SSR server setup (app router, Kraken auth wiring)
services/ # Client-side API service layer (calls BFF endpoints)
styles/ # Global SCSS styles
translations/ # i18n files (pt-BR, es, en...)
api/ # BFF API layer (Express, Clean Architecture per module)
<module>/
application/use-cases/ # Use cases (business logic)
domain/entities/ # Domain entities
domain/repositories/ # Repository interfaces
infra/controller/ # Controller (wires use cases)
infra/repositories/ # Repository implementations (HTTP to downstream services)
infra/router.ts # Express Router for this module
shared/ # Shared middleware, services, utils
index.ts # API router aggregator + global middleware chain
config/
default.js # Nordic configuration (routing, API hosts, permissions)
configs/
latest/ # Fury environment configs (prod.json, test.json)
Reference: references/andes/components.md
@andes/* is the MercadoLibre design system for web. Current version: 9.1.x.
@andes/button, @andes/card, etc.Reference: references/bff/clean-architecture.md
@kraken/core handles session, permissions, and attributes for back-office apps.
krakenSessionResolver(): middleware that resolves the user session from cookie session_idkraken.releaseOnMiddleend(): middleware that enforces application-level authorizationapiAuthorization(): per-module permission check using adminFeaturesPermissions configconfig/default.js under adminFeaturesPermissionsReference: references/bff/clean-architecture.md
Each API module follows strict Clean Architecture:
module/
application/use-cases/ # Pure business logic. No HTTP, no DB, no framework.
domain/entities/ # Domain objects (plain TypeScript classes/interfaces)
domain/repositories/ # Repository interfaces (contracts only)
infra/controller/ # Wires use cases. No business logic.
infra/repositories/ # Implements repository interfaces (HTTP clients, DB)
infra/router.ts # Express routes → controller methods
Rules:
getInstance()) — never instantiate per requestExternalApiService — one instance per repository@meli/input-validation middleware for all routes that receive query params or bodyinfra/schemas/ within each module400 Bad RequesthandleError middlewareDomainError base class with typed subclasses per error scenariotry { ... } catch (err) { handleError(err, res) }AsyncLocalStorage via ContextManager for request context (auth headers, tracing)x-auth and x-api-scope headers from contextcontextMiddleware globally on all API routesReference: references/typescript/conventions.md
any unless absolutely unavoidable — use unknown + narrowingimport type { Foo } for type-only dependenciesreq.body as SomeType without validationRequest<Params, ResBody, ReqBody, Query> generics on route handlersFields and Files from formidable typesReference: references/testing/testing-patterns.md
@testing-library/react)__tests__/ directories next to the code they testjest.mock() or nock; never mock @meli/express-server internals@meli-lint/eslint-config-base-ts, Prettier, Stylelint (for SCSS)| Category | Command | Purpose |
|---|---|---|
| Dev | npm run dev | Start Nordic dev server with Fast Refresh |
| Build | npm run build | Production build + CDN upload |
| Test | npm test | Run Jest test suite |
| Test (watch) | npm run test:watch | Jest in watch mode |
| Lint | npm run lint | ESLint + Stylelint |
| Type check | npx tsc --noEmit | TypeScript type check without emit |
UNDERSTAND → DESIGN (contracts) → TEST → IMPLEMENT → VALIDATE → REVIEW
config/default.js, context.md, existing module patternsnpm test + npm run lint + npx tsc --noEmitreferences/nordic/ssr-patterns.md — Ragnar server, SSR data fetching, i18n, CDNreferences/nordic/project-structure.md — Dual-layer layout, Nordic pages, configreferences/andes/components.md — Design system usage, component patterns, SSR compatibilityreferences/bff/clean-architecture.md — Clean Architecture layers, Kraken auth, error handling, context propagationreferences/typescript/conventions.md — Strict TypeScript, naming, DTOs, Express typingreferences/testing/testing-patterns.md — Jest, Testing Library, co-location, auth testsProvides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub olimpus-soft/olimpus-claude-skills --plugin pr-review-toolkit