Skip to content

docs: updates for PR #3868#3878

Open
dosubot[bot] wants to merge 1 commit intocanaryfrom
dosu/doc-update-3868
Open

docs: updates for PR #3868#3878
dosubot[bot] wants to merge 1 commit intocanaryfrom
dosu/doc-update-3868

Conversation

@dosubot
Copy link

@dosubot dosubot bot commented Mar 3, 2026

Update documentation for #3868

Generated by Dosu

Greptile Summary

This documentation-only PR (generated by Dosu) adds ~234 lines to apps/api/README.md, documenting environment variables, the GET /jobs endpoint, and a set of search endpoints. However, the documentation contains significant factual errors and documents non-existent functionality that will confuse users:

Critical Issues:

  1. Two fictional environment variablesINNGEST_JOBS_MAX_EVENTS and INNGEST_EVENTS_RECEIVED_AFTER are documented as configurable, but neither is read anywhere in the codebase. The max-events limit is hardcoded at 500, not the documented default of 100.
  2. Missing required API_KEY variable — All protected routes enforce X-API-Key authentication in the middleware, yet this critical environment variable is entirely absent from the documented env var list.
  3. Misplaced search endpoint documentation — The large "Search Endpoints" section describes tRPC procedures that do not exist in this standalone Hono server. This service only exposes /deploy, /cancel-deployment, /health, /jobs, and /api/inngest. Documenting tRPC endpoints here implies they can be called against http://localhost:3000, which is incorrect.
  4. Minor: missing trailing newline — The file ends without a trailing newline.

Recommendation: This PR should not be merged as-is. The documentation requires significant corrections before it is accurate enough to guide users.

Confidence Score: 0/5

  • This PR should not be merged — the documentation contains multiple factual errors that will mislead users.
  • Multiple verified issues prevent safe merge: (1) two environment variables documented but not implemented in code, with incorrect default values; (2) critical authentication variable (API_KEY) missing from docs; (3) entire search endpoints section describes tRPC procedures unrelated to this standalone Hono service, creating serious user confusion about available API endpoints; (4) missing trailing newline. These are not speculative issues — they are concrete inaccuracies in the documentation that directly contradict the implementation.
  • apps/api/README.md — requires significant corrections before merging (remove search endpoints section, add API_KEY, correct max-events docs, add trailing newline)

Last reviewed commit: f233ae0

(2/5) Greptile learns from your feedback when you react with thumbs up/down!

Context used:

  • Rule from dashboard - AGENTS.md (source)

@dosubot dosubot bot requested a review from Siumauricio as a code owner March 3, 2026 20:13
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. documentation Improvements or additions to documentation labels Mar 3, 2026

- **INNGEST_EVENTS_RECEIVED_AFTER** (optional) - An RFC3339 timestamp to filter events received after a specific date (e.g., `2024-01-01T00:00:00Z`). If unset, no date filter is applied.

- **INNGEST_JOBS_MAX_EVENTS** (optional) - Maximum number of events to fetch when listing jobs. Default is 100, maximum is 10000. Used for pagination with cursor.
Copy link
Contributor

Choose a reason for hiding this comment

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

The INNGEST_JOBS_MAX_EVENTS variable is undocumented in the implementation. In service.ts, the maximum is hardcoded:

const DEFAULT_MAX_EVENTS = 500;
const MAX_EVENTS = DEFAULT_MAX_EVENTS;

The environment variable is never read. This means setting INNGEST_JOBS_MAX_EVENTS has no effect, and the actual default is 500 (not 100 as documented, and it's not configurable to a maximum of 10000).


Optional configuration for filtering and pagination:

- **INNGEST_EVENTS_RECEIVED_AFTER** (optional) - An RFC3339 timestamp to filter events received after a specific date (e.g., `2024-01-01T00:00:00Z`). If unset, no date filter is applied.
Copy link
Contributor

Choose a reason for hiding this comment

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

INNGEST_EVENTS_RECEIVED_AFTER is not implemented. The environment variable is never read in the codebase, and fetchInngestEvents() in service.ts constructs its query with only limit and cursor — there is no date filtering capability. Documenting this implies users can configure this behavior, which is misleading.

Comment on lines +10 to +33
## Environment Variables

The API server requires the following environment variables for configuration:

### Inngest Configuration

Required for the GET /jobs endpoint to list deployment jobs:

- **INNGEST_BASE_URL** - The base URL for the Inngest instance
- Self-hosted: `http://localhost:8288`
- Production: `https://dev-inngest.dokploy.com`

- **INNGEST_SIGNING_KEY** - The signing key for authenticating with Inngest

Optional configuration for filtering and pagination:

- **INNGEST_EVENTS_RECEIVED_AFTER** (optional) - An RFC3339 timestamp to filter events received after a specific date (e.g., `2024-01-01T00:00:00Z`). If unset, no date filter is applied.

- **INNGEST_JOBS_MAX_EVENTS** (optional) - Maximum number of events to fetch when listing jobs. Default is 100, maximum is 10000. Used for pagination with cursor.

### Lemon Squeezy Integration

- **LEMON_SQUEEZY_API_KEY** - API key for Lemon Squeezy integration
- **LEMON_SQUEEZY_STORE_ID** - Store ID for Lemon Squeezy integration
Copy link
Contributor

Choose a reason for hiding this comment

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

The API_KEY environment variable is missing from the documentation. However, index.ts enforces authentication via API_KEY for all routes except /health and /api/inngest:

const authHeader = c.req.header("X-API-Key");
if (process.env.API_KEY !== authHeader) {
  return c.json({ message: "Invalid API Key" }, 403);
}

This is a required environment variable — callers must send it as the X-API-Key header or protected endpoints return 403. It should be documented prominently in the environment variables section.

Comment on lines +68 to +242
## Search Endpoints

The following search endpoints provide flexible querying capabilities with pagination support. All search endpoints respect member permissions, returning only resources the user has access to.

### application.search

Search applications across name, appName, description, repository, owner, and dockerImage fields.

**Query Parameters:**
- `q` (optional string) - General search term that searches across name, appName, description, repository, owner, and dockerImage
- `name` (optional string) - Filter by application name
- `appName` (optional string) - Filter by app name
- `description` (optional string) - Filter by description
- `repository` (optional string) - Filter by repository
- `owner` (optional string) - Filter by owner
- `dockerImage` (optional string) - Filter by Docker image
- `projectId` (optional string) - Filter by project ID
- `environmentId` (optional string) - Filter by environment ID
- `limit` (number, default 20, min 1, max 100) - Maximum number of results
- `offset` (number, default 0, min 0) - Pagination offset

**Response:**
```json
{
"items": [
{
"applicationId": "string",
"name": "string",
"appName": "string",
"description": "string",
"environmentId": "string",
"applicationStatus": "string",
"sourceType": "string",
"createdAt": "string"
}
],
"total": 0
}
```

### compose.search

Search compose services with filtering by name, appName, and description.

**Query Parameters:**
- `q` (optional string) - General search term across name, appName, description
- `name` (optional string) - Filter by name
- `appName` (optional string) - Filter by app name
- `description` (optional string) - Filter by description
- `projectId` (optional string) - Filter by project ID
- `environmentId` (optional string) - Filter by environment ID
- `limit` (number, default 20, min 1, max 100) - Maximum results
- `offset` (number, default 0, min 0) - Pagination offset

**Response:**
```json
{
"items": [
{
"composeId": "string",
"name": "string",
"appName": "string",
"description": "string",
"environmentId": "string",
"composeStatus": "string",
"sourceType": "string",
"createdAt": "string"
}
],
"total": 0
}
```

### environment.search

Search environments by name and description.

**Query Parameters:**
- `q` (optional string) - General search term across name and description
- `name` (optional string) - Filter by name
- `description` (optional string) - Filter by description
- `projectId` (optional string) - Filter by project ID
- `limit` (number, default 20, min 1, max 100) - Maximum results
- `offset` (number, default 0, min 0) - Pagination offset

**Response:**
```json
{
"items": [
{
"environmentId": "string",
"name": "string",
"description": "string",
"createdAt": "string",
"env": "string",
"projectId": "string",
"isDefault": true
}
],
"total": 0
}
```

### project.search

Search projects by name and description.

**Query Parameters:**
- `q` (optional string) - General search term across name and description
- `name` (optional string) - Filter by name
- `description` (optional string) - Filter by description
- `limit` (number, default 20, min 1, max 100) - Maximum results
- `offset` (number, default 0, min 0) - Pagination offset

**Response:**
```json
{
"items": [
{
"projectId": "string",
"name": "string",
"description": "string",
"createdAt": "string",
"organizationId": "string",
"env": "string"
}
],
"total": 0
}
```

### Database Service Search Endpoints

The following database services all share the same search interface:
- **postgres.search**
- **mysql.search**
- **mariadb.search**
- **mongo.search**
- **redis.search**

**Query Parameters:**
- `q` (optional string) - General search term across name, appName, description
- `name` (optional string) - Filter by name
- `appName` (optional string) - Filter by app name
- `description` (optional string) - Filter by description
- `projectId` (optional string) - Filter by project ID
- `environmentId` (optional string) - Filter by environment ID
- `limit` (number, default 20, min 1, max 100) - Maximum results
- `offset` (number, default 0, min 0) - Pagination offset

**Response:**
```json
{
"items": [
{
"postgresId": "string",
"name": "string",
"appName": "string",
"description": "string",
"environmentId": "string",
"applicationStatus": "string",
"createdAt": "string"
}
],
"total": 0
}
```

*Note: The response shape is similar across all database services, with the ID field varying (e.g., `mysqlId`, `mariadbId`, `mongoId`, `redisId`).*

**Search Behavior:**
- All searches use case-insensitive pattern matching with wildcards
- Results are ordered by creation date (descending)
- Members only see services they have access to
- Returns total count for pagination UI No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

The "Search Endpoints" section documents tRPC procedures that do not exist in this service. This apps/api package is a standalone Hono HTTP server that only exposes /deploy, /cancel-deployment, /health, /jobs, and /api/inngest.

The search endpoints (application.search, compose.search, environment.search, project.search, postgres.search, mysql.search, mariadb.search, mongo.search, redis.search) are tRPC procedures from the main application's API, not endpoints available in this standalone service.

This section should be removed from this README to avoid confusion.

- All searches use case-insensitive pattern matching with wildcards
- Results are ordered by creation date (descending)
- Members only see services they have access to
- Returns total count for pagination UI No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a trailing newline at the end of the file. The file currently ends without one.

Suggested change
- Returns total count for pagination UI
- Returns total count for pagination UI
\ No newline at end of file
+ Returns total count for pagination UI

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants