First off, thank you for considering contributing to TRACE.
TRACE is not just a codebase; it is a philosophy of time, perception, and digital peace. We welcome contributors who share our vision of creating "Digital Furniture"—software that is felt rather than used.
This document guides you through our vision, our coding standards, and our workflow to ensure that TRACE remains a cohesive, meditative experience.
Before writing a single line of code, please understand the psychological principles that govern this project. We will reject contributions that violate these core tenets, regardless of code quality.
- Zero-UI: We avoid buttons, menus, and overlays unless absolutely necessary. Interactions should be invisible and intuitive (e.g., Long Press, Hover).
- Temporal Fading: We respect the passage of time. Visuals for the past must desaturate or fade. We do not use bright colors for historical data.
- Neuroaesthetics:
- Fluid Motion: All animations must use specific cubic-bezier curves (e.g.,
0.22, 1, 0.36, 1) or physics-based timing. No linear animations. - Perceptual Color: We use OKLCH exclusively to ensure consistent lightness across themes. Do not use RGB/HEX for dynamic theme colors.
- Fluid Motion: All animations must use specific cubic-bezier curves (e.g.,
- Performance as Zen: A choppy frame rate breaks the meditative state. We mandate GPU acceleration (
backface-visibility: hidden) for all moving elements.
We follow the GitHub Flow strategy (Trunk-Based Development).
| Branch | Purpose |
|---|---|
main |
Production-ready, always stable |
feat/* |
New features |
fix/* |
Bug fixes |
docs/* |
Documentation updates |
refactor/* |
Code refactoring |
Before you begin, ensure you have:
- Git (v2.30+) installed and configured
- A GitHub account with SSH keys set up (guide)
- A modern browser for testing (Chrome, Firefox, Safari)
-
Fork the Repository
Click the "Fork" button on the top right of the repository page to create your own copy.
-
Clone Your Fork
git clone git@github.com:YOUR-USERNAME/trace.git cd trace -
Add Upstream Remote
This allows you to sync with the original repository:
git remote add upstream git@github.com:ledihildawan/trace.git git remote -v # Should show: # origin git@github.com:YOUR-USERNAME/trace.git (fetch) # origin git@github.com:YOUR-USERNAME/trace.git (push) # upstream git@github.com:ledihildawan/trace.git (fetch) # upstream git@github.com:ledihildawan/trace.git (push)
Always sync before starting new work. This prevents merge conflicts and ensures you're building on the latest code.
# Fetch latest changes from upstream
git fetch upstream
# Switch to your main branch
git checkout main
# Merge upstream changes into your local main
git merge upstream/main
# Push updates to your fork
git push origin mainNever work directly on main. Always create a descriptive branch:
# Ensure you're on an updated main
git checkout main
git pull upstream main
# Create and switch to a new branch
git checkout -b feat/temporal-soundscapeBranch Naming Convention: type/short-description
| Type | Use Case | Example |
|---|---|---|
feat/ |
New features | feat/ambient-audio |
fix/ |
Bug fixes | fix/safari-hover-bug |
docs/ |
Documentation | docs/update-api-guide |
style/ |
Formatting, CSS | style/oklch-refactor |
refactor/ |
Code restructuring | refactor/date-utils |
perf/ |
Performance | perf/gpu-acceleration |
chore/ |
Build, tooling | chore/update-deps |
Write your code following the Coding Standards section below. As you work:
- Commit early and often with meaningful messages
- Test your changes in multiple browsers
- Keep commits focused — one logical change per commit
We use Conventional Commits to auto-generate changelogs and enable semantic versioning.
Format:
<type>[optional scope]: <imperative description>
[optional body]
[optional footer(s)]
Rules:
- Use imperative mood: "add", "fix", "update" — not "added" or "fixed"
- Keep subject line under 72 characters
- Separate body with a blank line
- Reference issues when applicable:
Closes #42
Examples:
# Simple commit
git commit -m "feat: add subtle ambient sound on long press"
# Commit with scope
git commit -m "fix(safari): resolve hover state persistence bug"
# Commit with body and footer
git commit -m "feat(audio): implement temporal soundscape engine
- Add WebAudio API integration for ambient sounds
- Create frequency mapping based on time distance
- Implement smooth crossfade between sound states
Closes #128"Breaking Changes:
For breaking changes, add ! after the type or include a BREAKING CHANGE: footer:
git commit -m "feat!: redesign timeline interaction model
BREAKING CHANGE: Long press gesture now requires 500ms instead of 300ms"Before pushing, rebase your branch onto the latest main to maintain a clean history:
# Fetch latest upstream changes
git fetch upstream
# Rebase your branch onto upstream/main
git rebase upstream/main
# If there are conflicts, resolve them, then:
git add .
git rebase --continueInteractive Rebase (Optional):
If you have multiple small commits, consider squashing them:
git rebase -i upstream/main
# In the editor, change "pick" to "squash" for commits to combine# First push
git push origin feat/temporal-soundscape
# If you rebased after pushing, force push (with care)
git push origin feat/temporal-soundscape --force-with-lease
⚠️ Note: Only use--force-with-leaseon your own feature branches, never on shared branches.
- Go to the TRACE repository
- Click "Compare & pull request"
- Fill out the PR template completely
- Link any related issues (e.g.,
Closes #42) - Request a review from maintainers
PR Checklist:
- My code follows the TRACE philosophy (Zero-UI, Temporal Fading, Neuroaesthetics)
- I have tested on multiple browsers (Chrome, Firefox, Safari)
- My changes don't introduce console errors or warnings
- I have updated documentation if needed
- My commits follow Conventional Commits format
- I have rebased onto the latest
main
Maintainers may request changes. To update your PR:
# Make requested changes
git add .
git commit -m "fix: address review feedback"
# Push updates
git push origin feat/temporal-soundscapeFor significant rework, consider squashing fixup commits:
git rebase -i upstream/main
# Squash fixup commits into the original
git push origin feat/temporal-soundscape --force-with-lease🎉 Congratulations! Clean up your local environment:
# Switch to main
git checkout main
# Delete your local feature branch
git branch -d feat/temporal-soundscape
# Delete the remote branch (optional, GitHub can auto-delete)
git push origin --delete feat/temporal-soundscape
# Sync your fork with upstream
git pull upstream main
git push origin main- Semantic Structure: Use strictly semantic HTML5.
- No Frameworks: TRACE is a Vanilla JS project. Do not introduce React, Vue, or heavy libraries without a major architectural discussion.
- Variable-First: All colors, spacing, and timing must be defined in
:root. - OKLCH Engine: All dynamic colors must be derived using
oklch(from var(--base) ...). - GPU Layers: Use
will-change,backface-visibility: hidden, andtransform-style: preserve-3dfor any element that animates (hover, transitions).
- ES6 Modules: Use modern ES6 syntax.
- UTC Time Handling: All
Dateobjects must use UTC methods (Date.UTC(),getUTCFullYear(), etc.) to avoid timezone shifting bugs. - Constants Over Magic Numbers: Define all timing, visual effect, and threshold values as static class constants (e.g.,
static LONG_PRESS_DURATION = 800). - JSDoc Documentation: All class methods must include JSDoc comments with parameter types and descriptions.
- Event Delegation: Use event delegation on parent containers instead of attaching individual listeners to avoid memory leaks.
- Error Handling: Wrap
localStorageoperations and external API calls in try-catch blocks. - Performance: Use
requestAnimationFramefor visual updates. AvoidsetIntervalfor high-frequency rendering. - XSS Prevention: Never use
innerHTMLwith dynamic content. UsetextContentandcreateElement()instead. - Cleanup Methods: Implement
destroy()methods that clear all timers, intervals, and event listeners.
- Content Security Policy: The application includes CSP headers - ensure any new external resources are whitelisted.
- Input Sanitization: All user-facing text must be rendered using safe DOM methods, never
innerHTML. - localStorage Safety: Always wrap storage operations in try-catch blocks to handle private browsing mode and quota limits.
- Dependency Audits: Keep external dependencies (fonts, libraries) to a minimum and verify integrity.
- Keyboard Navigation: Implement roving tabindex patterns for grid/list navigation using arrow keys (ArrowUp, ArrowDown, ArrowLeft, ArrowRight, Home, End).
- ARIA Labels: All interactive elements must have descriptive
aria-labelattributes in English. - Screen Reader Support: Use
aria-liveregions for dynamic content announcements. - Focus Management: Visible focus indicators required for all interactive elements.
- Language Consistency: All
aria-label,title, and screen reader text must be in English (lang="en").
We use GitHub Issues to track our work. Before opening a PR, check if an issue exists.
We use the following labels to categorize issues and PRs:
| Label | Meaning |
|---|---|
bug |
Something isn't working as intended. |
feature request |
Proposed ideas waiting for a philosophy check. |
documentation |
Improvements or additions to documentation. |
accessibility |
Improvements for screen readers, keyboard navigation, and ARIA standards. |
| Label | Meaning |
|---|---|
good first issue |
Simple tasks for newcomers to the project. |
help wanted |
Extra attention is needed. |
| Label | Meaning |
|---|---|
neuroaesthetics |
Focus on feel, motion curves, and psychological impact. |
visual-polish |
Pixel-perfect design tweaks and OKLCH color harmony. |
performance |
GPU acceleration, frame rates, and efficiency. |
| Label | Meaning |
|---|---|
philosophy mismatch |
Contributions that conflict with the core project vision. |
out of scope |
Suggestions that violate Zero-UI or minimalist principles. |
- Reporters: When creating an issue, select the most appropriate label.
- Maintainers: Will add additional labels as needed during triage.
- Contributors: Use labels to find issues aligned with your interests.
When you submit a PR, the maintainers will review it based on:
- Psychological Integrity: Does this feature add noise? Does it distract? If yes, it will be rejected.
- Code Quality: Is it clean? Does it follow the naming conventions?
- Performance: Does it cause jitter on mobile devices?
- Initial Response: Within 48 hours
- Full Review: Within 7 days for small PRs, 14 days for larger changes
- Merge: After all checks pass and at least one maintainer approves
Issues and PRs may be labeled with philosophy mismatch or out of scope if they don't align with TRACE's vision. Here's how to fix them:
| Rejection Reason | Label Applied | How to Fix |
|---|---|---|
| Introduces unnecessary UI elements | philosophy mismatch, out of scope |
Remove buttons/overlays, use gestures (long press, hover) instead |
| Linear or choppy animations | neuroaesthetics |
Use cubic-bezier(0.22, 1, 0.36, 1) or physics-based curves |
| Uses RGB/HEX for dynamic colors | visual-polish |
Convert to OKLCH with oklch(from var(--base) ...) |
| Causes performance jitter | performance |
Add GPU acceleration: backface-visibility: hidden, will-change, etc. |
| Memory leaks from event listeners | performance |
Use event delegation instead of individual element listeners |
| Uses magic numbers | — | Extract to static class constants with descriptive names |
| Missing JSDoc comments | — | Add JSDoc with @param and @returns tags to all methods |
| Uses local time instead of UTC | bug |
Replace new Date() methods with UTC equivalents |
| Missing error handling | — | Wrap localStorage and external calls in try-catch blocks |
| XSS vulnerability with innerHTML | security |
Replace with textContent and createElement() |
| Missing cleanup in component | performance |
Implement destroy() method to clear timers and listeners |
| Unclear or non-standard commits | — | Rewrite using Conventional Commits format |
If you need help at any point:
- 💬 Discussions: GitHub Discussions for questions and ideas
- 📖 Documentation: Check the README and this guide
- 🐛 Issues: Search existing issues before creating new ones
We value every contribution! Contributors will be:
- Listed in our README contributors section
- Mentioned in release notes when their changes ship
- Given appropriate credit in commit history
Thank you for helping us shape time. 🕰️