Skip to content

Extract db, models, ui, and provider-github into dedicated packages - #89

Merged
devarshishimpi merged 12 commits into
mainfrom
refactor/restructure-codra-workspace-packages-p2
Aug 15, 2026
Merged

Extract db, models, ui, and provider-github into dedicated packages#89
devarshishimpi merged 12 commits into
mainfrom
refactor/restructure-codra-workspace-packages-p2

Conversation

@devarshishimpi

Copy link
Copy Markdown
Owner

Description

Continues the workspace restructuring started in #87, splitting more of src/server and src/client out of the monolithic app into standalone packages/apps:

  • packages/db - all src/server/db/* modules (accounts, jobs, settings, repo-configs, migrations, repository classes) become a standalone package with its own package.json/tsconfig/vitest.config.
  • packages/models - the model-provider layer (Anthropic, Google, OpenAI, Vertex, Cloudflare providers, chain runner, rate limits, catalog, schema handling) and its full spec suite move out of src/server/models.
  • packages/provider-github - GitHub App auth, HTTP client, diff fetch, labels, OAuth, and review-post logic extracted into a dedicated provider package (continuing the pattern from the earlier GitHub-provider extraction).
  • packages/ui - shared React components (button, input, select, layer-card, badges, chart primitives, motion helpers) and client-side libs (theme, highlight, markdown-plugins, file-tree) consolidated into a UI package consumed by src/client.
  • apps/worker - the Cloudflare Worker entry point, wrangler config, env/session/orchestrator ports split out into its own app directory.
  • Central constants.ts files added to packages/core, packages/db, and packages/schema to replace scattered default configs.

Part of #66
Closes #70 #71 #72 #73 #75

Type of change

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Chore (refactoring, dependency updates, etc.)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.

  • Unit Tests
  • Integration Tests
  • Manual Dashboard Verification
  • Manual GitHub Webhook Verification

Checklist:

  • I have starred Codra on GitHub
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes
  • I have signed the CLA

Comment thread packages/models/src/providers/anthropic.ts Fixed
Comment thread packages/models/src/providers/google.ts Fixed
Comment thread packages/models/src/providers/openai.ts Fixed
Comment thread packages/models/src/providers/vertex.ts Fixed
@devarshishimpi
devarshishimpi marked this pull request as ready for review August 15, 2026 16:00
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@codra-app-personal codra-app-personal Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Codra Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a691753727

ℹ️ About Codra in GitHub

Your team has set up Codra to review pull requests in this repo. Reviews are triggered when you:

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codra-app review"

If Codra has suggestions, it will comment; otherwise it will react with 👍.

Codra can also answer questions or update the PR. Try commenting "@codra-app address that feedback".

Comment thread apps/worker/src/ports/cloudflare-orchestrator.ts
Comment thread apps/worker/src/sessions.ts Outdated
Comment thread packages/core/src/ports/in-memory.ts
Comment thread packages/models/package.json
Comment thread packages/db/tsconfig.json

@codra-app-personal codra-app-personal Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Codra Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 70a41f5d83

ℹ️ About Codra in GitHub

Your team has set up Codra to review pull requests in this repo. Reviews are triggered when you:

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codra-app review"

If Codra has suggestions, it will comment; otherwise it will react with 👍.

Codra can also answer questions or update the PR. Try commenting "@codra-app address that feedback".

Comment thread packages/db/src/client.ts
Comment thread packages/provider-github/package.json
Comment thread packages/models/tsconfig.json
Comment thread packages/schema/src/constants.ts
Comment thread packages/db/src/jobs-activity.ts
@devarshishimpi
devarshishimpi merged commit 945b087 into main Aug 15, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Define a git-provider port and move GitHub behind @codra/provider-github

2 participants