Skip to content

Refactor codebase foundations for clearer boundaries - #17

Merged
QuentinHourdeaux merged 4 commits into
mainfrom
refactor/lib-foundation
Jul 8, 2026
Merged

Refactor codebase foundations for clearer boundaries#17
QuentinHourdeaux merged 4 commits into
mainfrom
refactor/lib-foundation

Conversation

@QuentinHourdeaux

@QuentinHourdeaux QuentinHourdeaux commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Summary

This PR refactors Stackdraft codebase foundations around clearer human-facing boundaries and stricter shared standards.

  • documents the intended backend/frontend structure and codebase standards
  • splits backend definitions, core services, infrastructure adapters, and shared mechanics into explicit folders
  • centralizes backend tagged errors and extracts reusable HTTP, SQLite, time, and validation helpers
  • replaces the State repository naming with a core store contract and SQLite store implementation
  • moves frontend API, async, and form-error mechanics into frontend/src/lib while keeping entity API clients under frontend/src/api

Why

The main goal is maintainability: make the codebase easier for humans to scan, extend, and review as Stackdraft grows beyond the first State endpoints. The refactor keeps domain/resource behavior visible at call sites while moving repeated mechanics into small shared helpers.

Impact

The public State API behavior is preserved except that GET /api/states now treats scope as an explicitly required single query parameter at the HTTP boundary. Existing frontend callers already use the single-scope form.

Validation

  • deno task ci

@QuentinHourdeaux
QuentinHourdeaux marked this pull request as ready for review July 8, 2026 17:15
@QuentinHourdeaux
QuentinHourdeaux merged commit 65f3a70 into main Jul 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant