Skip to content

Dev#14

Merged
HardMax71 merged 2 commits intomainfrom
dev
Dec 8, 2025
Merged

Dev#14
HardMax71 merged 2 commits intomainfrom
dev

Conversation

@HardMax71
Copy link
Owner

@HardMax71 HardMax71 commented Dec 8, 2025

Summary by CodeRabbit

  • Refactor
    • Frontend configuration is now loaded from a runtime configuration file at startup.
    • All API endpoint paths throughout the application have been updated to use the /api/v1/ path structure.
    • API documentation links updated from /docs/ to /api/docs/.

✏️ Tip: You can customize this high-level summary in your review settings.

@HardMax71 HardMax71 merged commit e772b2b into main Dec 8, 2025
3 of 4 checks passed
@coderabbitai
Copy link

coderabbitai bot commented Dec 8, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

The pull request migrates frontend configuration from environment-variable-based approach to a runtime configuration file. It removes VITE_* environment variables from build and runtime contexts, introduces a new frontend/public/config.js that populates window.APP_CONFIG, updates frontend code to read from this global object, and standardizes API endpoint paths from /v1/ to /api/v1/ across multiple frontend pages and services.

Changes

Cohort / File(s) Summary
Configuration removal
.env.example, .github/workflows/publish-images.yml, docker-compose.yaml
Removed VITE_API_BASE_URL and VITE_GRAFANA_URL environment variables from example config, CI build arguments, and container runtime setup.
Runtime config system
frontend/public/config.js, frontend/index.html
Added new config.js file exposing window.APP_CONFIG with API_BASE_URL and GRAFANA_URL; injected config script load in HTML head.
API client migration
frontend/src/api/client.ts
Updated to read API_BASE_URL from window.APP_CONFIG instead of build-time environment variable; added Window interface augmentation for type safety.
API endpoint path updates
frontend/src/pages/Health.tsx, frontend/src/pages/JobStatus.tsx, frontend/src/pages/Landing.tsx, frontend/src/pages/PrivacyPolicy.tsx, frontend/src/services/resumeService.ts
Updated API endpoint references from /v1/... to /api/v1/... and documentation links from /docs/ to /api/docs/ across multiple components.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Changes follow a consistent, homogeneous pattern (environment variable → window.APP_CONFIG replacement)
  • API path updates are straightforward and repetitive across files
  • Window interface augmentation is minimal and non-invasive
  • New config file is simple and self-contained

Possibly related PRs

  • Added publish scripts  #6 — Modifies the same frontend configuration flow with environment variables and build arguments, though in the reverse direction (adding vs. removing VITE_* configuration).

Poem

🐰 Config scripts now hop at runtime, no build-time fright,
Window.APP_CONFIG holds the URLs tight,
API paths with /api/ prefix align,
Simpler, cleaner, oh so divine! 🎉

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f194597 and f17e87b.

📒 Files selected for processing (11)
  • .env.example (0 hunks)
  • .github/workflows/publish-images.yml (0 hunks)
  • docker-compose.yaml (0 hunks)
  • frontend/index.html (1 hunks)
  • frontend/public/config.js (1 hunks)
  • frontend/src/api/client.ts (1 hunks)
  • frontend/src/pages/Health.tsx (2 hunks)
  • frontend/src/pages/JobStatus.tsx (1 hunks)
  • frontend/src/pages/Landing.tsx (3 hunks)
  • frontend/src/pages/PrivacyPolicy.tsx (1 hunks)
  • frontend/src/services/resumeService.ts (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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