Commit graph

117 commits

Author SHA1 Message Date
Gabriel Menezes
8cfae110c8
fix: resolve TypeScript error in apiFetch headers
fix: resolve TypeScript error in apiFetch headers
2026-05-21 19:19:37 -04:00
Gabriel Santana de Menezes
2a41e5cf86 fix: resolve TypeScript error in apiFetch headers
Type the defaultHeaders as Record<string, string> to fix TS2322 error
when spreading headers into fetch options.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 19:17:41 -04:00
Gabriel Menezes
aa1353e6a9
docs: add PR size limits to CLAUDE.md
docs: add PR size limits to CLAUDE.md
2026-05-21 19:11:38 -04:00
Gabriel Santana de Menezes
39ed29c0c4 docs: add PR size limits to CLAUDE.md
Enforce maximum 5 files and 30 lines changed per PR to keep reviews
focused and maintainable. Split by layer (frontend, backend, config)
when exceeding limits.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 19:10:35 -04:00
Gabriel Santana de Menezes
ee3c42a17f fix: remove Content-Type header when sending FormData in apiFetch
The hardcoded 'Content-Type: application/json' header was conflicting
with multipart/form-data uploads. When body is FormData, we now omit
the Content-Type header to let the browser set the correct
'multipart/form-data; boundary=...' header.

Fixes 415 Unsupported Media Type error on photo uploads.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 19:07:31 -04:00
Gabriel Menezes
7e0bfe6e70
fix: MinIO credentials validation in docker-compose
fix: MinIO credentials validation in docker-compose
2026-05-21 18:48:55 -04:00
Gabriel Santana de Menezes
f86d8a1e69 fix: MinIO credentials validation in docker-compose
Updates MinIO credentials to meet minimum length requirements:
- MINIO_ROOT_USER: at least 3 characters (was 'minioadmin')
- MINIO_ROOT_PASSWORD: at least 8 characters (was 'minioadmin')

Now uses environment variables with sensible defaults that can be
overridden via .env file or GitHub Actions secrets.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 18:41:38 -04:00
Gabriel Menezes
5a2073cba9
feat: add MinIO image server and profile photo upload
feat: add MinIO image server and profile photo upload
2026-05-21 18:24:37 -04:00
Gabriel Santana de Menezes
59a5c61585 feat: add MinIO image server and profile photo upload
Infrastructure: MinIO service added to docker-compose (prod + dev) with
minio-init container that creates the avatars bucket with public read
policy. Traefik routes minio.task.beetech.dev → port 9000.

Backend: native MinIO SDK integration via MinioStorageService;
UploadUserPhotoUseCase validates 5 MB limit and image content-type;
new POST /auth/profile/photo endpoint (multipart). All hardcoded
ui-avatars.com fallback URLs removed from 6 use cases — backend now
returns null when user has no photo.

Frontend: ProfilePage gains clickable avatar with camera overlay,
file picker, preview, and photo upload on save. UserAvatar gains
onError handler for broken URLs and xs size. OrganizationAdminPage
replaces hardcoded ui-avatars.com with UserAvatar component.

CI/CD: deploy-main.yml passes 5 new MinIO secrets to the server and
writes them to .env.production.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 18:01:59 -04:00
Gabriel Menezes
15118177a2
feat: add user profile page with name and email editing
feat: add user profile page with name and email editing
2026-05-21 15:06:28 -04:00
Gabriel Santana de Menezes
769791b25c feat: add user profile page with name and email editing
Backend: new UpdateUserProfileUseCase with email uniqueness validation,
PUT /auth/profile endpoint. Frontend: ProfilePage with avatar initials,
inline success/error feedback, and refreshUser() sync after save.
Avatar dropdown in AppShell gains a "Meu Perfil" link.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 15:03:45 -04:00
Gabriel Menezes
8fe40e800a
feat: add "Mostrar apenas as minhas" checkbox to task filters
feat: add "Mostrar apenas as minhas" checkbox to task filters
2026-05-21 10:42:17 -04:00
Gabriel Santana de Menezes
5a71aba13f refactor: extract shared task page logic into useTaskPage hook
Eliminates code duplication between TaskListPage and TaskBoardPage by
extracting common state, effects, and handlers into a custom hook. Also
fixes bug where TaskBoardPage's mergeProjects was omitting color/icon.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 10:41:07 -04:00
Gabriel Santana de Menezes
119d896a59 feat: add "Mostrar apenas as minhas" checkbox to task filters
Adds a pre-checked checkbox next to the employee filter that
automatically filters tasks to the logged-in user on page load.
Unchecking restores the free-select dropdown behavior.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 15:51:40 -04:00
Gabriel Menezes
a3ae6fe420
docs: Require branch and PR workflow
docs: Require branch and PR workflow
2026-05-20 15:50:56 -04:00
Gabriel Santana de Menezes
064251f6ab docs: update CLAUDE.md to require branch and PR workflow
Clarify that commits should never go directly to main. All work must go through
feature branches and pull requests for review and traceability.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-05-18 11:03:26 -04:00
Gabriel Santana de Menezes
f01d72c2bb Fix task timer desync between server and browser clocks
Calculate elapsed time server-side and return it to client. Timer now adds
elapsedSeconds from server to local increments since response received, instead
of calculating from startAt with potentially mismatched browser clock.

