Skip to content

Contributing Guide

Please be respectful and considerate of others when contributing to this project. We are committed to providing a welcoming and inclusive environment for everyone.

unreal-orm is designed to provide a type-safe interface to SurrealDB while staying as close as possible to SurrealDB’s native capabilities.
Key principles include:

  • Native First: Expose SurrealDB features directly, don’t abstract them away
  • Type Safety Without Overhead: Use TypeScript for developer experience, not runtime checks
  • Query Building: Allow direct SurrealQL usage with type safety
  • Schema Definition: Direct mapping to SurrealDB’s schema capabilities
  1. Fork and clone the repository
    Terminal window
    git clone https://github.com/jimpex/unreal-orm.git
    cd unreal-orm
  2. Install dependencies
    Terminal window
    pnpm install
  3. Build the project
    Terminal window
    pnpm run build
  4. Run tests (bun required)
    Terminal window
    pnpm run test

unreal-orm is organized as a pnpm monorepo:

unreal-orm/
├── apps/ # Applications
│ └── docs/ # Documentation site (Astro + Starlight)
├── packages/ # Packages
│ └── unreal-orm/ # Main library package
│ ├── src/ # Source code
│ └── tests/ # Tests
  1. Create a new branch for your feature/fix
    Terminal window
    git checkout -b feature/your-feature-name
  2. Make your changes and ensure tests pass
    Terminal window
    pnpm run test
  3. Update documentation as needed
  4. Commit your changes with a descriptive message
    Terminal window
    git commit -m "feat: add new feature"
  5. Push to your fork and submit a pull request
  1. Ensure your PR addresses a specific issue or has a clear purpose
  2. Update relevant documentation
  3. Add or update tests as needed
  4. Follow the coding guidelines
  5. Make sure all tests pass
  6. Request review from maintainers

We follow the Conventional Commits specification:

<type>(<scope>): <description>
[optional body]
[optional footer(s)]

Common types:

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation changes
  • style: Code style changes (formatting, etc.)
  • refactor: Code changes that neither fix bugs nor add features
  • test: Adding or updating tests
  • chore: Changes to the build process or auxiliary tools
  • Use TypeScript for all source files
  • Follow the established code style (enforced by the project’s linter)
  • Write clear, descriptive variable and function names
  • Use JSDoc comments for public APIs
  • Prioritize type-safety and avoid any types when possible
  • Use TypeScript’s type inference where appropriate
  • Document complex types with JSDoc comments
  • Follow the project’s Design Principles
  • Keep APIs consistent with existing patterns
  • Prioritize developer experience without abstractions
  • All new features should include tests
  • Run tests with pnpm run test
  • Integration tests should use the embedded SurrealDB instance
  • Ensure tests are deterministic and don’t rely on external services
  • Update documentation for any changed functionality
  • Document public APIs with JSDoc comments
  • Include examples for new features
  • Keep the Capabilities document up to date

Thank you for contributing to unreal-orm!