IMVEEDev Portal

Contributing

Guidelines for contributing to the SOCSuite project.

:::info [Proprietary project] Contributions are only possible for authorised team members. :::


Core Principles

  • Quality > Speed — Take longer if needed, but keep it clean
  • Security First — Security aspects have the highest priority
  • No code without tests
  • No code without documentation

Git Workflow

Branch Structure

main            → Production-ready
└── develop     → Main development branch
    ├── feature/TICKET-123-description
    ├── fix/TICKET-456-bugdescription
    ├── hotfix/critical-fix
    └── refactor/improvement

New Feature

git checkout develop && git pull
git checkout -b feature/TICKET-123-feature-name

# Develop...
git add apps/api/internal/service/my_service.go
git commit -m "feat(cases): add timeline auto-correlation"

git push origin feature/TICKET-123-feature-name
# → Create Merge Request in GitLab

Commit Conventions

PrefixUsage
feat:New feature
fix:Bug fix
refactor:Refactoring (no feature, no fix)
test:Add/change tests
docs:Documentation
chore:Build, tooling, dependencies

Format: feat(scope): short description (max 50 characters, imperative, no period)


Code Standards

Go

// ✅ CORRECT: Context, error wrapping, interfaces
func (s *UserService) GetUser(ctx context.Context, id string) (*User, error) {
    if id == "" {
        return nil, ErrInvalidUserID
    }
    user, err := s.repo.FindByID(ctx, id)
    if err != nil {
        return nil, fmt.Errorf("find user %s: %w", id, err)
    }
    return user, nil
}

Mandatory Go rules:

  • Context as first parameter (never nil)
  • Handle and wrap all errors with %w
  • No unused variables/parameters
  • Close resources (defer)
  • No DB access in handler (only via service)

TypeScript / React

// ✅ Typed props, named export, functional component
interface UserProfileProps {
  user: User;
}
export function UserProfile({ user }: UserProfileProps) {
  if (!user) return <EmptyState />;
  return <Card><CardTitle>{user.email}</CardTitle></Card>;
}

Mandatory frontend rules:

  • All props typed (Interface/Type)
  • Prefer named exports
  • Always validate user input with Zod
  • No dangerouslySetInnerHTML without sanitization
  • No JWT in localStorage

Lint Configuration

# Run lint
make lint              # Go
pnpm lint              # Frontend

# Auto-fix
pnpm lint:fix

Configuration files:

FilePurpose
golangci.ymlGo lint rules
prettier.jsonCode formatting (2 spaces, semicolons, trailing commas)
eslint.config.jsTypeScript/JavaScript

PR Checklist

Before the Merge Request:

  • Code compiles without errors
  • All tests green (go test ./... / pnpm test)
  • Lint without errors
  • Type checking without errors
  • New feature has tests (≥80% coverage)
  • New endpoint declared in orchestrator/meta/endpoints.yaml
  • Audit logging for write operations
  • CHANGELOG.md updated (for features)

What is Never Committed

:::error [Forbidden in Git]

  • .env files (only .env.example)
  • node_modules/, dist/, vendor/
  • Secrets as literals in code
  • *.bak, *.old, *.disabled files :::

See Also

On this page