Contributing to This Glorious Wedding Website Thing
First off, thanks for considering contributing! Seriously, you clicking here is probably the highlight of my week. Whether you found a bug that annoys you more than a misplaced seating card, have a genius idea for a feature (like, maybe, automatically RSVPing 'yes' for everyone?), or just want to fix my questionable code, your help is appreciated.
This project, while built for a specific wedding, is also a bit of a portfolio piece and an experiment in slightly-too-complex-for-a-wedding-website engineering. So, let's keep it fun and maybe slightly professional.
Ground Rules (The "Please Don't Make Me Cry" List)
- Be Nice: Seriously. We're all just trying to make cool stuff (or, in this case, a functional website). Let's be respectful and constructive.
- Check Existing Issues: Before you file a new bug report or feature request, please take a quick peek at the existing issues to see if someone else has already mentioned it. Maybe add a thumbs-up or your own details to an existing issue.
- Use the Templates: When you do create a new issue, please use the provided templates in
.github/ISSUE_TEMPLATE/(Bug Report,Feature Request,Documentation Improvement,Accessibility Issue Report,Configuration Management Improvement,Refactoring & Code Quality Task,Testing Improvement Task,UI/UX Improvement Suggestion). They help me understand what's going on without needing a crystal ball.
How to Contribute (The Fun Part!)
Fork the Repo: Click that 'Fork' button up top. This creates your own copy of the project.
Clone Your Fork:
bashgit clone https://github.com/YOUR_USERNAME/wedding_website.git cd wedding_websiteSet Up: Follow the setup instructions in the Developer Setup Guide (or root README.md). Make sure you can run the project locally (
npm run dev).Create a Branch: Make a new branch for your changes. Name it something descriptive, like
fix/registry-typoorfeat/add-confetti-button.bashgit checkout -b fix/registry-typoMake Your Changes: Write your code, fix the bug, or improve the docs while adhering to our TypeScript, React, Tailwind CSS, and ESLint rules:
- Scaffold New Feature Modules: When introducing a new domain feature under
src/features/, runnpm run scaffold -- <feature-name>(scripts/scaffold-feature.mjs, kebab-case) to generate the standardapi/,components/,hooks/,lib/,schemas.ts,types.ts,repository.ts,service.ts, and publicindex.tsbarrel structure. - Strict ESLint Enforcement: Run
npm run lint(ornpm run lint:fix).eslint.config.mjsenforces error-level rules that fail builds, pre-commit hooks, and CI — including single quotes (@stylistic/quotes), 2-space indentation (@stylistic/indent), required semicolons (@stylistic/semi),prefer-const, public feature barrel imports only (no-restricted-importsbanning@/features/*/*), utility import boundaries (local-rules/no-restricted-utility-imports), norequire()imports outside.cjs(@typescript-eslint/no-require-imports), zero unused imports or variables (unused-imports/no-unused-imports,unused-imports/no-unused-vars), React Hook dependencies (react-hooks/exhaustive-deps), JSX entities and ARIA role support (react/no-unescaped-entities,jsx-a11y/role-supports-aria-props), Next.js image/navigation guardrails (@next/next/no-img-element,@next/next/no-location-assign-relative-destination), and@typescript-eslint/no-explicit-anyoutside the shrink-onlyLEGACY_EXPLICIT_ANY_BASELINE_FILESlist — with--max-warnings 0enforced innpm run lintand--max-warnings=0on staged files inlint-staged.
- Scaffold New Feature Modules: When introducing a new domain feature under
Test Your Changes & Run Quality Gates: Before submitting your PR, ensure all quality gates pass locally. You can run all checks at once or individual commands:
Run All Quality Checks:
bashnpm run quality # or: npm run check:allExecutes all static checks, linters, documentation portal (
npm run docs:build), Storybook (npm run build-storybook), and static HTML showcase (npm run build:export) builds, and unit/integration tests (npm run test:cov) via scripts/check-quality.ts (see AGENTS.md and TESTING.md for details).Targeted Quality & Documentation Sync Commands:
npm run check:static- Run the shared static and container configuration checks defined inscripts/check-quality.ts(--static).npm run check:doc-sync&npm run docs:sync- Verify generated documentation (public/openapi.json,ARCHITECTURE.md, andFEATURE_MODULES.md) is synchronized with codebase schemas in memory without modifying files on disk (--check), or explicitly regenerate them on disk withnpm run docs:sync(npx tsx scripts/generate-openapi.ts && npx tsx scripts/generate-docs.ts --skip-openapi).npm run typecheck,npm run lint, &npm run lint:unused- Check TypeScript types (see AGENTS.md for the five-filetsconfig*.jsonsplit), ESLint rules (--max-warnings 0with content-hashed.eslintcachevia--cache-strategy contentand the shrink-onlyLEGACY_EXPLICIT_ANY_BASELINE_FILESratchet), and Knip unused exports.npm test,npm run test:cov,npm run test:e2e, &npm run test:a11y- Run fast local Jest unit/integration tests (npm test, ornpm test -- <path>), enforce global80%line /68%branch coverage (npm run test:cov), run Playwright E2E specs, and run WCAG 2.2 AA accessibility audits (see TESTING.md forwedding_testdatabase isolation, E2E secret alignment, and container smoke tests).
Commit Your Changes: Write clear commit messages. Something like
fix: Correct spelling on registry item descriptionorfeat: Add animation to RSVP button.bashgit add . git commit -m "fix: Correct spelling on registry item description"Committing triggers
.githooks/pre-commit(installed automatically bynpm ci), which materializes the staged Git index (git write-tree) into an ephemeral snapshot directory (hydratingnode_modulesand path-rewritten.eslintcacheviascripts/quality/worktree-cache.mjs), runsnpx lint-staged(--no-stash --no-revert --no-hide-partially-staged --diff=--staged --diff-filter=ACMRD:eslint --cache --cache-location .eslintcache --cache-strategy content --no-warn-ignored --no-error-on-unmatched-pattern --fix --max-warnings=0via a single unified{*.{js,jsx,ts,tsx,mjs,cjs,mts,cts},**/*.{js,jsx,ts,tsx,mjs,cjs,mts,cts},.githooks/*}glob, pluscheck:action-pins,lint:migrations,check:prisma -- --skip-generate,check:standalone -- --static-only,check:links,check:setup-guides, andcheck:runbookson staged workflows, SQL migrations,prisma/schema.prismaandsrc/lib/readinessManifest.ts, container files,package.jsonandpackage-lock.jsonmanifests, added/modified/deleted Markdown docs anddocs-portal/.vitepress/config.mts,.nvmrcand.npmrc, andnext.config.ts), writeseslint --fixblobs back to the active Git index, and applies non-conflicting fix hunks to the working tree without stashing or resetting unstaged edits or untracked files.Push to Your Fork:
bashgit push origin fix/registry-typoPushing triggers
.githooks/pre-push(installed automatically bynpm ci):- Ref Inspection & Ephemeral Worktree Isolation: Parses pushed refs from
stdin(skipping branch deletions and up-to-date refs) and runs in place whenHEAD, tracked files, and non-ignored untracked files (git status --porcelain --untracked-files=normal) match the pushed commit, or inside an ephemeral detachedgit worktree(hydratingnode_moduleswith isolatednode_modules/.prismawheneverprisma/schema.prismadiverges,.eslintcacherewritten to worktree paths viascripts/quality/worktree-cache.mjs, content-hashed*.tsbuildinfo, andnext-env.d.tsplus.next/typesonly when.next/types/.route-manifest.jsonmatches the worktree route digest) without stashing or resetting local files. - Parallel Verification Profile: Prepares Prisma Client once (
ensurePrismaClientReady) before launching checks in parallel via a bounded worker pool (scripts/quality/parallel-pool.mjs) aligned with the sharednpm run check:pre-pushprofile inscripts/check-quality.ts(--pre-push:type-checkviascripts/quality/run-typecheck.mjs,lint,lint:unused,check:prisma -- --skip-generate, conditionalcheck:auditwhen pushed commits modifypackage.json,package-lock.json,docker/prisma-cli/package.json, ordocker/prisma-cli/package-lock.json, and all lightweight static checks includingcheck:standalone -- --static-onlyfor container digest pins andpackage.jsonlockfile specifier sync).
- Ref Inspection & Ephemeral Worktree Isolation: Parses pushed refs from
Open a Pull Request (PR): Go back to the original
fderuiter/wedding_websiterepository on GitHub. You should see a prompt to create a Pull Request from your new branch. Click it!- Give your PR a clear title and description.
- Reference any relevant issues (e.g., "Fixes #123").
- Explain what you changed and why.
Wait Patiently: I'll review the PR as soon as I can. I might ask for changes or clarification. Once it's approved, I'll merge it in. You're a contributor!
A Note on Documentation & Upstream Compatibility
We treat upstream compatibility as a core feature of this template. If your pull request introduces changes that affect downstream adopters (such as database migrations, configuration schema changes, environment variables, or breaking changes):
- Categorize Changes: Check the appropriate categories in the PR template (🚀 Application, 🗄️ Schema, ⚙️ Configuration, 🐳 Deployment, ⚠️ Breaking Change, 📚 Documentation).
- Flag Adopter Action: Explicitly flag whether the change requires downstream adopter action (
Adopter Action Required: Yes | No). - Migration Instructions: Include clear, step-by-step migration instructions in the PR description if database migrations, environment variable additions, or breaking changes are involved.
- Docs Sync: Keep documentation in sync. For details on versioning guidelines and release categorization, refer to docs/versioning.md and docs/upgrading.md.
Shared Code and Reusability Guidelines
To minimize codebase bloat and prevent technical debt, we enforce a strict manual review process for shared code reusability. Before creating any new UI component or utility function, you must verify if a suitable solution already exists.
Step-by-Step Verification Process
- Search Existing Codebase:
- Run a global search or check the
src/components/ui/folder for existing visual elements (e.g., buttons, overlays, form inputs). - Run a global search or check the
src/utils/andsrc/lib/directories for common helper logic (e.g., date helpers, class merging utilities, client wrappers).
- Run a global search or check the
- Review Existing Files Directly:
- Browse
src/components/ui/andsrc/utils/to see if there is an existing component or function that can be extended or configured via props/arguments instead of writing a new one from scratch.
- Browse
- Ask/Consult:
- For non-trivial logic, consult other contributors or review existing open pull requests to check if someone else is already implementing a similar helper or component.
- Determine Placement:
- If the logic is specific only to one domain or feature (e.g., RSVP list table, weather-specific widget), place it in
src/features/<feature-name>/{components,hooks}/. Keep it isolated from the generic shared folders. - If the logic is general-purpose, reusable, and domain-agnostic, it should be placed in
src/components/ui/(for UI primitives) orsrc/utils/(for stateless utilities).
- If the logic is specific only to one domain or feature (e.g., RSVP list table, weather-specific widget), place it in
Standards for Shared Utility Functions
All new utility functions placed in the global src/utils/ folder must follow these strict style and location standards:
- Domain-Agnostic: They must be generic and completely decoupled from specific business logic, wedding details, or feature schemas. For example, a function to format dates (
formatDate) is domain-agnostic, while a function to format RSVP-specific registry items belongs in the registry feature folder. - Stateless and Pure: Utility functions must be pure functions with no side effects. They must not rely on global state, mutable external variables, or perform asynchronous networking. Given the same inputs, they must always return the same outputs.
- TypeScript & Quality: Explicitly define TypeScript argument and return types. Avoid the use of
any. - Placement:
- Place domain-agnostic, stateless helpers in
src/utils/(e.g., as standalone utility files or added to an existing domain-agnostic utility file). - Ensure that feature-specific logic is strictly isolated in feature-specific subdirectories under
src/features/(usenpm run scaffold -- <feature-name>when creating a new feature module).
- Place domain-agnostic, stateless helpers in
Code Style
- TypeScript: Strict mode (
strict,noUnusedLocals,noUnusedParameters) is enforced across all fivetsconfig*.jsonfiles. Explicitly define types and avoidany. - React: Functional components with Hooks are the way.
- Tailwind CSS: Utility classes first. Avoid custom CSS unless absolutely necessary.
- Formatting & Imports (
eslint.config.mjs): Single quotes, 2-space indentation, semicolons,prefer-const, zero unused imports or variables (unused-imports/no-unused-imports,unused-imports/no-unused-vars), norequire()outside.cjs, cross-feature imports strictly via@/features/<domain>public barrels, React Hook dependencies (react-hooks/exhaustive-deps), JSX entity/ARIA role rules (react/no-unescaped-entities,jsx-a11y/role-supports-aria-props), Next.js image/navigation rules (@next/next/no-img-element,@next/next/no-location-assign-relative-destination), and@typescript-eslint/no-explicit-anyoutside the shrink-only legacy baseline are enforced as errors bynpm run lint(--max-warnings 0; usenpm run lint:fixto auto-format) andlint-staged(--max-warnings=0).
Code of Conduct
Basically, don't be a jerk. Treat everyone with respect. If you see someone violating this simple rule, let me know.
Thanks again for helping out!