Marketplace
Browse and adopt engineering standards, rules, and configurations. Fork to customize for your organization.
Handle errors explicitly
go
Check every error return. No `_` for errors. Wrap with context: `fmt.Errorf("doing x: %w", err)`.
Handle Results and Options properly
rust
No `.unwrap()` in production. Use `?` operator, `map`, `and_then`. `expect()` only with good messages.
Implement proper authentication and authorization
security
Auth: bcrypt/argon2 for passwords, rate limiting, secure sessions/tokens. Authz: check permissions on every request, use policy objects or middleware.
Use xUnit or NUnit for testing
csharp
xUnit preferred (modern, parallel). NUnit also good. Use `[Fact]`/`[Theory]` or `[Test]`/`[TestCase]`.
Use MongoDB with schemas
database
Define schemas even though schemaless. Use Mongoose (Node) or ODMs. Index query fields. Embed vs reference thoughtfully.
Use Django migrations properly
django
One migration per change. Never edit applied migrations. Use RunPython for data migrations. Squash when large.
Use Django ORM properly
django
select_related/prefetch_related for joins. Use F() and Q() objects. Avoid N+1 with django-debug-toolbar.
Use Django REST Framework for APIs
django
DRF serializers for validation. ViewSets for CRUD. Token/JWT auth. Pagination on list endpoints.
Use context for cancellation and timeouts
go
`context.Context` as first param. Propagate through call chain. Use `context.WithTimeout` for I/O.
Use gofmt and golangci-lint
go
`gofmt` is non-negotiable. `golangci-lint run` in CI. Enable: errcheck, govet, staticcheck.
Use Go modules for dependency management
go
go.mod and go.sum at repo root. `go mod tidy` before commit. Pin versions for reproducibility.
Use Go testing package
go
Built-in testing package. Table-driven tests. `go test -v ./...`. Use testify for assertions if needed.
Use slog for structured logging
go
Use `log/slog` (Go 1.21+) for structured logging. JSON handler in production. slog.With() for context. Avoid fmt.Printf for logs.
Use Cargo for package management
rust
Cargo.toml for deps, Cargo.lock (commit it). `cargo add` for new deps. Workspace for monorepos.
Use cargo test for Rust
rust
`cargo test` for all tests. Doc tests in comments. Integration tests in tests/. `#[cfg(test)]` modules.
Use clippy and rustfmt
rust
`cargo fmt` before commit. `cargo clippy` with `-D warnings` in CI. Fix all warnings.
Use Django forms for validation
django
Forms/ModelForms for input validation. Clean methods for business logic. Never trust request.POST directly.
Prefer interfaces over concrete types
go
Accept interfaces, return structs. Small interfaces (1-2 methods). Define interfaces where used, not implemented.
Use Go 1.22+ features
go
range over integers, range over func. Enhanced HTTP routing patterns. for loop variable fix. Go 1.22+ minimum.
Use Checkstyle for Java style
java
Checkstyle for style enforcement. Google or Sun conventions. Integrate with build (Maven/Gradle).
Use Spotless for Java formatting
java
Spotless for consistent formatting. Google Java Format or custom. `spotlessApply` before commit.
Use SolidCache for Rails caching
rails
SolidCache: database-backed cache. No Redis needed. Good for most apps. Rails 8 default.