Skip to content

docs: improve README, config reference, API docs, and contributing guide#239

Open
tinu-hareesswar wants to merge 1 commit intomainfrom
docs/improve-readme-and-references
Open

docs: improve README, config reference, API docs, and contributing guide#239
tinu-hareesswar wants to merge 1 commit intomainfrom
docs/improve-readme-and-references

Conversation

@tinu-hareesswar
Copy link
Copy Markdown
Collaborator

Summary

  • README.md: Added CI/release/license badges, tightened value proposition, removed unfounded perf claims, added concrete feature list (Priority Logic V2, hedging, debit routing), working Docker quick-start with copy-pasteable curl examples, routing strategies section
  • docs/configuration.md: Expanded from 69-line stub to full reference covering all config sections (server, metrics, logging, database, redis, cache, routing_config, debit_routing, secrets_manager, env overrides)
  • docs/api-reference.md: Replaced 9-line redirect with endpoint map covering routing, feedback, health, rule CRUD, merchant CRUD, Priority Logic V2, with pointers to OpenAPI spec and Postman collection
  • CONTRIBUTING.md: Fixed broken CODE_OF_CONDUCT.md link, corrected repo URLs, added Contributor Covenant statement and security contact

Test plan

  • Verify all internal doc links resolve correctly
  • Confirm quick-start Docker commands work end-to-end
  • Review configuration reference against actual development.toml

🤖 Generated with Claude Code

…ting guide

- README: add badges, tighten value prop, add working quick-start with curl examples, document routing strategies
- configuration.md: expand from stub to full reference covering all config sections
- api-reference.md: replace redirect with endpoint map and Postman/OpenAPI pointers
- CONTRIBUTING.md: fix broken links, correct repo URLs, add security contact

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 13, 2026 18:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refreshes the project’s documentation to provide clearer onboarding, a more complete configuration reference, and a navigable API overview.

Changes:

  • Expanded docs/configuration.md into a detailed configuration reference (sections, precedence, env overrides, examples).
  • Reworked docs/api-reference.md into an endpoint map with links to OpenAPI and the full api-reference1.md.
  • Updated README.md and CONTRIBUTING.md with improved quick start, links, and contributor guidance.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

File Description
docs/configuration.md Converts a stub into a full config reference with section-by-section examples and override guidance.
docs/api-reference.md Adds an endpoint map and pointers to OpenAPI/Postman/full API reference.
README.md Updates badges, value prop, feature list, quick start, and documentation pointers.
CONTRIBUTING.md Updates contributor guidance, setup pointers, and conduct/security contact info.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/configuration.md
Comment on lines +59 to +67
### `[limit]`

Coarse global rate limiter.

```toml
[limit]
request_count = 1 # requests...
duration = 60 # ...per this many seconds per key
```
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The [limit] section is documented as a “coarse global rate limiter”, but in the code it is behind the limit feature flag and the rate-limiting middleware is only applied to the /delete route (see src/routes/data.rs). This section should document the feature-gating and scope accurately, or be removed from the default configuration reference if it’s not part of the standard builds.

Copilot uses AI. Check for mistakes.
Comment thread docs/configuration.md
Comment on lines +205 to +211
### `[secrets_manager]`

Controls how secrets (DB credentials, gateway keys) are resolved at boot.

