Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
435ad6e
docs: add development environment section to HLD
argentinaluiz Oct 8, 2026
a70e9c4
docs: move planning documents into docs/
argentinaluiz Oct 8, 2026
595f365
docs: add CLAUDE.md with project guidance
argentinaluiz Oct 8, 2026
70cce9a
docs: rename CLAUDE.md to AGENTS.md
argentinaluiz Oct 8, 2026
7eefb7b
feat: add Next.js web app with Docker setup
argentinaluiz Oct 8, 2026
8fc2c23
chore: enable project MCP servers for Claude Code
argentinaluiz Oct 8, 2026
776f705
fix: keep pnpm store out of the mounted source in dev
argentinaluiz Oct 8, 2026
16bf495
docs: require running everything inside Docker containers
argentinaluiz Oct 8, 2026
54795fe
feat: add NestJS API with Docker setup
argentinaluiz Oct 8, 2026
999c109
chore: install dependencies on dev container start
argentinaluiz Oct 8, 2026
e04d21e
feat: add design system documentation for visual language and components
argentinaluiz Oct 9, 2026
c3ce74b
feat: update design system documentation and enhance Figma workflow d…
argentinaluiz Oct 9, 2026
17512d9
docs: plan the sign-up and login feature
argentinaluiz Oct 9, 2026
e0d7506
chore: enable the Linear MCP server for the project
argentinaluiz Oct 9, 2026
940d0a6
docs: split product decisions from code practices
argentinaluiz Oct 9, 2026
b8f4c25
chore: add the planning skills to the project
argentinaluiz Oct 9, 2026
9044e29
docs: record the Figma file and the auth screen components
argentinaluiz Oct 9, 2026
05e0622
docs: define the disabled look and how Figma draws interaction states
argentinaluiz Oct 9, 2026
816dd09
docs: close the field hover gap now that Figma has the variant
argentinaluiz Oct 9, 2026
ffe604b
docs: list the Figma pages and fix the disabled and field hover states
argentinaluiz Oct 9, 2026
8687f36
docs: point the design system to the Figma URL in AGENTS.md
argentinaluiz Oct 9, 2026
381f926
Merge pull request #1 from devfullcycle/feature/lui-134-telas-de-aute…
argentinaluiz Oct 9, 2026
d50401b
feat: add handoff and implement skills with corresponding YAML config…
argentinaluiz Oct 9, 2026
d81bd48
chore: bring up postgres, mailpit and migrations with the dev compose
argentinaluiz Oct 9, 2026
b7c430c
feat: add config validation, RFC 9457 errors, mail sender and test base
argentinaluiz Oct 9, 2026
ee7d6b2
docs: describe the new services, the three test suites and the error …
argentinaluiz Oct 9, 2026
4e1e8d3
fix: only trust framework errors for the HTTP status of a failure
argentinaluiz Oct 9, 2026
290b5b4
fix: read config from the validated env and parse the JWT keys for real
argentinaluiz Oct 9, 2026
8202fe1
fix: bound SMTP waits and let tests wait for a later e-mail
argentinaluiz Oct 9, 2026
d292802
chore: check postgres over TCP and record the production migration gap
argentinaluiz Oct 9, 2026
aedab42
refactor: share the test config and helpers and validate the env in o…
argentinaluiz Oct 9, 2026
2c99626
fix: fail at boot when the database is down and keep a pasted JWT key
argentinaluiz Oct 9, 2026
d475fce
fix: close the remaining review findings on the foundation
argentinaluiz Oct 9, 2026
26c5466
fix: bound the database connect wait and tighten the boot-time env ch…
argentinaluiz Oct 9, 2026
27de142
fix: treat non-error HttpException statuses as unexpected and split t…
argentinaluiz Oct 9, 2026
1aa5eb0
fix: recognise body-reader errors by a closed list of types
argentinaluiz Oct 9, 2026
cf2ab92
Merge pull request #2 from devfullcycle/feature/lui-135-fundacao-ambi…
argentinaluiz Oct 9, 2026
343963a
feat: web base for auth — design tokens, components, API client and b…
argentinaluiz Oct 9, 2026
3bcaa23
fix: keep component-owned button state, style the disabled text link …
argentinaluiz Oct 9, 2026
11772b5
Merge pull request #3 from devfullcycle/feature/lui-136-base-da-web-c…
argentinaluiz Oct 9, 2026
6fe9609
feat: sign-up and e-mail verification, from the API routes to the scr…
argentinaluiz Oct 9, 2026
654a5a8
fix: keep the pending e-mail out of the URL and give the link back wh…
argentinaluiz Oct 9, 2026
83f8128
Merge pull request #4 from devfullcycle/feature/lui-137-cadastro-e-ve…
argentinaluiz Oct 9, 2026
d14cb48
feat: sign-in and sign-out, from the API routes to the screens (LUI-138)
argentinaluiz Oct 9, 2026
f460346
fix: read the Bearer header strictly and answer 204 to a logout token…
argentinaluiz Oct 9, 2026
ce1fdb9
Merge pull request #5 from devfullcycle/feature/lui-138-entrar-e-sair
argentinaluiz Oct 9, 2026
7754b61
feat: a Session that renews itself, from the refresh route to the Pro…
argentinaluiz Oct 9, 2026
14663c9
fix: revoke every Session in the same transaction that detects token …
argentinaluiz Oct 9, 2026
e107346
Merge pull request #6 from devfullcycle/feature/lui-139-sessao-que-se…
argentinaluiz Oct 9, 2026
e0b55db
feat: password recovery, from the reset routes to the screens (LUI-140)
argentinaluiz Oct 9, 2026
23891dd
fix: answer the reset request before issuing the token
argentinaluiz Oct 9, 2026
f7c67d0
Merge pull request #7 from devfullcycle/feature/lui-140-recuperacao-d…
argentinaluiz Oct 9, 2026
1d383df
feat: attempt limits on the auth routes, keyed by the browser's real …
argentinaluiz Oct 9, 2026
e06e5ff
Merge pull request #8 from devfullcycle/feature/lui-141-limite-de-ten…
argentinaluiz Oct 9, 2026
e2667db
feat: add foundational skills for codebase design, PRD generation, an…
argentinaluiz Oct 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"enabledMcpjsonServers": [
"chrome-devtools",
"playwright",
"linear-server"
],
"enabledPlugins": {
"figma@claude-plugins-official": true
}
}
37 changes: 37 additions & 0 deletions .claude/skills/codebase-design/DEEPENING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Deepening

