# Beforemerge Fullstack Architecture Review

> Code review rules for DRY/SOLID layered architecture in fullstack TypeScript applications. Covers dependency direction, service/repository patterns, factory injection, domain entities, security hardening, performance optimization, and code quality patterns. Use this skill when reviewing, writing, or refactoring fullstack TypeScript code with layered architecture — especially before merging pull requests. Triggers on tasks involving code review, architecture review, SOLID principles, clean architecture, or quality checks for fullstack TypeScript projects.

- Skill: `beforemerge/beforemerge-fullstack-architecture-review` (Agent Skill, multi-file: 25 files)
- Install (CLI): `npx skillmds@latest add beforemerge/beforemerge-fullstack-architecture-review`
- Raw SKILL.md: https://api.skillmd.com/api/skills/beforemerge/beforemerge-fullstack-architecture-review/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Security
- License: MIT
- Author: beforemerge (https://skillmd.com/u/beforemerge)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/beforemerge/beforemerge-fullstack-architecture-review

---


# BeforeMerge: Fullstack Architecture Review

Code review knowledge base for DRY/SOLID layered architecture in fullstack TypeScript applications. Contains rules across 4 categories — security, performance, architecture, and quality — prioritized by impact. Framework-agnostic principles illustrated with Next.js + Supabase examples.

## When to Apply

Reference these rules when:
- Reviewing pull requests for fullstack TypeScript projects
- Designing or refactoring service/repository layers
- Auditing API routes for proper separation of concerns
- Building new features following clean architecture principles
- Running pre-merge quality checks on layered codebases

## Rule Categories by Priority

| Priority | Category | Impact | Prefix | Focus |
|----------|----------|--------|--------|-------|
| 1 | Security | CRITICAL | `sec-` | Thin controllers, rate limiting, CSRF, error handling |
| 2 | Performance | HIGH | `perf-` | Parallel fetching, minimal client components, streaming |
| 3 | Architecture | CRITICAL-MEDIUM | `arch-` | SOLID patterns, dependency direction, layered design |
| 4 | Quality | MEDIUM-HIGH | `qual-` | DRY, consistency, logging, discoverability |

## How to Use

Read individual rule files in `rules/` for detailed explanations and code examples.

Each rule contains:
- Brief explanation of why it matters
- Incorrect code example with explanation
- Correct code example with explanation
- CWE/OWASP mapping where applicable
- References to official documentation

For the complete compiled guide: `AGENTS.md`

