feat: add frontend #2

Merged
Pertempto merged 11 commits from 0-add-frontend into main 2025-11-20 18:49:28 -05:00
Pertempto commented 2025-11-20 17:38:31 -05:00 (Migrated from github.com)
No description provided.
github-actions[bot] commented 2025-11-20 17:47:04 -05:00 (Migrated from github.com)

Changes Requested

Please address the following before I can approve:

  • Fix the frontend package & ESLint issues and commit frontend/package-lock.json (or switch CI to npm install).
  • Correct frontend/eslint.config.js imports/config to use real packages (@typescript-eslint/*, eslint-plugin-react, etc.) and verify npm run lint passes.
  • Avoid binding to port 80 by default in backend/cmd/server/main.go — read PORT or accept a --port/--prod flag and document the behavior.
  • Restrict the dev proxy in backend/internal/server/server.go so API routes (e.g. /api, /health) are handled by the Go server; improve the reverse proxy (preserve host/forwarded headers, add ErrorHandler, ensure websocket/HMR headers are preserved or document HMR access).

Summary of Changes

  • Added a new frontend/ React + Vite app (TS, ESLint, Prettier, build scripts).
  • Added CI job for frontend in .github/workflows/ci.yml that runs npm ci, lint, prettier, and build.
  • Integrated frontend build into backend via embed and added backend/internal/server code to serve static files and proxy to Vite in dev mode.
  • Added justfile tasks for dev, build-frontend, build-backend, and updated docs (CONTRIBUTING.md, README.md).

Overall Feedback

  • Major issues: the frontend dependencies/config are currently invalid and there is no frontend/package-lock.json, so CI npm ci will fail. The backend defaults and dev proxy behavior are risky for local development (binding to privileged port 80 and proxying all routes including APIs to Vite).

  • Once those items are fixed the overall approach looks solid: embedding the static build into the Go binary and providing a simple --dev proxy flow is a good DX improvement and the project structure/readme are clear. Nice job wiring the end-to-end flow — this will be smooth for contributors once the dependency and proxy issues are resolved.

@Pertempto — I can re-review quickly after those four fixes are pushed. 👍

# Changes Requested Please address the following before I can approve: - Fix the frontend package & ESLint issues and commit `frontend/package-lock.json` (or switch CI to `npm install`). - Correct `frontend/eslint.config.js` imports/config to use real packages (`@typescript-eslint/*`, `eslint-plugin-react`, etc.) and verify `npm run lint` passes. - Avoid binding to port 80 by default in `backend/cmd/server/main.go` — read `PORT` or accept a `--port`/`--prod` flag and document the behavior. - Restrict the dev proxy in `backend/internal/server/server.go` so API routes (e.g. `/api`, `/health`) are handled by the Go server; improve the reverse proxy (preserve host/forwarded headers, add `ErrorHandler`, ensure websocket/HMR headers are preserved or document HMR access). ## Summary of Changes - Added a new `frontend/` React + Vite app (TS, ESLint, Prettier, build scripts). - Added CI job for frontend in `.github/workflows/ci.yml` that runs `npm ci`, lint, prettier, and build. - Integrated frontend build into backend via `embed` and added `backend/internal/server` code to serve static files and proxy to Vite in dev mode. - Added `justfile` tasks for `dev`, `build-frontend`, `build-backend`, and updated docs (`CONTRIBUTING.md`, `README.md`). ## Overall Feedback - Major issues: the frontend dependencies/config are currently invalid and there is no `frontend/package-lock.json`, so CI `npm ci` will fail. The backend defaults and dev proxy behavior are risky for local development (binding to privileged port 80 and proxying all routes including APIs to Vite). - Once those items are fixed the overall approach looks solid: embedding the static build into the Go binary and providing a simple `--dev` proxy flow is a good DX improvement and the project structure/readme are clear. Nice job wiring the end-to-end flow — this will be smooth for contributors once the dependency and proxy issues are resolved. @Pertempto — I can re-review quickly after those four fixes are pushed. 👍
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kwila/office-automations!2
No description provided.