Thank you for your interest in contributing to docs.plus! π This document provides guidelines and instructions for contributing to the project.
- Code of Conduct
- Getting Started
- Development Setup
- Making Changes
- Code Style
- Testing
- Submitting Changes
- Project Structure
- Getting Help
By participating in this project, you agree to maintain a respectful and inclusive environment for all contributors. Be kind, constructive, and professional in all interactions.
Before you begin, ensure you have:
- π³ Docker & Docker Compose v2+ - Install
- π Bun >=1.3.7 - Install
- π¦ Node.js >=24.11.0 (for some tooling)
- ποΈ Supabase CLI - Install
- Git - Install
- Fork the repository on GitHub
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/docs.plus.git cd docs.plus - Add upstream remote:
git remote add upstream https://github.com/docs-plus/docs.plus.git
bun installCheck your environment is correctly set up:
bun run doctorcp .env.example .env.developmentUpdate .env.development with your local configuration. See .env.example for all available variables.
make supabase-startThen follow the Supabase setup instructions in the README.md.
make up-devThis starts all services:
- π Webapp: http://localhost:3000
- π REST API: http://localhost:4000
- β‘ WebSocket: ws://localhost:4001
- π· Worker: http://localhost:4002
Create a new branch for your changes:
git checkout -b type/descriptionBranch naming conventions:
feature/- New featuresfix/- Bug fixesrefactor/- Code refactoringdocs/- Documentation updatestest/- Test additions/updateschore/- Maintenance tasks
Examples:
feature/add-dark-modefix/resolve-memory-leakdocs/update-api-docs
We follow Conventional Commits format:
<type>(<scope>): <description>
[optional body]
[optional footer]
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringtest: Adding or updating testschore: Maintenance tasks
Examples:
feat(webapp): add dark mode toggle
fix(api): resolve memory leak in document sync
docs(readme): update installation instructions
refactor(editor): simplify toolbar component
We use Prettier for code formatting. Format your code before committing:
bun run formatOr check formatting:
bun run format:checkWe use ESLint for code quality. Fix linting issues:
bun run lint:fixWe use Husky to enforce local quality gates before code reaches remote branches.
.husky/*contains lightweight wrapper scripts.scripts/hooks/*.shcontains the actual hook logic.- Active hooks:
pre-commit: runsbun run lint:staged(staged-file lint/format checks)commit-msg: validates commit message formatpre-push: runs selective build checks and always runsbun run checkfor every pushpost-merge: runsbun installwhenpackage.jsonorbun.lockchanges
You can trigger hooks manually:
# pre-commit (staged file checks)
sh .husky/pre-commit
# commit message validation
echo "feat(webapp): verify hook docs" > /tmp/commit-msg.txt
sh .husky/commit-msg /tmp/commit-msg.txt
# pre-push simulation (no real push)
printf 'refs/heads/feature/demo 0000000000000000000000000000000000000000 refs/heads/feature/demo 0000000000000000000000000000000000000000\n' | \
sh .husky/pre-push origin https://github.com/docs-plus/docs.plus.git- Use TypeScript for all new code
- Avoid
anytypes - use proper types orunknown - Enable strict mode in your IDE
- Run type checking:
bun run build(will fail on type errors)
Run unit tests with Jest:
cd packages/webapp
bun testRun Cypress E2E tests:
# Interactive mode
bun run cypress:open
# Headless mode
bun run cypress:runAim for good test coverage, especially for:
- Critical business logic
- API endpoints
- Complex components
- Utility functions
- Write tests alongside your code
- Test behavior, not implementation
- Use descriptive test names
- Keep tests simple and focused
-
Update your fork:
git fetch upstream git checkout main git merge upstream/main
-
Rebase your branch (if needed):
git checkout your-branch git rebase main
-
Run checks (lint + format + types):
bun run check
This is also enforced automatically by
pre-pushfor everygit push.Or individually:
bun run lint bun run format:check bun run typecheck:webapp bun run typecheck:admin bun run typecheck:backend
-
Test locally:
- Start the development environment
- Test your changes manually
- Verify no regressions
-
Push your branch:
git push origin your-branch
-
Create a PR on GitHub:
- Use a clear, descriptive title
- Fill out the PR template (if available)
- Reference any related issues
- Add screenshots/GIFs for UI changes
-
PR Checklist:
- Code follows style guidelines
- Tests pass locally
- Documentation updated (if needed)
- No console errors/warnings
- Changes are backward compatible (if applicable)
- Maintainers will review your PR
- Address feedback promptly
- Keep PRs focused and reasonably sized
- Be open to suggestions and improvements
docs.plus/
βββ packages/
β βββ webapp/ # π Next.js frontend
β β βββ src/
β β β βββ components/ # React components
β β β βββ api/ # API clients
β β β βββ hooks/ # React hooks
β β β βββ stores/ # State management
β β β βββ utils/ # Utility functions
β β βββ cypress/ # E2E tests
β βββ hocuspocus.server/ # β‘ REST API, WebSocket, Workers
β β βββ src/
β β β βββ api/ # REST API routes & controllers
β β β βββ lib/ # Shared libraries (email, push, etc.)
β β β βββ middleware/ # Hono middleware
β β β βββ config/ # Configuration & env schemas
β β βββ prisma/ # Prisma schema & migrations
β βββ admin-dashboard/ # π οΈ Admin interface (Next.js)
β βββ supabase/ # ποΈ Supabase configuration
β β βββ scripts/ # SQL migration scripts
β βββ extension-*/ # π TipTap extensions
βββ .github/workflows/ # π CI/CD pipelines
βββ docker-compose.dev.yml # π³ Development setup
βββ docker-compose.prod.yml # π Production setup
βββ Makefile # π οΈ Build commands
We welcome contributions in all areas:
- π Bug Fixes: Fix issues reported in GitHub Issues
- β¨ Features: Implement new features (check Issues for ideas)
- π Documentation: Improve docs, add examples, fix typos
- π§ͺ Tests: Add tests, improve coverage
- π¨ UI/UX: Improve design, accessibility, user experience
- β‘ Performance: Optimize code, reduce bundle size
- π Security: Report or fix security issues
- π¬ Discord: Join our server for real-time help
- π Issues: GitHub Issues for bug reports
- π Security: See SECURITY.md for reporting vulnerabilities
- π§ Email: contact@newspeak.house
Your contributions make docs.plus better for everyone. Thank you for taking the time to contribute! β€οΈ
Questions? Feel free to ask in Discord or open an issue on GitHub.