diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml deleted file mode 100644 index b5e8cfd..0000000 --- a/.github/workflows/claude-code-review.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Claude Code Review - -on: - pull_request: - types: [opened, synchronize, ready_for_review, reopened] - # Optional: Only run on specific file changes - # paths: - # - "src/**/*.ts" - # - "src/**/*.tsx" - # - "src/**/*.js" - # - "src/**/*.jsx" - -jobs: - claude-review: - # Optional: Filter by PR author - # if: | - # github.event.pull_request.user.login == 'external-contributor' || - # github.event.pull_request.user.login == 'new-developer' || - # github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' - - runs-on: ubuntu-latest - permissions: - contents: read - pull-requests: read - issues: read - id-token: write - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - - name: Run Claude Code Review - id: claude-review - uses: anthropics/claude-code-action@v1 - with: - claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} - plugin_marketplaces: 'https://github.com/anthropics/claude-code.git' - plugins: 'code-review@claude-code-plugins' - prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}' - # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md - # or https://code.claude.com/docs/en/cli-reference for available options - diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml deleted file mode 100644 index d300267..0000000 --- a/.github/workflows/claude.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Claude Code - -on: - issue_comment: - types: [created] - pull_request_review_comment: - types: [created] - issues: - types: [opened, assigned] - pull_request_review: - types: [submitted] - -jobs: - claude: - if: | - (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) || - (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) || - (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) || - (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude'))) - runs-on: ubuntu-latest - permissions: - contents: read - pull-requests: read - issues: read - id-token: write - actions: read # Required for Claude to read CI results on PRs - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - - name: Run Claude Code - id: claude - uses: anthropics/claude-code-action@v1 - with: - claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} - - # This is an optional setting that allows Claude to read CI results on PRs - additional_permissions: | - actions: read - - # Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it. - # prompt: 'Update the pull request description to include a summary of changes.' - - # Optional: Add claude_args to customize behavior and configuration - # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md - # or https://code.claude.com/docs/en/cli-reference for available options - # claude_args: '--allowed-tools Bash(gh pr:*)' - diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index 156db18..0000000 --- a/CLAUDE.md +++ /dev/null @@ -1,113 +0,0 @@ -# CLAUDE.md - -This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. - -## Commands - -### Frontend (React/TypeScript) -```bash -cd client -npm start # Start development server on port 5000 -npm run build # Build production bundle (TypeScript compilation + Vite build) -npm run preview # Preview production build -npm test # Run Vitest tests -npm run test:coverage # Run tests with coverage report -npm run lint # Run ESLint -npm run lint:fix # Run ESLint with auto-fix -``` - -### Backend (Java/Spring Boot) -```bash -cd server -./mvnw spring-boot:run # Start development server -./mvnw clean compile # Compile Java sources -./mvnw test # Run unit tests only -./mvnw clean verify -Ptests # Run all tests (unit + integration) with coverage -./mvnw spring-boot:build-image # Build Docker image -./mvnw clean verify -Pnative # Build GraalVM native image -``` - -### Docker Development Environment -```bash -bash tools/run-docker-db.sh # Start PostgreSQL database -bash tools/run-docker-server.sh # Start backend in Docker -bash tools/run-docker-client.sh # Start frontend in Docker -bash tools/check-frontend.sh # Run frontend quality checks -bash tools/check-backend.sh # Run backend quality checks -``` - -## Architecture - -### Monorepo Structure -- `client/` - React TypeScript frontend (Vite + Vitest) -- `server/` - Java Spring Boot REST API -- `tools/` - Development and deployment scripts -- `docker-compose.dev.yml` / `docker-compose.prod.yml` - Multi-service development and production environments -- `Taskfile.yml` - Task automation for docker builds and workflows - -### Frontend Architecture (client/) -- **Framework**: React 19 with React Router v7 -- **State Management**: React Context API for authentication and sidebar state -- **Authentication**: JWT tokens stored in localStorage with automatic refresh (2-minute intervals) -- **Routing**: Dynamic router configuration based on auth status (signed vs not-signed routes) -- **Internationalization**: i18next with support for English, Portuguese, Russian, Spanish -- **Styling**: Bootstrap 5 + SCSS with dark/light theme support -- **Testing**: Vitest with React Testing Library and coverage reporting -- **API Layer**: Centralized API service in `src/api-service/api.ts` with automatic auth headers - -### Backend Architecture (server/) -- **Framework**: Spring Boot 3.5.9 with Java 21 -- **Security**: Spring Security with JWT authentication -- **Database**: PostgreSQL with JPA/Hibernate and Flyway migrations -- **Testing**: Separate unit tests and integration tests with 75% coverage requirement -- **Build Options**: Traditional JAR or GraalVM native image compilation - -### Key Components - -**Authentication Flow:** -1. User credentials → `/auth/sign-in` endpoint -2. Server responds with JWT token and user data -3. Token stored in localStorage, added to all API requests via Authorization header -4. Automatic token refresh every 2 minutes via `/rest/user-sessions/refresh` -5. Protected routes wrap authenticated pages, redirect on auth failure - -**Database Schema:** -- Core entities: Users, Tasks, Notes, Task URLs, Notes URLs -- User management with password reset functionality -- Task completion tracking and user statistics - -## Development Workflow - -### Manual Setup -1. Start database: `bash tools/run-docker-db.sh` -2. Start backend: `bash tools/run-docker-server.sh` or `cd server && ./mvnw spring-boot:run` -3. Start frontend: `bash tools/run-docker-client.sh` or `cd client && npm start` -4. Access app at http://localhost:5000 - -### Using Taskfile -Alternatively, use the Taskfile.yml for automated workflows: -```bash -task dev-run # Start development environment (docker-compose.dev.yml) -task prod-up # Start production environment (docker-compose.prod.yml) -task docker-build-api # Build server Docker image -task docker-build-web # Build app Docker image -task -l # List all available tasks -``` - -### Quality Checks -Always run quality checks before submitting changes: -- Frontend: `bash tools/check-frontend.sh` -- Backend: `bash tools/check-backend.sh` - -## Testing - -### Frontend Testing -- **Framework**: Vitest + React Testing Library -- **Coverage**: Generated in `client/coverage/` directory -- **Run**: `cd client && npm test` or `npm run test:coverage` - -### Backend Testing -- **Unit Tests**: Standard JUnit tests, run with `./mvnw test` -- **Integration Tests**: Files ending in `*IntTest.java`, require database -- **Coverage**: JaCoCo reports, 75% minimum requirement -- **Full Test Suite**: `./mvnw clean verify -Ptests` (includes checkstyle, coverage) \ No newline at end of file