Chore/repo setup#5
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
There was a problem hiding this comment.
Pull request overview
Initial repository scaffolding for the Routis monorepo, establishing baseline local dev + CI for a Next.js frontend and FastAPI backend.
Changes:
- Added frontend skeleton (Next.js app, lint/build config, Dockerfile).
- Added backend skeleton (FastAPI app, uv-managed deps/lockfile, Dockerfile, pytest wiring).
- Added repo-level ops/docs setup (Docker Compose, CI workflow, templates, environment example).
Reviewed changes
Copilot reviewed 26 out of 36 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Project intro + local dev commands and structure overview |
| package.json | Root-level script entrypoint(s) |
| docs/ARCHITECTURE.md | Tech stack documentation update |
| docker-compose.yml | Local multi-service environment (web/api/postgres/redis + backup stub) |
| apps/web/package.json | Web app dependencies/scripts |
| apps/web/Dockerfile | Container build/run for the web app |
| apps/web/eslint.config.mjs | ESLint flat config for Next.js/TS |
| apps/web/tsconfig.json | TypeScript configuration |
| apps/web/next.config.ts | Next.js configuration stub |
| apps/web/postcss.config.mjs | Tailwind PostCSS setup |
| apps/web/app/* | Minimal Next.js App Router layout/page/styles/assets |
| apps/api/pyproject.toml | API deps + Ruff + dev dependency group |
| apps/api/uv.lock | Locked Python dependencies for uv |
| apps/api/main.py | Minimal FastAPI app with /health |
| apps/api/Dockerfile | Container build/run for the API using uv |
| apps/api/tests/test_main.py | Initial pytest file (currently placeholder) |
| .github/workflows/ci.yml | CI for frontend and backend |
| .github/pull_request_template.md | PR template checklist |
| .github/ISSUE_TEMPLATE/* | Issue templates for feature/bug |
| .env.example | Example environment configuration for local/prod |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "scripts": { | ||
| "codegen": "cd apps/web && pnpm run codegen" | ||
| } |
There was a problem hiding this comment.
The root codegen script calls pnpm run codegen, but apps/web/package.json doesn’t define a codegen script and the rest of the repo (README/CI/Dockerfile) uses npm. This script will fail as-is; either add a codegen script in apps/web and standardize on pnpm, or switch this to npm run (and ensure the command exists).
| cd apps/web && npm run lint | ||
|
|
||
| # Backend | ||
| cd apps/api && ruff check . && ruff format --check . && uv run pytest |
There was a problem hiding this comment.
The backend lint commands run ruff directly, but after uv sync the tools are installed into the uv-managed environment; without uv run (or activating the venv) ruff may not be on PATH. To match CI and make the instructions reliably runnable, use uv run ruff check . / uv run ruff format --check . here.
| cd apps/api && ruff check . && ruff format --check . && uv run pytest | |
| cd apps/api && uv run ruff check . && uv run ruff format --check . && uv run pytest |
| db-backup: | ||
| image: alpine:latest | ||
| environment: | ||
| PGUSER: ${POSTGRES_USER} | ||
| PGPASSWORD: ${POSTGRES_PASSWORD} | ||
| PGHOST: postgres | ||
| PGDATABASE: ${POSTGRES_DB} | ||
| depends_on: | ||
| postgres: | ||
| condition: service_healthy | ||
| networks: | ||
| - routis | ||
| command: sh -c "echo 'DB backup service (stub - pg_dump → S3 logic pending)' && sleep infinity" | ||
| volumes: | ||
| - backup_data:/backup |
There was a problem hiding this comment.
db-backup is configured to always start and then sleep infinity, which means docker compose up will spin an extra container that does no work and can confuse local dev. Consider moving this service behind a Compose profiles flag (e.g., profiles: ["backup"]) and/or removing it until the backup logic is implemented.
| def test_placeholder(): | ||
| pass |
There was a problem hiding this comment.
test_placeholder is an empty test, so CI will report green even if the API can’t start or the /health contract breaks. Since main.py introduces a health endpoint, replace this with a small test that exercises GET /health (e.g., using FastAPI’s TestClient / httpx) and asserts the status code and response shape.
| def test_placeholder(): | |
| pass | |
| from fastapi.testclient import TestClient | |
| from apps.api.main import app | |
| def test_health_endpoint(): | |
| client = TestClient(app) | |
| response = client.get("/health") | |
| assert response.status_code == 200 | |
| data = response.json() | |
| assert isinstance(data, dict) | |
| assert "status" in data |
No description provided.