diff --git a/.agents/AGENTS.md b/.agents/AGENTS.md index 35a45e227..c5ff1742e 100644 --- a/.agents/AGENTS.md +++ b/.agents/AGENTS.md @@ -168,7 +168,7 @@ cvix/ ## Key Stack - **Frontend**: Vue 3.5, Vite, TailwindCSS 4, Pinia, Zod, Vitest, Playwright -- **Backend**: Spring Boot 3.5, Kotlin 2.2, WebFlux, R2DBC, PostgreSQL +- **Backend**: Spring Boot 4.0, Kotlin 2.2, WebFlux, R2DBC, PostgreSQL - **Testing**: JUnit 5, Kotest, Testcontainers, MockK ## Available Skills diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a3bf9023c..8b5979537 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,29 +5,41 @@ Thanks for your interest! This guide summarizes how to set up the environment, r ## Requirements - Java 21 (Temurin) -- Node.js 22 and pnpm 10 +- Node.js 24.12.0 and pnpm 10+ - Docker (for Postgres/Testcontainers) - Git ## Quick setup +The project uses a centralized `Makefile` to simplify development. + ```bash -pnpm install -./gradlew --version +make prepare-env # Setup .env and config files +make install # Install Node & Gradle dependencies +make ssl-cert # Generate dev SSL certs ``` ### Backend ```bash -./gradlew build +make backend-build # Build backend +make backend-run # Run backend services (Postgres, Keycloak) and application ``` ### Frontend ```bash -pnpm -r run lint --if-present -pnpm -r run test --if-present -pnpm -r run build --if-present +make lint # Frontend linting +make test # Frontend unit tests +make build # Build all frontend apps +``` + +### Verification + +Always run this command before opening a PR: + +```bash +make verify-all # Full project verification (lint, test, build) ``` ### Database diff --git a/README.md b/README.md index e4830b396..bb84214e3 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ ProFileTailors is a **production-grade platform** for creating, customizing, and - Atomic, semantic styling driven by a token-based design system - โšก **Reactive, modular backend:** - - Kotlin + Spring Boot 3 (WebFlux, non-blocking I/O) + - Kotlin 2.2 + Spring Boot 4.0 (WebFlux, non-blocking I/O) - PostgreSQL, R2DBC, ensemble of unit/integration tests - Hexagonal (clean) architecture: domain, application, infrastructure separated like real professionals do @@ -95,7 +95,7 @@ ProFileTailors is a **production-grade platform** for creating, customizing, and ### ๐Ÿ—๏ธ Backend -- ๐Ÿ‘ฉโ€๐Ÿ’ป Kotlin 2, Spring Boot 3 (WebFlux, reactive) +- ๐Ÿ‘ฉโ€๐Ÿ’ป Kotlin 2.2, Spring Boot 4.0 (WebFlux, reactive) - ๐Ÿ˜ PostgreSQL (UUIDs, RLS), R2DBC, Liquibase - ๐Ÿ›ก๏ธ Keycloak 26, OAuth2 Resource Server - ๐Ÿงช JUnit5, Kotest, MockK, Testcontainers diff --git a/client/apps/docs/src/content/docs/developer-guide/developer-guide.md b/client/apps/docs/src/content/docs/developer-guide/developer-guide.md index 9fa0eb666..c1462cc26 100644 --- a/client/apps/docs/src/content/docs/developer-guide/developer-guide.md +++ b/client/apps/docs/src/content/docs/developer-guide/developer-guide.md @@ -5,43 +5,83 @@ description: "Guidance for contributors and developers working on the repo." ## Developer Guide -This section covers code organization, conventions, and common workflows. +This guide covers the core development workflows, project structure, and standards for the ProFileTailors monorepo. + +## Monorepo Structure + +ProFileTailors is organized as a full-stack monorepo, facilitating shared types and streamlined development across the entire system. + +```text +โ”œโ”€โ”€ client/ +โ”‚ โ”œโ”€โ”€ apps/ +โ”‚ โ”‚ โ”œโ”€โ”€ webapp/ # Vue.js 3 main application (SPA) +โ”‚ โ”‚ โ”œโ”€โ”€ marketing/ # Astro-based landing page +โ”‚ โ”‚ โ”œโ”€โ”€ blog/ # Astro-based blog +โ”‚ โ”‚ โ””โ”€โ”€ docs/ # Starlight-based documentation site +โ”‚ โ””โ”€โ”€ packages/ +โ”‚ โ”œโ”€โ”€ ui/ # Shared Shadcn-Vue components +โ”‚ โ”œโ”€โ”€ utilities/ # Shared TypeScript utilities +โ”‚ โ””โ”€โ”€ ... +โ”œโ”€โ”€ server/ +โ”‚ โ””โ”€โ”€ engine/ # Spring Boot 4.0 + Kotlin backend +โ”œโ”€โ”€ shared/ # Kotlin shared libraries +โ”œโ”€โ”€ infra/ # Infrastructure, Docker, monitoring, SSL +โ””โ”€โ”€ .agents/ # AI agent configurations and workflow guides +``` -## Branches and commits +## Essential Workflows -- Follow your team's branching strategy (Gitflow or similar). -- Keep commits small, focused, and descriptive. +We use a centralized `Makefile` to manage common tasks across both frontend and backend. -## Relevant structure +### Environment Setup -- `server/engine` โ€” domain logic and services. -- `shared/` โ€” shared libraries used across services and clients. -- `client/packages` โ€” frontend utilities and packages. +Always start by preparing your local environment: -## Adding a new package +```bash +make prepare-env +make install +make ssl-cert +``` -1. Create a new module under `shared/` or `client/packages`. -2. Define its `build.gradle.kts` (or package.json for JS packages). -3. Update `settings.gradle.kts` or workspace config if necessary. +### Development Servers -## Running local tests (examples) +- **Full stack:** `make dev` (Starts all frontend apps) +- **Main Web App:** `make dev-web` (Vue SPA on port 9876) +- **Backend:** `make backend-run` (Spring Boot + PostgreSQL + Keycloak) +- **Documentation:** `make dev-docs` (Starlight on port 4321) -- JVM tests (Gradle): +### Quality & Verification + +Before opening a pull request, you **must** ensure the entire project passes verification: ```bash -./gradlew :server:engine:test --tests "*CreateWorkspaceCommandHandlerTest" +make verify-all ``` -- Frontend tests (Vitest): +This command runs: +- Frontend: `biome check`, `oxlint`, TypeScript type-checking, Vitest, and builds. +- Backend: `detektAll`, JUnit 5 tests, and builds. -```bash -pnpm --filter client... test -``` +## Coding Conventions + +### Frontend (Vue/TypeScript) +- Use **Vue 3 Composition API** with `