Backend changes:
- TaskHistoryItem: add getElapsedSeconds() to calculate time since startAt
- TaskHistoryItemOutput: add elapsedSeconds field
- CreateTaskResponse.TaskHistoryItemResponse: add elapsedSeconds field
- CreateTaskMapper: map elapsedSeconds in toTaskHistoryItemOutput()

Frontend changes:
- TaskTimer: track responseTimestamp when running item changes
- Calculate: accumulatedSeconds + elapsedSeconds + (now - responseTimestamp)
- Remove parseISO import (no longer needed)
- TaskHistoryItem type: add optional elapsedSeconds field

This fixes the issue where timer doesn't update until task is stopped if
server and browser clocks are out of sync.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-05-18 10:59:16 -04:00
Gabriel Santana de Menezes
3f67d34306 Fix task listing and filters, add project colors/icons
- Remove user membership filter from task query — show all org tasks, not just user's accessible ones
- Add color and icon fields to projects with DB migration and entity updates
- Fetch org members and projects upfront for filters, not just from task results
- Convert project and status filters to chips like categories, with color/icon display
- Add icon and color picker to project creation form

Backend changes:
- TaskRepositoryImpl: remove (pu.email = ?2 or tu.email = ?2) from WHERE clause
- TaskRepository interface: remove email param from findAccessibleTasksFiltered
- ListAllTasksUseCase: adjust call without email
- CreateProjectUseCase: accept color and icon params
- ProjectController: update request/response records, map new fields
- ProjectEntityMapper: map color/icon in both directions
- Add V3 migration for color/icon columns

Frontend changes:
- TaskListPage: fetch org members and projects on org change
- TaskFilterBar: replace dropdowns with chips for projects and status
- ProjectsPage: add color picker and icon picker to form
- Project type: add optional color/icon fields
- TaskAssignee: allow photo to be nullable

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-05-18 10:19:12 -04:00
Gabriel Santana de Menezes
814bc51b86 Fix task timer showing negative values
Ensure running seconds never go negative by using Math.max(0, ...)
This prevents the timer from showing negative values when there's a
clock skew between client and server.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-05-18 09:59:56 -04:00
Gabriel Santana de Menezes
e37cf06634 redirect 2026-05-18 09:57:58 -04:00
Gabriel Santana de Menezes
ae0d536ff7 Add optional assignee to task form 2026-05-17 21:18:07 -04:00
Gabriel Santana de Menezes
7c3ba32b3f increase status fetch 2026-05-17 21:00:13 -04:00
Gabriel Santana de Menezes
8cb1831cb4 Fix public stats parsing on landing page 2026-05-17 20:58:26 -04:00
Gabriel Santana de Menezes
7f05ebdf61 Add assignee filtering to task listings 2026-05-17 20:55:29 -04:00
Gabriel Santana de Menezes
ea7ffaaffd Add multi-select task filters for projects and statuses 2026-05-17 19:22:44 -04:00
Gabriel Santana de Menezes
2d14ae480d feat: criar landing page pública com endpoint de estatísticas
Backend:
- Adicionar métodos de contagem/agregação aos repositórios (UserRepository, OrganizationRepository, TaskRepository)
- Implementar nova use case PublicStatsUseCase que retorna estatísticas públicas (usuários, organizações, tarefas completas, horas registradas)
- Criar novo controller público GET /public/stats sem autenticação
- Configurar CDI factory PublicStatsUseCaseConfig

Frontend:
- Criar nova landing page pública (LandingPage.tsx) com seções:
  * Hero com CTAs (Começar grátis / Ver demo)
  * 4 cards de funcionalidades principais (dashboard, produtividade, rastreamento, Kanban)
  * Seção "Como funciona" com 3 passos
  * Showcase visual do dashboard com leaderboard fake
  * Estatísticas reais da plataforma (consumidas do backend)
  * CTA final e footer
- Criar serviço publicStatsService para consumir o endpoint público
- Adicionar rota /landing na router
- Design alinhado com o sistema de cores e tipografia existente (Plus Jakarta Sans, Tailwind v4)

