Skip to content

refactor: consolidate apps/ai into apps/api#3852

Merged
yujonglee merged 5 commits intomainfrom
devin/1770774673-consolidate-ai-to-api
Feb 11, 2026
Merged

refactor: consolidate apps/ai into apps/api#3852
yujonglee merged 5 commits intomainfrom
devin/1770774673-consolidate-ai-to-api

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Feb 11, 2026

Summary

Consolidates the Rust AI service into apps/api and removes the legacy TypeScript API.

Key changes:

  • Remove old TS API
    • Deleted apps/api (TypeScript app), doxxer.api.toml, and Taskfile.yaml api include.
  • Rename ai → api (Rust)
    • git mv apps/ai → apps/api
    • Renamed apps/api/fly.toml → apps/api/fly.ai.toml to preserve existing hyprnote-ai Fly config
    • Cargo workspace: "apps/ai" → "apps/api"
    • apps/api/Cargo.toml: package name "ai" → "api"
  • Config updates
    • bacon.toml: default job/api job updated, -p ai → -p api, watch path apps/ai → apps/api
    • doxxer: renamed doxxer.ai.toml → doxxer.api.toml; tag filter ^ai_v → ^api_v
    • packages/api-client2/openapi-ts.config.ts: input path apps/ai → apps/api
    • apps/api/Dockerfile: all self-references updated to apps/api and -p api; binary renamed to api
    • apps/api/AGENTS.md: env output path updated to apps/api/.env
  • GitHub workflows
    • Removed legacy: api_ci.yaml (TS), api_cd.yaml (TS), stripe_backfill.yaml, k6.yaml
    • Renamed/updated: ai_ci.yaml → api_ci.yaml and ai_cd.yaml → api_cd.yaml
      • Triggers: apps/ai/** → apps/api/**
      • CI: cargo check -p ai → cargo check -p api
      • CD: doxxer.ai.toml → doxxer.api.toml; concurrency ai-fly-deploy → api-fly-deploy
      • Deploy: fly deploy now expects apps/api/fly.toml (see Notes)
  • Docs
    • apps/web/content/docs/developers/1.env.mdx: updated section heading/paths to apps/api and removed reference to apps/api/package.json
    • apps/web/content/docs/developers/5.run.mdx: API run command now cargo run -p api
  • Cleanup
    • pnpm install (lockfile regenerated)
    • dprint fmt
    • cargo check -p api (Rust API crate) passed locally

Review & Testing Checklist for Human (5)

  • Workflows: Double-check .github/workflows/api_ci.yaml and api_cd.yaml
    • Paths include apps/api/** and relevant crates (llm-proxy, transcribe-proxy)
    • CD uses doxxer.api.toml with tag prefix api_v; concurrency group is api-fly-deploy
    • Deploy command uses apps/api/Dockerfile and expects apps/api/fly.toml (see Notes)
  • Fly config: Confirm desired deployment strategy
    • We preserved the old hyprnote-ai config as apps/api/fly.ai.toml
    • api_cd.yaml now points to apps/api/fly.toml by design; create a new apps/api/fly.toml via fly launch for the new API when ready, or update CD to point to fly.ai.toml if you want to keep existing infra
  • Dockerfile correctness: Validate apps/api/Dockerfile
    • sed workspace members target apps/api
    • cargo chef cook/build use -p api
    • runtime copies /app/target/release/api and ENTRYPOINT is /usr/local/bin/api
  • Lingering references: Scan for any remaining apps/ai paths or -p ai usage (I updated bacon.toml, openapi-ts, Dockerfile, docs, and workflows; grep found no remaining refs in repo content except those intentionally preserved)
  • Docs: Verify the updated developer docs read correctly for rust-based API (env.mdx and run.mdx)

Recommended test plan:

  1. Local check
    • cargo check -p api
    • cargo run -p api (ensure it starts on port 3001 as before)
  2. Client generation
    • pnpm -F api-client2 build (verifies openapi-ts input path now points to apps/api/openapi.gen.json)
  3. CI smoke
    • Ensure api_ci runs on this PR (apps/api/** touched) and passes cargo check
  4. CD dry-run (optional)
    • Decide whether to create apps/api/fly.toml (new API deployment) or temporarily point CD at apps/api/fly.ai.toml if you want to reuse hyprnote-ai infra
    • If creating a new Fly app, run fly launch in apps/api, commit fly.toml, and re-run api_cd workflow

Notes

  • The stripe Taskfile forwarding to 8787 vs. Rust API on 3001 remains as-is; adjust separately when wiring webhooks to the new API if needed.
  • api_cd.yaml currently points to apps/api/fly.toml (intentionally). You’ll need to create this before running CD for the new API deployment. The previous hyprnote-ai config is preserved at apps/api/fly.ai.toml.
  • Full workspace cargo check failed locally due to missing system library libpipewire-0.3 in this environment. cargo check -p api succeeded.
  • Link to Devin run: https://app.devin.ai/sessions/34baa32c73cf4ab58e465296725cb465
  • Requested by: @yujonglee

Open with Devin

devin-ai-integration bot and others added 4 commits February 11, 2026 01:52
…askfile api include

Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
…erfile

Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
@netlify
Copy link

netlify bot commented Feb 11, 2026

Deploy Preview for hyprnote canceled.

Name Link
🔨 Latest commit d2fd6a5
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/698bed7d557f340008814e4e

@netlify
Copy link

netlify bot commented Feb 11, 2026

Deploy Preview for hyprnote-storybook canceled.

Name Link
🔨 Latest commit d2fd6a5
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/698bed7d11df9100084b7662

@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Contributor Author

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

View 6 additional findings in Devin Review.

Open in Devin Review

Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
@yujonglee yujonglee merged commit 7088d6c into main Feb 11, 2026
24 of 25 checks passed
@yujonglee yujonglee deleted the devin/1770774673-consolidate-ai-to-api branch February 11, 2026 03:09
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.

1 participant