```toml
[secrets_manager]
secrets_management_config = "no_encryption" # no_encryption | aws_kms | hashicorp_vault
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The secrets configuration section does not match what the service deserializes. The config struct expects [secrets_management] with a secrets_manager = "..." key (see src/config.rs tests), not [secrets_manager] with secrets_management_config. As written, this example won’t work and should be updated to the actual TOML shape and enum values used by SecretsManagementConfig.

Suggested change
### `[secrets_manager]`
Controls how secrets (DB credentials, gateway keys) are resolved at boot.
```toml
[secrets_manager]
secrets_management_config = "no_encryption" # no_encryption | aws_kms | hashicorp_vault
### `[secrets_management]`
Controls how secrets (DB credentials, gateway keys) are resolved at boot.
```toml
[secrets_management]
secrets_manager = "no_encryption" # no_encryption | aws_kms | hashicorp_vault

Copilot uses AI. Check for mistakes.
Comment thread docs/configuration.md
Comment on lines +222 to +231
| Variable | Overrides |
|---|---|
| `ROUTER__REDIS__HOST` | `[redis].host` |
| `ROUTER__REDIS__PORT` | `[redis].port` |
| `ROUTER__PG_DATABASE__PG_PASSWORD` | `[pg_database].pg_password` |
| `ROUTER__DATABASE__PASSWORD` | `[database].password` |
| `ROUTER__SERVER__PORT` | `[server].port` |
| `ROUTER__LOG__CONSOLE__LEVEL` | `[log.console].level` |

Use environment variables to override selected runtime values when needed (for example in Helm via `extraEnvVars`).
The pattern is `ROUTER__<SECTION>__<KEY>` (double underscores between levels). Nested tables like `[log.console]` become `ROUTER__LOG__CONSOLE__…`.
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The environment-variable override prefix/pattern in this table appears incorrect. The config loader uses config::Environment::with_prefix("DECISION_ENGINE") with separator("__") (see src/config.rs), so overrides should be DECISION_ENGINE__REDIS__HOST, etc., not ROUTER__…. This section should be updated to the correct prefix (and ideally note that the config crate applies these overrides generally, not only “when explicitly supported”).

Copilot uses AI. Check for mistakes.
Comment thread docs/api-reference.md
Comment on lines +17 to +23
| | `GET /merchant-account/{id}` | Retrieve a merchant |
| | `DELETE /merchant-account/{id}` | Delete a merchant |
| **Priority Logic V2** | `POST /routing/create` | Create a routing algorithm |
| | `POST /routing/evaluate` | Dry-run an algorithm against a payload |
| | `POST /routing/activate` | Make an algorithm the active one |
| | `POST /routing/list/{merchant_id}` | List all algorithms for a merchant |
| | `POST /routing/list/active/{merchant_id}` | List the currently active algorithms |
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few paths/parameter names in the endpoint map don’t match the OpenAPI spec (docs/openapi.json). For merchants, the path parameter is {merchantId} (not {id}); for routing rules, the paths are /routing/list/{merchantId} and /routing/list/active/{created_by}. Updating these will keep the map consistent with the canonical spec.

Suggested change
| | `GET /merchant-account/{id}` | Retrieve a merchant |
| | `DELETE /merchant-account/{id}` | Delete a merchant |
| **Priority Logic V2** | `POST /routing/create` | Create a routing algorithm |
| | `POST /routing/evaluate` | Dry-run an algorithm against a payload |
| | `POST /routing/activate` | Make an algorithm the active one |
| | `POST /routing/list/{merchant_id}` | List all algorithms for a merchant |
| | `POST /routing/list/active/{merchant_id}` | List the currently active algorithms |
| | `GET /merchant-account/{merchantId}` | Retrieve a merchant |
| | `DELETE /merchant-account/{merchantId}` | Delete a merchant |
| **Priority Logic V2** | `POST /routing/create` | Create a routing algorithm |
| | `POST /routing/evaluate` | Dry-run an algorithm against a payload |
| | `POST /routing/activate` | Make an algorithm the active one |
| | `POST /routing/list/{merchantId}` | List all algorithms for a merchant |
| | `POST /routing/list/active/{created_by}` | List the currently active algorithms |

Copilot uses AI. Check for mistakes.
Comment thread README.md
Comment on lines +120 to +124
RUSTFLAGS="-Awarnings" cargo run --no-default-features --features postgres

# MySQL build
cargo build --release --features release
RUSTFLAGS="-Awarnings" cargo run --features release
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The “Build from source” snippet mixes cargo build --release ... with cargo run ... using different feature sets (and without --release), which will trigger a separate debug rebuild and can confuse readers about which binary they’re running. Consider either using cargo run --release with the same --no-default-features/--features ... flags, or keep build/run flags consistent (or run the built binary directly).

Suggested change
RUSTFLAGS="-Awarnings" cargo run --no-default-features --features postgres
# MySQL build
cargo build --release --features release
RUSTFLAGS="-Awarnings" cargo run --features release
RUSTFLAGS="-Awarnings" cargo run --release --no-default-features --features middleware,kms-aws,postgres
# MySQL build
cargo build --release --features release
RUSTFLAGS="-Awarnings" cargo run --release --features release

Copilot uses AI. Check for mistakes.
Comment thread docs/configuration.md
| Helm chart | `helm-charts/config/development.toml` (rendered into the config map) |

## Core Sections
A full, commented reference lives at [`config.example.toml`](../config.example.toml) at the repo root — copy and edit it for custom deployments.
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

config.example.toml is described here as the “full, commented reference”, but the current config.example.toml in the repo is a short/outdated sample (e.g., it lacks [metrics], [redis], routing_config, etc.). This line should either point to a truly complete reference file (e.g., config/development.toml / config/docker-configuration.toml) or config.example.toml should be updated to match the sections documented on this page.

Suggested change
A full, commented reference lives at [`config.example.toml`](../config.example.toml) at the repo root — copy and edit it for custom deployments.
Use the deployment-specific TOML files listed above as the authoritative configuration reference for each environment. If you need a starting point for a custom deployment, you can also copy and adapt [`config.example.toml`](../config.example.toml) from the repo root.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants