Thank you for your interest in contributing to DevLog! This guide will help you understand our development workflow and standards.
- Getting Started
- Development Workflow
- AI Guidance System
- Code Standards
- Testing
- Pull Requests
- Commit Conventions
- Node.js v18+
- Git
- GitHub account
- GitHub CLI (
gh) recommended for PR creation
-
Clone the repository
git clone https://github.com/ericthayer/devlog.git cd devlog -
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env # Edit .env with your API keys: # - VITE_API_KEY (Google Gemini) # - VITE_SUPABASE_URL # - VITE_SUPABASE_ANON_KEY
-
Run database migrations
- See README.md for Supabase setup
-
Start development server
npm run dev
We use feature branches for all development:
# Create a feature branch
git checkout -b feat/your-feature-name
# Or for bug fixes
git checkout -b fix/issue-description
# Or for documentation
git checkout -b docs/what-youre-documentingBranch naming conventions:
feat/- New featuresfix/- Bug fixesrefactor/- Code refactoringdocs/- Documentation updatestest/- Test additions or updatesperf/- Performance improvements
- Before coding: Check the AI Guidance System
- Write code: Follow Code Standards
- Add tests: All features should have tests
- Run tests:
npm test - Build: Verify with
npm run build - Commit: Follow Commit Conventions
-
Push your branch
git push origin your-branch-name
-
Create a Pull Request
Option A: GitHub CLI (Recommended)
gh pr create --base main --head your-branch-name
Option B: Manual
- Go to https://github.com/ericthayer/devlog/pulls
- Click "New Pull Request"
- Select your branch
- Fill in the PR template
See .github/GITHUB_AUTH_SETUP.md for authentication setup.
-
Wait for review
- Address any feedback
- Make requested changes
- Push updates to the same branch
DevLog uses a comprehensive AI guidance framework in the .github/ directory. This helps maintain consistency and quality when working with AI assistants like GitHub Copilot.
Scope-specific rules that apply to certain file types:
development-standards.instructions.md- TypeScript/React standards, APCA contrastweb-interface-guidelines.instructions.md- UI/UX requirements (24px hit targets, keyboard support)github-issue.instructions.md- Issue creation formatstorybook.instructions.md- Storybook usage
When to use: Reference before creating components or UI elements.
Architectural principles that govern the codebase:
component-architecture.md- Folder-per-component patternspec-driven-development.md- SDD methodology (create SPEC.md before coding)supabase.md- Database, auth, RLS best practicesaccessibility.md- WCAG complianceweb-performance.md- Performance optimization
When to use: Reference when making architectural decisions.
Executable workflows and templates:
scaffold_component/- Component creation workflowaccessibility_audit/- Testing checklistvercel-react-best-practices/- 45 performance rules
When to use: Follow when building new features.
- Before starting work: Check relevant instructions and rules
- During development: Reference skills for workflows
- In PR reviews: Cite rules when suggesting changes
- With AI assistants: The system is attached to Copilot instructions automatically
See .github/README.md for detailed guidance system documentation.
- Follow the Airbnb JavaScript Style Guide
- Use TypeScript for all new code
- Use functional components with hooks
- Define prop types with TypeScript interfaces
- Avoid
anytypes
See .github/instructions/development-standards.instructions.md for complete standards.
src/
├── components/ # React components (one per folder)
├── contexts/ # React contexts
├── services/ # Business logic (API calls, external services)
├── utils/ # Pure utility functions
├── tests/ # Test files
└── types.ts # Shared TypeScript types
Follow the Folder-per-Component pattern:
src/components/MyComponent/
├── MyComponent.tsx # Component implementation
├── MyComponent.test.tsx # Tests
├── index.ts # Named export: export { MyComponent } from './MyComponent'
└── SPEC.md # Component specification (optional)
See .github/rules/component-architecture.md for details.
- Use Tailwind CSS utility classes
- Follow brutalist theme (yellow/black, hard borders, no smooth animations)
- APCA contrast minimum: 60 for normal text, 45 for large text
- Hit targets: minimum 24px × 24px
npm test # Watch mode
npm run test:ui # Interactive UI
npm run test:coverage # Coverage report- Place tests in
src/tests/directory - Name tests
*.test.tsxor*.test.ts - Use Vitest + React Testing Library
- Follow existing test patterns in
src/tests/
Example:
import { describe, it, expect } from 'vitest';
import { render, screen } from '@testing-library/react';
import { MyComponent } from '../components/MyComponent';
describe('MyComponent', () => {
it('renders correctly', () => {
render(<MyComponent />);
expect(screen.getByText('Expected Text')).toBeInTheDocument();
});
});- Aim for 80%+ coverage on new code
- All exported functions should have tests
- All components should have basic render tests
Use the template in .github/pr-template-commits.md or let gh pr create auto-fill.
Before submitting:
- Code follows project style guidelines
- All tests pass (
npm test) - Build succeeds (
npm run build) - No TypeScript errors
- Documentation updated (if needed)
- Accessibility requirements met (24px targets, keyboard support)
- APCA contrast verified for UI changes
- PRs require at least one approval
- All CI checks must pass
- Address reviewer feedback promptly
- Squash commits before merging (if requested)
We follow Conventional Commits:
<type>(<scope>): <subject>
[optional body]
[optional footer]
feat:- New feature (triggers minor version bump)fix:- Bug fix (triggers patch version bump)docs:- Documentation changes (triggers patch version bump)refactor:- Code refactoring (triggers patch version bump)test:- Adding or updating tests (no version bump)perf:- Performance improvements (triggers patch version bump)build:- Build system or dependencies (triggers patch version bump)ci:- CI configuration changes (no version bump)chore:- Maintenance tasks (no version bump)
To trigger a major version bump, include BREAKING CHANGE: in the commit footer or use !:
feat(api)!: redesign authentication flow
BREAKING CHANGE: The signIn method now requires a role parameter.feat(auth): add OAuth login support
fix(upload): resolve file size calculation error
docs(readme): update Supabase setup instructions
refactor(components): move all files to src/ directory
perf(gemini): implement response caching to reduce API callsThis project uses automated releases via semantic-release. When commits are merged to main:
- Commit messages are analyzed
- Version is automatically bumped based on commit types
- CHANGELOG.md is updated
- GitHub release is created
- Related PRs/issues are commented with release info
See RELEASES.md for complete release documentation.
- Questions: Open a GitHub Discussion
- Bugs: Open an Issue
- Security: Email [maintainer contact info]
- AI Agents: See AGENTS.md for AI-specific guidelines
- README.md - Project overview and setup
- DEPLOYMENT.md - Deployment guide
- .github/copilot-instructions.md - AI agent architecture guide
- .github/GITHUB_AUTH_SETUP.md - GitHub authentication setup
Thank you for contributing to DevLog! 🎉