How to deepen a cluster of shallow modules safely, given its dependencies. Assumes the vocabulary in [SKILL.md](SKILL.md): **module**, **interface**, **seam**, **adapter**.

## Dependency categories

When assessing a candidate for deepening, classify its dependencies. The category determines how the deepened module is tested across its seam.

### 1. In-process

Pure computation, in-memory state, no I/O. Always deepenable: merge the modules and test through the new interface directly. No adapter needed.

### 2. Local-substitutable

Dependencies that have local test stand-ins (PGLite for Postgres, in-memory filesystem). Deepenable if the stand-in exists. The deepened module is tested with the stand-in running in the test suite. The seam is internal; no port at the module's external interface.

### 3. Remote but owned (Ports & Adapters)

Your own services across a network boundary (microservices, internal APIs). Define a **port** (interface) at the seam. The deep module owns the logic; the transport is injected as an **adapter**. Tests use an in-memory adapter. Production uses an HTTP/gRPC/queue adapter.

Recommendation shape: *"Define a port at the seam, implement an HTTP adapter for production and an in-memory adapter for testing, so the logic sits in one deep module even though it's deployed across a network."*

### 4. True external (Mock)

Third-party services (Stripe, Twilio, etc.) you don't control. The deepened module takes the external dependency as an injected port; tests provide a mock adapter.

## Seam discipline

- **One adapter means a hypothetical seam. Two adapters means a real one.** Don't introduce a port unless at least two adapters are justified (typically production + test). A single-adapter seam is just indirection.
- **Internal seams vs external seams.** A deep module can have internal seams (private to its implementation, used by its own tests) as well as the external seam at its interface. Don't expose internal seams through the interface just because tests use them.

## Testing strategy: replace, don't layer

