Page Navigation

epress world protocol

Open

Collapsed while browsing epress node docs.

Contributing Guide

Thank you for your interest in contributing to epress node. This guide covers the development workflow and standards.

Development Setup

  1. Fork the repository on GitHub
  2. Clone your fork: git clone https://github.com/YOUR_USERNAME/epress.git
  3. Install dependencies: npm install
  4. Set up your database (SQLite is easiest for development)
  5. Run migrations: npm run migrate
  6. Start development server: npm run dev

Branch Workflow

  • main: Production-ready code. All PRs merge here.
  • feature/*: New features. Branch from main.
  • fix/*: Bug fixes. Branch from main.
  • docs/*: Documentation changes. Branch from main.
git checkout main
git pull origin main
git checkout -b feature/my-new-feature

Code Standards

Linting with Biome

We use Biome for linting and formatting. Run before every commit:

npm run lint        # Check for issues
npm run lint:fix    # Auto-fix issues

JavaScript Style

  • ES Modules (.mjs extension for server code)
  • ESM import/export syntax
  • Arrow functions for callbacks
  • Prefer const, use let only when reassignment needed
  • Descriptive variable and function names

React/JSX Style

  • Functional components with arrow functions
  • Hooks for state and side effects
  • Kebeb-case file names for components
  • Named exports for utilities, default for components

Testing

All new features and bug fixes should include tests:

npm run test                 # Run all tests
npm run test -- path/to/test  # Run specific test file
  • Test files use .test.mjs extension
  • We use AVA test framework
  • Tests run against SQLite by default
  • Aim for meaningful coverage, not 100%

Commit Messages

Follow conventional commit format:

type(scope): subject

[optional body]

[optional footer]

Types

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

Examples

feat(api): add pagination to publications
fix(auth): correct JWT expiration check
docs(readme): update installation steps

Pull Request Process

  1. Ensure your branch is up to date with main
  2. Run lint and tests locally
  3. Push your branch to your fork
  4. Open a PR against the main repository main branch
  5. Fill out the PR template completely
  6. Wait for review and address feedback
  7. Maintainers will merge approved PRs

Questions?

Open a discussion on GitHub or ask in the community channels. We are happy to help new contributors get started.