Gradiente is a lightweight, renderer-agnostic gradient toolkit for modern rendering systems.
This file documents repository conventions, architecture rules, and development guidelines.
Project vision: VISION.md
Project overview: README.md
src/- Library source codetests/- Vitest test suitedocs/- VitePress documentation sitedist/- Build output
Core logic must not depend on:
- DOM APIs
- Browser globals
- CSSOM / Canvas / WebGL runtime objects
- Framework-specific APIs
Renderer/platform integrations belong in adapters or serializers.
All parsing, transformation, validation, and serialization should operate on Gradiente's internal gradient model.
Platform-specific formats are adapters only.
Gradiente favors:
- Pure functions
- Immutable data transforms
- Composable utility APIs
Avoid unnecessary class-heavy abstractions.
New public exports should meet at least one of:
- Broad practical usefulness
- Architectural necessity
- Strong composability value
Avoid exporting internal helpers prematurely.
- All parsers require roundtrip tests
- All serializers require snapshot/contract tests
- New gradient transforms require edge-case coverage
- Bug fixes should include regression tests where practical
- One PR / change = one focused concern
- Avoid bundling unrelated refactors
- Large architecture changes should align with
VISION.md
- Language: TypeScript (ESM)
- Prefer strict typing; avoid
any - Add comments for non-obvious math/logic
- Prefer clarity over cleverness
- Keep files reasonably small and focused
Gradiente is infrastructure.
The goal is not to own rendering pipelines or editor logic - the goal is to provide the best gradient foundation possible.