- Old unit tests on shallow modules become waste once tests at the deepened module's interface exist; delete them.
- Write new tests at the deepened module's interface. The **interface is the test surface**.
- Tests assert on observable outcomes through the interface, not internal state.
- Tests should survive internal refactors, since they describe behaviour, not implementation. If a test has to change when the implementation changes, it's testing past the interface.
44 changes: 44 additions & 0 deletions .claude/skills/codebase-design/DESIGN-IT-TWICE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Design It Twice

When the user wants to explore alternative interfaces for a chosen deepening candidate, use this parallel sub-agent pattern. Based on "Design It Twice" (Ousterhout): your first idea is unlikely to be the best.

Uses the vocabulary in [SKILL.md](SKILL.md): **module**, **interface**, **seam**, **adapter**, **leverage**.

## Process

### 1. Frame the problem space

Before spawning sub-agents, write a user-facing explanation of the problem space for the chosen candidate:

- The constraints any new interface would need to satisfy
- The dependencies it would rely on, and which category they fall into (see [DEEPENING.md](DEEPENING.md))
- A rough illustrative code sketch to ground the constraints, not a proposal, just a way to make the constraints concrete

Show this to the user, then immediately proceed to Step 2. The user reads and thinks while the sub-agents work in parallel.

### 2. Spawn sub-agents

Spawn 3+ sub-agents in parallel. Each must produce a **radically different** interface for the deepened module.

Prompt each sub-agent with a separate technical brief (file paths, coupling details, dependency category from [DEEPENING.md](DEEPENING.md), what sits behind the seam). The brief is independent of the user-facing problem-space explanation in Step 1. Give each agent a different design constraint:

- Agent 1: "Minimize the interface: aim for 1–3 entry points max. Maximise leverage per entry point."
- Agent 2: "Maximise flexibility: support many use cases and extension."
- Agent 3: "Optimise for the most common caller: make the default case trivial."
- Agent 4 (if applicable): "Design around ports & adapters for cross-seam dependencies."

Include both [SKILL.md](SKILL.md) vocabulary and GLOSSARY.md vocabulary in the brief so each sub-agent names things consistently with the architecture language and the project's domain language.

Each sub-agent outputs:

1. Interface (types, methods, params, plus invariants, ordering, error modes)
2. Usage example showing how callers use it
3. What the implementation hides behind the seam
4. Dependency strategy and adapters (see [DEEPENING.md](DEEPENING.md))
5. Trade-offs: where leverage is high, where it's thin

### 3. Present and compare

Present designs sequentially so the user can absorb each one, then compare them in prose. Contrast by **depth** (leverage at the interface), **locality** (where change concentrates), and **seam placement**.

After comparing, give your own recommendation: which design you think is strongest and why. If elements from different designs would combine well, propose a hybrid. Be opinionated: the user wants a strong read, not a menu.
114 changes: 114 additions & 0 deletions .claude/skills/codebase-design/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
---
name: codebase-design
description: Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
---

# Codebase Design

Design **deep modules**: a lot of behaviour behind a small interface, placed at a clean seam, testable through that interface. Use this language and these principles wherever code is being designed or restructured. The aim is leverage for callers, locality for maintainers, and testability for everyone.

## Glossary

Use these terms exactly: don't substitute "component," "service," "API," or "boundary." Consistent language is the whole point.

**Module**: anything with an interface and an implementation. Deliberately scale-agnostic: a function, class, package, or tier-spanning slice. _Avoid_: unit, component, service.

**Interface**: everything a caller must know to use the module correctly: the type signature, but also invariants, ordering constraints, error modes, required configuration, and performance characteristics. _Avoid_: API, signature (too narrow, they refer only to the type-level surface).

**Implementation**: what's inside a module, its body of code. Distinct from **Adapter**: a thing can be a small adapter with a large implementation (a Postgres repo) or a large adapter with a small implementation (an in-memory fake). Reach for "adapter" when the seam is the topic; "implementation" otherwise.

**Depth**: leverage at the interface. The amount of behaviour a caller (or test) can exercise per unit of interface they have to learn. A module is **deep** when a large amount of behaviour sits behind a small interface, **shallow** when the interface is nearly as complex as the implementation.

**Seam** _(Michael Feathers)_: a place where you can alter behaviour without editing in that place; the *location* at which a module's interface lives. Where to put the seam is its own design decision, distinct from what goes behind it. _Avoid_: boundary (overloaded with DDD's bounded context).

**Adapter**: a concrete thing that satisfies an interface at a seam. Describes *role* (what slot it fills), not substance (what's inside).

**Leverage**: what callers get from depth. More capability per unit of interface they learn. One implementation pays back across N call sites and M tests.

**Locality**: what maintainers get from depth. Change, bugs, knowledge, and verification concentrate in one place rather than spreading across callers. Fix once, fixed everywhere.

## Deep vs shallow

**Deep module** = small interface + lots of implementation:

```
┌─────────────────────┐
│ Small Interface │ ← Few methods, simple params
├─────────────────────┤
│ │
│ Deep Implementation│ ← Complex logic hidden
│ │
└─────────────────────┘
```

**Shallow module** = large interface + little implementation (avoid):

```
┌─────────────────────────────────┐
│ Large Interface │ ← Many methods, complex params
├─────────────────────────────────┤
│ Thin Implementation │ ← Just passes through
└─────────────────────────────────┘
```

When designing an interface, ask:

- Can I reduce the number of methods?
- Can I simplify the parameters?
- Can I hide more complexity inside?

## Principles

- **Depth is a property of the interface, not the implementation.** A deep module can be internally composed of small, mockable, swappable parts; they just aren't part of the interface. A module can have **internal seams** (private to its implementation, used by its own tests) as well as the **external seam** at its interface.
- **The deletion test.** Imagine deleting the module. If complexity vanishes, it was a pass-through. If complexity reappears across N callers, it was earning its keep.
- **The interface is the test surface.** Callers and tests cross the same seam. If you want to test *past* the interface, the module is probably the wrong shape.
- **One adapter means a hypothetical seam. Two adapters means a real one.** Don't introduce a seam unless something actually varies across it.

## Designing for testability

Good interfaces make testing natural:

1. **Accept dependencies, don't create them.**

```typescript
// Testable
function processOrder(order, paymentGateway) {}

// Hard to test
function processOrder(order) {
const gateway = new StripeGateway();
}
```

2. **Return results, don't produce side effects.**

```typescript
// Testable
function calculateDiscount(cart): Discount {}

// Hard to test
function applyDiscount(cart): void {
cart.total -= discount;
}
```

3. **Small surface area.** Fewer methods = fewer tests needed. Fewer params = simpler test setup.

## Relationships

- A **Module** has exactly one **Interface** (the surface it presents to callers and tests).
- **Depth** is a property of a **Module**, measured against its **Interface**.
- A **Seam** is where a **Module**'s **Interface** lives.
- An **Adapter** sits at a **Seam** and satisfies the **Interface**.
- **Depth** produces **Leverage** for callers and **Locality** for maintainers.

## Rejected framings

- **Depth as ratio of implementation-lines to interface-lines** (Ousterhout): rewards padding the implementation. We use depth-as-leverage instead.
- **"Interface" as the TypeScript `interface` keyword or a class's public methods**: too narrow: interface here includes every fact a caller must know.
- **"Boundary"**: overloaded with DDD's bounded context. Say **seam** or **interface**.

## Going deeper

- **Deepening a cluster given its dependencies**, see [DEEPENING.md](DEEPENING.md): dependency categories, seam discipline, and replace-don't-layer testing.
- **Exploring alternative interfaces**, see [DESIGN-IT-TWICE.md](DESIGN-IT-TWICE.md): spin up parallel sub-agents to design the interface several radically different ways, then compare on depth, locality, and seam placement.
3 changes: 3 additions & 0 deletions .claude/skills/codebase-design/agents/openai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
interface:
display_name: "Codebase Design"
short_description: "Vocabulary for deep-module design"
47 changes: 47 additions & 0 deletions .claude/skills/domain-modeling/ADR-FORMAT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# ADR Format

ADRs live in `docs/adr/` and use sequential numbering: `0001-slug.md`, `0002-slug.md`, etc.

Create the `docs/adr/` directory lazily: only when the first ADR is needed.

## Template

```md
# {Short title of the decision}

{1-3 sentences: what's the context, what did we decide, and why.}
```

That's it. An ADR can be a single paragraph. The value is in recording *that* a decision was made and *why*, not in filling out sections.

## Optional sections

Only include these when they add genuine value. Most ADRs won't need them.

- **Status** frontmatter (`proposed | accepted | deprecated | superseded by ADR-NNNN`): useful when decisions are revisited
- **Considered Options**: only when the rejected alternatives are worth remembering
- **Consequences**: only when non-obvious downstream effects need to be called out

## Numbering

Scan `docs/adr/` for the highest existing number and increment by one.

## When to offer an ADR

All three of these must be true:

1. **Hard to reverse**: the cost of changing your mind later is meaningful
2. **Surprising without context**: a future reader will look at the code and wonder "why on earth did they do it this way?"
3. **The result of a real trade-off**: there were genuine alternatives and you picked one for specific reasons

If a decision is easy to reverse, skip it: you'll just reverse it. If it's not surprising, nobody will wonder why. If there was no real alternative, there's nothing to record beyond "we did the obvious thing."

### What qualifies

- **Architectural shape.** "We're using a monorepo." "The write model is event-sourced, the read model is projected into Postgres."
- **Integration patterns between contexts.** "Ordering and Billing communicate via domain events, not synchronous HTTP."
- **Technology choices that carry lock-in.** Database, message bus, auth provider, deployment target. Not every library: just the ones that would take a quarter to swap out.
- **Boundary and scope decisions.** "Customer data is owned by the Customer context; other contexts reference it by ID only." The explicit no-s are as valuable as the yes-s.
- **Deliberate deviations from the obvious path.** "We're using manual SQL instead of an ORM because X." Anything where a reasonable reader would assume the opposite. These stop the next engineer from "fixing" something that was deliberate.
- **Constraints not visible in the code.** "We can't use AWS because of compliance requirements." "Response times must be under 200ms because of the partner API contract."
- **Rejected alternatives when the rejection is non-obvious.** If you considered GraphQL and picked REST for subtle reasons, record it; otherwise someone will suggest GraphQL again in six months.
60 changes: 60 additions & 0 deletions .claude/skills/domain-modeling/GLOSSARY-FORMAT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# GLOSSARY.md Format

## Structure

```md
# {Context Name}

{One or two sentence description of what this context is and why it exists.}

## Language

**Order**:
{A one or two sentence description of the term}
_Avoid_: Purchase, transaction

**Invoice**:
A request for payment sent to a customer after delivery.
_Avoid_: Bill, payment request

**Customer**:
A person or organization that places orders.
_Avoid_: Client, buyer, account
```

## Rules

- **Be opinionated.** When multiple words exist for the same concept, pick the best one and list the others under `_Avoid_`.
- **Keep definitions tight.** One or two sentences max. Define what it IS, not what it does.
- **Only include terms specific to this project's context.** General programming concepts (timeouts, error types, utility patterns) don't belong even if the project uses them extensively. Before adding a term, ask: is this a concept unique to this context, or a general programming concept? Only the former belongs.
- **Group terms under subheadings** when natural clusters emerge. If all terms belong to a single cohesive area, a flat list is fine.

## Single vs multi-context repos

**Single context (most repos):** One `GLOSSARY.md` at the repo root.

**Multiple contexts:** A `GLOSSARY-MAP.md` at the repo root lists the contexts, where they live, and how they relate to each other:

```md
# Glossary Map

## Contexts

- [Ordering](./src/ordering/GLOSSARY.md): receives and tracks customer orders
- [Billing](./src/billing/GLOSSARY.md): generates invoices and processes payments
- [Fulfillment](./src/fulfillment/GLOSSARY.md): manages warehouse picking and shipping

## Relationships

- **Ordering → Fulfillment**: Ordering emits `OrderPlaced` events; Fulfillment consumes them to start picking
- **Fulfillment → Billing**: Fulfillment emits `ShipmentDispatched` events; Billing consumes them to generate invoices
- **Ordering ↔ Billing**: Shared types for `CustomerId` and `Money`
```

The skill infers which structure applies:

- If `GLOSSARY-MAP.md` exists, read it to find contexts
- If only a root `GLOSSARY.md` exists, single context
- If neither exists, create a root `GLOSSARY.md` lazily when the first term is resolved

When multiple contexts exist, infer which one the current topic relates to. If unclear, ask.
Loading
Loading