Skip to content

Latest commit

 

History

History
246 lines (185 loc) · 5.19 KB

File metadata and controls

246 lines (185 loc) · 5.19 KB

Development Guide

👨‍💻 Contributing to DocuNote

This guide covers everything you need to contribute to the project.


🚀 Getting Started

Prerequisites

  1. Read Getting Started Guide
  2. Set up your development environment
  3. Check Project Blueprint

Development Setup

# Clone and install
git clone <repo>
cd DocuNote
npm install

# Set up environment
cp .env.example .env.local
# Add your API keys

# Start dev server
npm run dev

📋 Development Workflow

1. Check for Known Issues

Before starting, check Dev Issue Log for:

  • Known bugs
  • Common problems
  • Workarounds

2. Create a Branch

# Feature branches
git checkout -b feature/your-feature-name

# Bug fix branches
git checkout -b fix/bug-description

3. Develop and Test

# Run linter
npm run lint

# Run tests
npm test

# Check coverage
npm run test:coverage

# Build verification
npm run build

See CI/CD Pipeline for automated quality checks.

# Make your changes
# ...

# Run tests
npm test                  # Jest
npm run test:e2e          # Playwright
npm run test:coverage     # Coverage

4. Document Your Work

  • Update docs in docs/
  • Add feature docs in docs/03-features/ if applicable
  • Update README.md if needed
  • Document new issues in dev-issue-log.md

5. Commit Your Changes

Follow the Git Commit Guide for:

  • Commit message format
  • How to organize changes
  • Best practices

6. Create Pull Request

# Push your branch
git push origin feature/your-feature-name

# Create PR on GitHub

📝 Daily Logs

We track development work in daily logs for context and progress:

Daily Log Types

  • Daily Logs Directory - Overview and templates
  • Summary - End of day accomplishments and metrics
  • Sessions - Detailed session notes and decisions
  • Analysis - In-depth project reviews

Current Logs (Oct 7, 2025)

When to Update

Add entries when:

  • Completing a development day (summary)
  • Making important decisions (sessions)
  • Solving complex problems (sessions)
  • Conducting project reviews (analysis)

🐛 Issue Management

Reporting Issues

When you encounter a bug:

  1. Check Dev Issue Log to see if it's known
  2. Document the issue:
    • Description
    • Steps to reproduce
    • Expected vs actual behavior
    • Workaround (if any)
  3. Update the dev issue log
  4. Create GitHub issue if needed

Known Issues

See Dev Issue Log for:

  • Active bugs
  • Resolved issues
  • Workarounds

🧪 Testing Requirements

Before Committing

  • All Jest tests pass (npm test)
  • No ESLint errors
  • TypeScript compiles
  • Code follows project conventions

Before Creating PR

  • E2E tests pass (relevant ones)
  • Documentation updated
  • Manual testing completed
  • No console errors/warnings

See Testing Guide.


📚 Code Standards

TypeScript

  • Use strict type checking
  • Avoid any types
  • Document complex types

React Components

  • Functional components with hooks
  • Props interfaces defined
  • Proper error boundaries

File Organization

src/
├── app/          # Next.js pages
├── components/   # Reusable components
├── ai/          # AI integration
├── lib/         # Utilities
└── hooks/       # Custom hooks

Naming Conventions

  • Components: PascalCase (ChatHeader.tsx)
  • Utilities: camelCase (formatDate.ts)
  • Hooks: camelCase with 'use' (useChat.ts)
  • Tests: Same as file + .test.tsx or .spec.ts

🔄 Git Best Practices

Commit Messages

See Git Commit Guide for detailed instructions.

Format:

type(scope): brief description

- Detailed change 1
- Detailed change 2

Types:

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation
  • test: Tests
  • refactor: Code refactoring
  • chore: Maintenance

Branching Strategy

  • main - Production-ready
  • feature/* - New features
  • fix/* - Bug fixes
  • docs/* - Documentation

🆘 Getting Help

Resources

  1. Documentation - Check docs/ folder
  2. Issue Log - dev-issue-log.md
  3. Testing Guide - Testing docs
  4. Blueprint - Project vision

Common Problems


🎯 Next Steps

Ready to contribute?

  1. ✅ Read this guide
  2. ✅ Set up your environment
  3. ✅ Pick an issue or feature
  4. ✅ Follow the workflow above
  5. ✅ Submit your PR!

Happy coding! 🚀