This docs/ directory contains the authoritative contributor documentation for the Open Elements repository. It provides comprehensive guidance for contributing to this Next.js-based website project, which combines modern frontend development with markdown-driven content management.
This documentation suite is designed for:
- First-time Contributors: Individuals new to the project who need foundational understanding of repository structure, workflows, and contribution processes
- Maintainers & Onboarding Leads: Team members responsible for evaluating contributions and guiding contributors through the review and deployment pipeline
- Content & Engineering Contributors: Developers and technical writers shipping content updates, page modifications, feature implementations, and ensuring quality standards are met
The following guides provide structured information organized by topic and use case:
| Document | Purpose | Audience |
|---|---|---|
| 01 - Repository Overview | Comprehensive overview of project structure, technology stack, and architectural patterns | All contributors |
| 02 - Content Folder Guide | Detailed explanation of content organization, markdown structure, and content management model | Content contributors, page editors |
| 03 - Adding Pages | Step-by-step guide to implementing new pages including routing, content, and component integration | Feature developers, content editors |
| 04 - Adding Blog Posts | Dedicated workflow for post creation in content/posts/, including front matter, URL rules, and linking conventions |
Content contributors, editors |
| 05 - First Contribution Checklist | Pre-submission validation checklist ensuring code quality, documentation completeness, and testing coverage | All contributors |
| 06 - Testing and Quality Checks | Comprehensive guide to automated testing, linting, build validation, and quality assurance procedures | Developers, QA reviewers |
| 07 - GitHub Automation Guide | Documentation of automated workflows, CI/CD processes, and GitHub Actions behavior | Maintainers, advanced contributors |
To successfully onboard and make your first contribution, please follow this reading sequence:
-
01 - Repository Overview (10 min)
- Understand project structure and technology stack
- Familiarize yourself with key directories and their purposes
- Learn the hybrid content + code model
-
02 - Content Folder Guide (10 min)
- Learn how content is organized and structured
- Understand markdown frontmatter and metadata requirements
- Discover content conventions and best practices
-
03 - Adding Pages (10 min)
- Follow the end-to-end workflow for adding new pages
- Learn the integration pattern between content and routing
- Understand asset management
-
04 - Adding Blog Posts (5 min, when working on posts)
- Learn the post-specific filename and front matter schema
- Follow
/posts/...routing conventions and linking rules - Avoid common metadata and visibility mistakes
-
05 - First Contribution Checklist (5 min)
- Validate your work before submitting a pull request
- Ensure all quality gates are met
- Review PR submission requirements
Consult these documents as needed while actively developing:
- 06 - Testing and Quality Checks - When running validation commands or debugging test failures
- 07 - GitHub Automation Guide - When troubleshooting CI failures or understanding review workflows
- 04 - Adding Blog Posts - When adding or translating any file in
content/posts/
- Node.js: Compatible version as specified in
.nvmrcor project lockfile - pnpm: Package manager used across this project (install via
npm install -g pnpm) - Git: For version control and repository access
Initialize the development environment and launch the application:
# Install all project dependencies
pnpm install
# Start the development server with hot-reload
pnpm run devOnce the server is running, navigate to http://localhost:3000 in your web browser to view the application.
Development Server Details:
- Hot Module Replacement (HMR) is enabled for rapid development iteration
- Changes to files are reflected immediately without full page reloads
- TypeScript type-checking occurs during compilation
To generate a production-optimized build:
pnpm run build
pnpm run startBefore submitting a pull request, ensure all validation commands pass successfully:
pnpm run lintValidates TypeScript code, enforces code style conventions, and detects potential issues using ESLint and project-configured rules. Fix automatically correctable violations:
pnpm run lint --fixpnpm run buildCompiles TypeScript, bundles assets, and generates the production-ready application. This ensures there are no build-time errors or type mismatches.
pnpm run test:e2eExecutes automated browser-based tests using Playwright. These tests validate critical user flows and ensure functionality works as expected across the application.
Run all quality checks in sequence:
pnpm run lint && pnpm run build && pnpm run test:e2eNote: Ensure all commands complete successfully before opening a pull request, as CI/CD will run these same checks as gate conditions.
Documentation is a critical component of project maintainability and contributor experience. It must remain current and accurate.
Update documentation in this folder whenever you:
- Modify Project Structure: Changes to directory organization, file locations, or architectural layers
- Update Contributor Workflows: Changes to pull request processes, code review procedures, or deployment pipelines
- Modify GitHub Automation: Changes to Actions workflows, branch protection rules, or automated checks
- Add New Tools or Dependencies: Significant additions to the technology stack or development tooling
- Change Deployment or Release Process: Modifications to how code reaches production
All documentation updates must:
-
Included in Same PR: Documentation updates must be submitted in the same pull request as the associated code changes. Never separate documentation from implementation changes.
-
Keep Examples Current: Verify all code samples, command examples, file paths, and configuration snippets match the current state of the repository. Outdated examples create confusion and waste contributor time.
-
Maintain Consistency: Ensure documentation language, formatting, and terminology aligns with existing docs in this folder.
-
Update Related Sections: If you update one guide, check related guides for consistency. Cross-references must remain accurate.
- Adding a new configuration option? → Update the relevant guide and include it in your PR alongside the code change
- Changing CI workflow? → Update
07-github-automation.mdin the same PR - Restructuring content organization? → Update
02-content-folder.mdalong with your code changes
- Read 01 - Repository Overview to locate the relevant code
- Make your code changes and ensure they pass:
pnpm run lint && pnpm run build && pnpm run test:e2e - Use 05 - First Contribution Checklist before submitting the PR
- Follow 02 - Content Folder Guide for content structure
- Study 03 - Adding Pages if adding new pages
- Use 04 - Adding Blog Posts for any blog/article work in
content/posts/ - Verify quality with the validation commands
- Reference 05 - First Contribution Checklist when ready to submit
- Start with 01 - Repository Overview
- Understand existing patterns in the codebase before implementing
- For frontend changes, refer to component patterns and TypeScript conventions
- Run full validation suite:
pnpm run lint && pnpm run build && pnpm run test:e2e - Follow the checklist in 05 - First Contribution Checklist
- Build or test failures? → Consult 06 - Testing and Quality Checks
- Unsure about automation behavior? → Review 07 - GitHub Automation Guide
- Need help with page structure? → Check 03 - Adding Pages or 02 - Content Folder Guide
- Need help with post metadata or
/posts/...links? → Check 04 - Adding Blog Posts - Repository questions? → See 01 - Repository Overview for architecture and structure details
- ADDING_PAGES.md - Legacy documentation for reference (prefer the guides in this docs folder)
- README.md - Project-level README with high-level overview
- GitHub Workflows - Automated CI/CD pipeline definitions