Stats reais são animadas ao fazer scroll (Framer Motion counter).
2026-05-16 17:14:42 -04:00
Gabriel Santana de Menezes
66782dda0c bora cors ajuda nois 2026-05-16 16:47:44 -04:00
Gabriel Santana de Menezes
fb6f22ed7a no more cors 2026-05-16 16:24:07 -04:00
Gabriel Santana de Menezes
de8d813b2c cors fixs 2026-05-16 11:41:48 -04:00
Gabriel Santana de Menezes
322cb2930a fix: corrigir base path do Vite para subdomínio dedicado
Com o domínio task.beetech.dev servindo o frontend na raiz, o base
'/frontend/' gerava referencias quebradas nos assets. Muda para '/'.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 11:24:46 -04:00
Gabriel Santana de Menezes
682280fefd chore: configurar domínios customizados task.beetech.dev e api.task.beetech.dev
- Frontend: remover basename '/frontend' do router
- Frontend: criar .env.production com VITE_API_URL
- Backend: remover root-path=/backend, atualizar CORS origins
- Docker Compose: atualizar Traefik labels para Host-based routing

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 11:14:07 -04:00
Gabriel Santana de Menezes
5c53379568 fix: centralizar OnboardingModal em /organizations e evitar reabertura (#15)
O modal de onboarding era disparado tanto na LoginPage quanto no AppShell
com navegação conflitante, fazendo ele fechar e reabrir ao escolher uma
opção. Agora o login sem org redireciona para /organizations, o AppShell
redireciona usuários sem org para lá, e o modal é exibido uma única vez
pela OrganizationsPage.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 10:58:21 -04:00
Gabriel Santana de Menezes
2fdb375462 feat: adicionar categorias para tasks (#23)
Adiciona conceito de Categoria por organização (nome, cor e ícone lucide),
com CRUD restrito a OWNER/ADMIN. Tasks ganham categoria opcional, filtros
multiselect de status e categoria nas listagens, badges nos cards, e
gráficos de pizza de tempo por categoria nos dashboards pessoal, da
organização e no modal de detalhes do membro.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 16:18:41 -04:00
Gabriel Menezes
16529fafa5
fix: skip auth header on unprotected health status endpoint
fix: skip auth header on unprotected health status endpoint
2026-05-15 15:46:32 -04:00
Gabriel Santana de Menezes
02b8556b02 fix: skip auth header on unprotected health status endpoint 2026-05-15 15:39:32 -04:00
Gabriel Santana de Menezes
9ba47e0ae5 fix: corrigir expiração de token e padronizar constantes
- Substitui LocalDateTime.now() por Instant.now() no issuedAt — a string
  produzida por LocalDateTime não contém timezone e era interpretada como
  hora local pelo browser, fazendo o frontend calcular expiresAt errado e
  nunca deslogar o usuário quando o token vencia.
- Cria TokenConstants com ACCESS_TOKEN_EXPIRY_SECONDS e
  REFRESH_TOKEN_EXPIRY_SECONDS, eliminando os valores hardcoded em
  LoginUseCase e RefreshTokenUseCase.
- Remove imports não utilizados em AuthController.

closes #24

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 22:45:42 -04:00
Gabriel Santana de Menezes
db463551e6 feat: filtros de busca nas listagens de tasks (#26)
Backend: adiciona ListMyTasksInput, ListMyTasksRequest (@BeanParam) com
parâmetros text, projectId e status; novo método findTasksByUserFiltered
no repositório com query dinâmica via Panache; mapper atualizado;
CLAUDE.md documenta regra de DTO Request para 3+ parâmetros.

Frontend: componente reutilizável TaskFilterBar (texto, projeto, status)
integrado em TaskListPage e TaskBoardPage; getMyTasks() aceita filtros
repassados como query params ao backend.

closes #26

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 22:12:05 -04:00
Gabriel Santana de Menezes
7eda39021b chore: remover script de criação do banco keycloak
closes #20

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 21:46:17 -04:00
Gabriel Santana de Menezes
345a41cf13 fix: salvar histórico ao criar task
Propagava o campo history do CreateTaskRequest até o use case e persistência.
O mapeamento em TaskControllerMapper ignorava o history; CreateTaskInput não
tinha o campo; e CreateTaskUseCase não aplicava os itens à entidade antes
de salvar.

Closes #22

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 21:33:44 -04:00
Gabriel Santana de Menezes
0ff655bf8b corrigindo endpomint do healthy 2026-05-14 14:35:15 -04:00
Gabriel Santana de Menezes
0a0228c93e fix health endpoint path and simplify traefik labels
- Remove leading slash from smallrye-health.root-path so the health
  endpoint resolves to /backend/q/status (relative to non-app root)
  instead of the unreachable absolute path /status
- Clean up docker-compose traefik labels (remove stale comments)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 21:46:42 -04:00
Gabriel Santana de Menezes
38b6ddcd5d add prefix on frontend 2026-05-13 21:03:14 -04:00
Gabriel Santana de Menezes
c6e9e6cc77 adicionando prefix on backend 2026-05-13 20:47:06 -04:00
Gabriel Santana de Menezes
da444090ed gc 2026-05-13 20:19:41 -04:00
Gabriel Santana de Menezes
22d770bb1b refazendo sem traefik 2026-05-13 20:14:12 -04:00
Gabriel Santana de Menezes
be17dbd503 downgrade do traefik 2026-05-13 19:45:43 -04:00
Gabriel Santana de Menezes
c6b6cb3035 savepoint 2026-05-13 19:27:01 2026-05-13 19:27:01 -04:00
Gabriel Santana de Menezes
01e0b9ada6 https e ssl 2026-05-13 19:23:16 -04:00
Gabriel Santana de Menezes
3c8f843be9 tentando outra forma de ler os dados 2026-05-13 19:07:50 -04:00
Gabriel Santana de Menezes
7b33b539b0 savepoint 2026-05-13 18:56:56 2026-05-13 18:56:56 -04:00