Skip to content

Latest commit

 

History

History
181 lines (137 loc) · 10.9 KB

CONTRIBUTING.md

File metadata and controls

181 lines (137 loc) · 10.9 KB

Contributing to Vertex

Thanks for your interest in Vertex! You can help by reporting bugs, suggesting ideas, improving docs and writing code. Everyone who takes part agrees to the Code of Conduct.

Vertex is pre-alpha and moves fast, so open an issue before starting anything large. That way we can agree on the approach before you spend time on it.

What we care about

These priorities decide most design questions, so keep them in mind for any change:

  1. Ease of use comes first. Vertex should never fight its user. Commands do the obvious thing without flags, work on the current folder, can be run again safely, and when something goes wrong, the error says exactly which command fixes it.
  2. Performance is a requirement, not a later optimization. Prefer designs that skip work entirely, such as stat caches over re-hashing, dedup over re-uploading, and one directory listing over a call per file. Test with realistic sizes (100,000+ files, multi-gigabyte assets) and include numbers in your PR.
  3. Perforce's model, git's feel. History is central and linear and lives on the server; workspaces hold files, not history. The server is stateless and scales out.

AI-Assisted Contributions Policy

Vertex welcomes contributions developed with the assistance of artificial intelligence (AI) tools, including GitHub Copilot, ChatGPT, Claude, and similar technologies. However, AI-generated code must meet the same quality, security, and maintainability standards as human-written code.

AI is a development tool, not a substitute for understanding your contributions.

Guidelines

  1. Understand Your Code

    • Contributors must understand and be able to explain all code they submit, regardless of whether AI was involved.
    • Do not submit AI-generated code without reviewing its implementation, behavior, and potential consequences.
    • Contributors are responsible for identifying and correcting errors, vulnerabilities, and inefficient implementations.
  2. Maintain Code Quality

    • AI-assisted contributions must follow Vertex's existing architecture, coding conventions, and development practices.
    • Avoid unnecessary abstractions, excessive dependencies, duplicated functionality, and overly complex solutions.
    • All contributions should be tested where applicable, particularly changes involving source control, data integrity, authentication, or storage.
  3. Security and Data Integrity

    • Never submit secrets, credentials, proprietary information, or sensitive data to external AI services without proper authorization.
    • Carefully review AI-generated code for security vulnerabilities, concurrency issues, data corruption risks, and unsafe file operations.
    • Changes involving file synchronization, revision history, content-addressable storage, or permissions require particular attention.
  4. Transparency

    • Disclose substantial AI involvement in your pull request description.
    • Briefly explain how AI was used, such as generating an initial implementation, refactoring existing code, or creating tests.
    • Minor assistance, such as autocomplete, formatting, grammar corrections, or documentation suggestions, does not require disclosure.
  5. Licensing and Intellectual Property

    • Contributors must ensure their submissions are legally compatible with Vertex's GNU Affero General Public License v3.0 (AGPL-3.0).
    • Do not submit AI-generated content that reproduces copyrighted, proprietary, or restrictively licensed material without appropriate permission.
    • Contributors remain responsible for ensuring they have the necessary rights to contribute their work.
  6. Pull Request Responsibility

    • Every pull request must have a human contributor who takes responsibility for the submitted changes.
    • Contributors must be able to answer questions, address review feedback, and maintain or revise their implementations when necessary.
    • Large, unreviewed AI-generated pull requests may be rejected, especially when they introduce unnecessary complexity or lack meaningful testing.

Unacceptable Contributions

The following are not acceptable:

  • Submitting AI-generated code without understanding how it works.
  • Using AI to generate large amounts of unrelated or unnecessary code.
  • Submitting fabricated tests, benchmarks, documentation, or performance claims.
  • Introducing dependencies or architectural changes without a clear technical justification.
  • Submitting code copied from incompatible or unauthorized sources.
  • Using AI to bypass security checks, contribution requirements, or code review.
  • Repeatedly submitting low-effort, AI-generated pull requests without addressing feedback.

Maintainer Discretion

Vertex maintainers reserve the right to request additional explanations, tests, or revisions for AI-assisted contributions.

Contributions may be declined when they do not meet the project's quality, security, licensing, or maintainability standards, regardless of whether AI was used.

Our position is simple: AI-assisted contributions are welcome. Unreviewed, untested, or poorly understood contributions are not.

Reporting bugs and requesting features

  • Bugs: open an issue using the bug report template. Include your OS, the Vertex version (vx info), the exact command, and what you expected to happen. Run the command with -log for debug output.
  • Ideas: open an issue using the feature request template. Describe the problem you're trying to solve before the solution.
  • Security vulnerabilities: don't open a public issue. See SECURITY.md.

Development setup

You need:

  • .NET 10 SDK (pinned in global.json)
  • Node.js 22 LTS or later. Building the server or desktop app also builds Vertex.Web.
  • Docker for PostgreSQL, Redis and S3-compatible storage
git clone https://github.com/EntexInteractive/Vertex.git
cd Vertex
docker compose up -d postgres redis rustfs rustfs-init   # dependencies only
dotnet build Vertex.sln

To run the server from your IDE, set the environment variables listed in Configuration in Vertex.Server/Properties/launchSettings.json, which is git-ignored. Use these values for the compose stack:

VX_POSTGRES_CONNECTION = Host=127.0.0.1;Port=5432;Database=vertex;Username=vertex;Password=vertex
VX_REDIS_CONNECTION    = 127.0.0.1:6379
VX_S3_ENDPOINT         = http://127.0.0.1:9000
VX_S3_ACCESS_KEY       = vertexadmin
VX_S3_SECRET_KEY       = vertexadmin
ASPNETCORE_ENVIRONMENT = Development

To run the whole stack in containers instead, run docker compose up -d --build.

The server creates and upgrades its database schema at startup from the migrations in Vertex.Server/Database/Migrations/.

Before the first release, there is only 0001_initial.sql. To change the schema, append to it using idempotent statements (CREATE TABLE IF NOT EXISTS, ALTER TABLE ... ADD COLUMN IF NOT EXISTS, ...). A new database gets the change at startup, but a database that already ran the file won't run it again, so apply it by hand after pulling a schema change; it only creates what's missing and keeps existing data:

pg_dump -Fc -d vertex -f vertex-backup.dump   # back up first
psql -d vertex -v ON_ERROR_STOP=1 -1 -f Vertex.Server/Database/Migrations/0001_initial.sql

After the first release, add a file with the next number instead (for example 0002_add_labels.sql) and restart the server; existing data is kept. Never edit a migration that has been released, because databases that already ran it won't run it again.

Project layout

Project What lives there
Vertex.Server ASP.NET Core server, gRPC services, PostgreSQL, Redis, S3 storage.
Vertex.Cli The vx command line client (Spectre.Console).
Vertex.Core Shared models, gRPC client interfaces, chunking and compression.
Vertex.Core.Client Workspaces, the local SQLite index, scanning and ignore rules.
Vertex.Agent Background device agent.
Vertex.Web React + TypeScript + Vite web UI.
Vertex.Gui Photino desktop app hosting the web UI.

The gRPC contracts are Vertex.Server/Protos/Files.proto and Events.proto. The server and clients generate code from them, so build the whole solution after changing one. docs/internals/ explains how the pieces fit together.

Making changes

  1. Create a branch from main named feature/<name> for new functionality or patch/<name> for fixes (e.g. feature/vx-sync, patch/status-crash). If you don't have write access, fork the repository first. main is protected: every change reaches it through a pull request, and nobody pushes to it directly.
  2. Keep each pull request focused on one change. Separate refactors from behavior changes.
  3. Follow the existing style:
    • C#: block-scoped namespaces, braces on new lines, PascalCase public members, _camelCase private fields, explicit types where the codebase uses them, and a // Copyright 2026 Entex Interactive header in new files.
    • TypeScript: run npm run lint in Vertex.Web.
    • The server reads configuration only from environment variables, in ServerSettings.cs. Add new settings there and document them in docs/server/configuration.md.
    • Call the server-side history unit a revision, never a "changeset", in code, CLI output and docs.
  4. Make sure everything builds: dotnet build Vertex.sln, and for web changes, npm run lint and npm run build in Vertex.Web.
  5. Run the commands you touched against a local server, and describe what you tested in the pull request. If the change affects users (a command, an option, a setting, a metric), update the matching page in docs/ in the same pull request.
  6. Write commit messages in the imperative mood, with a short summary line (for example, "Add branch delete confirmation").

Things that must never be committed

Passwords, connection strings with real credentials, API keys, TLS certificates and private keys, .env files, and launchSettings.json. Configuration comes from environment variables. If you commit a secret by accident, tell us right away so we can rotate it. Deleting the file in a later commit doesn't remove it from history.

Licensing of contributions

Vertex is licensed under the GNU AGPL-3.0. By submitting a contribution, you agree that it is licensed under the same license (inbound = outbound), and that you have the right to submit it. There is no CLA to sign.