Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
163 commits
Select commit Hold shift + click to select a range
48e7148
docs: update roadmap - Sprint 8D completed, 8E planned, prioritize Co…
Mar 24, 2026
bfcc791
feat: add Playwright E2E test structure and pipeline integration
Mar 24, 2026
804e23e
docs: update admin-portal docs with React examples and fix E2E tests
Mar 24, 2026
4937e20
fix: resolve documentation inconsistencies and add dynamic E2E toggle
Mar 24, 2026
790fabe
refactor: restructure E2E tests to tests/MeAjudaAi.Web.*.Tests/
Mar 24, 2026
e688313
chore: exclude nul from tracking and update e2e specs
Mar 24, 2026
03d7ae9
feat: Introduce E2E tests, establish CI/CD pipeline, and add core doc…
Mar 24, 2026
a8f4394
feat: Add e2e-support library with project and ESLint configurations.
Mar 24, 2026
fb97b1a
feat: Add Nx project configuration for the e2e-support library.
Mar 24, 2026
9e2079a
test: Add E2E tests covering onboarding, profile management, configur…
Mar 24, 2026
adb928d
feat: Establish comprehensive project roadmap, architecture documenta…
Mar 24, 2026
5e65c3f
feat: Introduce an admin sidebar component, add extensive E2E tests f…
Mar 25, 2026
b2a8898
feat: implement responsive sidebar component with navigation, user in…
Mar 25, 2026
931df3c
feat: Add comprehensive documentation for project architecture, admin…
Mar 25, 2026
43a6d61
feat: Add a comprehensive plan for implementing React 19 + TypeScript…
Mar 25, 2026
4ca8e06
feat: Set up Vitest and React Testing Library for unit testing across…
Mar 25, 2026
816ba64
test: Add Vitest configuration and initial unit tests for customer-fa…
Mar 25, 2026
3687885
feat: Initialize web project testing infrastructure with Vitest and P…
Mar 25, 2026
f45e7ad
feat: Establish web project foundation with modular design, comprehen…
Mar 25, 2026
0352068
test: Introduce Vitest and add unit tests for various components, hoo…
Mar 25, 2026
a851495
feat: Introduce Vitest for customer application unit and E2E testing,…
Mar 25, 2026
584df49
test: Introduce Vitest and add unit and E2E performance tests for cus…
Mar 25, 2026
705eab1
feat: introduce Vitest for unit and E2E tests across customer web app…
Mar 25, 2026
720542e
feat: add unit tests for various customer web components and hooks.
Mar 25, 2026
9e3b367
feat: Add comprehensive unit and E2E tests across customer components…
Mar 25, 2026
44fb031
feat: Add Vitest unit and E2E performance tests for the customer web …
Mar 25, 2026
96eccdd
feat: Add comprehensive frontend testing plan and initial Vitest/Play…
Mar 25, 2026
0271da1
feat: Implement initial Vitest unit testing infrastructure and add te…
Mar 25, 2026
c44da4d
feat: Implement comprehensive frontend testing infrastructure with Vi…
Mar 25, 2026
34adca5
feat: Implement new frontend testing strategy using Vitest and React …
Mar 26, 2026
41b9585
feat: Establish comprehensive testing infrastructure with unit and E2…
Mar 26, 2026
dc4ef07
chore: modularize CI/CD pipelines
Mar 26, 2026
cf815dd
feat: add bicep infrastructure and update deploy-azure workflow for d…
Mar 26, 2026
c56acba
chore: update deploy-azure workflow to support dev/prod environments
Mar 26, 2026
f8dc74a
docs: add Portuguese instructions for Azure CI/CD and Bicep infrastru…
Mar 26, 2026
a60be37
chore: add Aspire infrastructure artifacts to .gitignore
Mar 26, 2026
009afd6
chore: refine coverage filters for backend and add coverage report fo…
Mar 26, 2026
54f2271
feat: Implement comprehensive testing infrastructure with Vitest, Pla…
Mar 26, 2026
0c1c37e
feat: Add Zod schemas for customer and provider authentication and co…
Mar 26, 2026
c68893e
fix: review corrections for E2E tests and frontend configuration
Mar 26, 2026
ffb51e3
chore: update package-lock.json with e2e-support dependency
Mar 26, 2026
d34e158
feat: add cobertura coverage reporter for CI
Mar 26, 2026
4b41b92
fix: update mkdocs nav and fix relative paths in e2e-tests
Mar 26, 2026
8b072ea
chore: add MkDocs site output to gitignore
Mar 26, 2026
bd914dd
fix: review corrections for E2E tests and validation
Mar 26, 2026
99cc54d
fix: fix customer-register-form test to properly mock sonner and asse…
Mar 26, 2026
0aa982a
docs: update roadmap status - mark completed items
Mar 27, 2026
4f8be45
fix: review corrections - multiple improvements
Mar 27, 2026
bcb231f
fix: fix coverage glob pattern in ci-frontend.yml
Mar 27, 2026
a4d77d2
fix: review corrections - multiple improvements (phase 2)
Mar 27, 2026
3c014c8
fix: add output-file param to CodeCoverageSummary and fail_if_missing
Mar 27, 2026
590848b
fix: simplify coverage file path patterns in ci-frontend.yml
Mar 27, 2026
4d17f2d
fix: use merged coverage report in CodeCoverageSummary instead of ind…
Mar 27, 2026
79add1c
fix: normalizeProviderType to return number for valid numeric strings…
Mar 27, 2026
6106c2b
feat: Establish new React/Next.js frontend architecture for Admin and…
Mar 27, 2026
9f7e5ff
build: remove Aspire.Hosting.Orchestration.linux-x64 package version …
Mar 27, 2026
ae73638
build: Generate `packages.lock.json` files for all projects and updat…
Mar 27, 2026
b7cd37c
test: Add Vitest unit tests for various components, utilities, and AP…
Mar 27, 2026
dab91ae
feat: Introduce comprehensive testing by adding unit tests for Locati…
Mar 27, 2026
eb2e864
feat: Introduce comprehensive frontend testing, including unit, integ…
Mar 27, 2026
efd4d7e
feat: implement Keycloak permission resolver with caching and add com…
Mar 28, 2026
83ab7a6
feat: implement KeycloakPermissionResolver with caching and add unit …
Mar 28, 2026
60c521a
test: add integration tests for Documents API endpoints
Mar 28, 2026
08d2221
test: add unit tests for UI components and implement coverage report …
Mar 28, 2026
1157d04
feat: implement customer registration form and expand test coverage w…
Mar 28, 2026
d09120a
feat: add script to aggregate and validate global frontend test cover…
Mar 28, 2026
17fafc1
feat: implement frontend testing suite, caching infrastructure, and C…
Mar 28, 2026
2295daf
test: add unit tests for search page functionality and error handling
Mar 28, 2026
34e06db
feat: implement frontend testing infrastructure and add unit tests fo…
Mar 28, 2026
d7dd033
feat: implement locations module structure, search endpoint, hybrid c…
Mar 28, 2026
9a7a417
test: add unit tests for customer registration form, admin sidebar, s…
Mar 28, 2026
4d0a5ad
feat: implement CI E2E pipeline and add component unit tests
Mar 28, 2026
268dfb4
feat: add CI workflow for automated backend and frontend E2E testing
Mar 28, 2026
d8bbd68
feat: add E2E CI pipeline and unit tests for UI components and regist…
Mar 28, 2026
beda776
test: implement comprehensive unit and component test suites across w…
Mar 28, 2026
44d50a8
test: add unit tests for PermissionService covering cache integration…
Mar 28, 2026
c289a49
feat: implement E2E CI pipeline, add phone validator, and expand unit…
Mar 28, 2026
a9af3db
test: resolve all failing unit tests across react apps
Mar 28, 2026
573b7a9
fix(build): resolve next.js build warnings and typescript errors in c…
Mar 28, 2026
cb8549a
test: resolve all failing unit tests across react apps and backend en…
Mar 29, 2026
06b30f7
ci: fix frontend coverage merge reporting and include customer app
Mar 29, 2026
2752267
fix(e2e): configure Playwright for CI with auth mocks and correct routes
Mar 29, 2026
a5f8a38
fix(integration-tests): correct failing backend integration tests
Mar 29, 2026
c51fde7
ci: implement frontend CI pipeline, add admin portal documentation, a…
Mar 29, 2026
c35d4bf
feat: implement Keycloak authentication for admin portal and add next…
Mar 29, 2026
9e8bdfb
feat: implement EventTypeRegistry to discover and cache integration e…
Mar 29, 2026
12e483c
test: add unit tests for useDashboardStats hook and utility functions
Mar 29, 2026
465dff4
feat: implement event type registry, configure Keycloak auth for admi…
Mar 29, 2026
b0098cb
feat: implement admin dashboard with statistics visualization and fro…
Mar 29, 2026
1978e7d
feat: add Playwright configuration and frontend CI pipeline for autom…
Mar 29, 2026
6cb2df9
feat: implement CI pipelines for E2E and frontend testing with Playwr…
Mar 29, 2026
b3ba30d
feat: implement E2E testing pipeline and dashboard KPI verification t…
Mar 30, 2026
0e4eaef
test: add integration tests for CEP provider fallback scenarios and i…
Mar 30, 2026
da49073
feat: add vitest configuration files for customer, provider, and admi…
Mar 30, 2026
8a70167
feat: implement end-to-end testing infrastructure with Playwright and…
Mar 30, 2026
2b661e0
feat: add Playwright base test fixtures with authentication mocking a…
Mar 30, 2026
83e43d6
feat: add base Playwright test utilities with auth mocking and login …
Mar 30, 2026
345a8b0
feat: implement NextAuth middleware with E2E test bypass support
Mar 30, 2026
c2f48f8
fix: correcao testes de integracao - tolerant responses and skip CEP …
Mar 30, 2026
26ff328
fix: improve E2E mocks and skip flaky tests
Mar 30, 2026
1fff1f5
fix: skip flaky E2E tests - will fix later
Mar 30, 2026
1ab2ac4
feat: implement monorepo structure with shared test utilities, API cl…
Mar 30, 2026
fec0f16
feat: implement E2E CI pipeline and add unit/integration test suites …
Mar 30, 2026
96263d0
feat: add CI workflow for backend and frontend E2E testing
Mar 30, 2026
4b5c713
feat: add CI workflow for backend and frontend E2E testing
Mar 30, 2026
bb49f61
feat: add GitHub Actions workflow for automated backend and frontend …
Mar 30, 2026
49d8dd0
feat: implement geocoding service, add normalization tests, and confi…
Mar 30, 2026
78681fb
feat: implement SelfOrAdmin authorization handler and configure NextA…
Mar 30, 2026
3986ca8
test: add integration tests for CEP provider fallback logic and initi…
Mar 30, 2026
e08f7b6
test: add integration tests for CEP lookup service and service catalo…
Mar 30, 2026
0278a04
feat: implement NextAuth configuration with Keycloak and credential p…
Mar 30, 2026
5c57dda
feat: implement provider registration handler, admin configuration, a…
Mar 31, 2026
d766c93
feat: implement E2E CI pipeline with Playwright and add integration t…
Mar 31, 2026
0d68138
feat: implement Playwright E2E testing suite and CI pipeline for web …
Mar 31, 2026
2df3aa5
fix(tests): resolve integration test failures and improve infrastruc…
Apr 1, 2026
851d06f
feat: implement search page with geocoding, provider filtering, and a…
Apr 1, 2026
fbfde44
feat: implement unit and integration test suites for Locations and Us…
Apr 1, 2026
b488e09
feat: implement Playwright E2E testing framework with initial admin p…
Apr 1, 2026
f25b7f6
test: add integration tests for AllowedCity admin endpoints
Apr 1, 2026
81a794c
test: add integration tests for AllowedCity admin API endpoints
Apr 1, 2026
72754d3
test(providers): add unit tests for admin and public endpoints
Apr 1, 2026
4e08704
test(providers): implement integration tests for admin endpoints and …
Apr 1, 2026
ec57127
test(service-catalogs): add missing integration tests for endpoints
Apr 1, 2026
32e688b
test(users): add missing integration tests for endpoints
Apr 1, 2026
ebff9fd
test: achieve high coverage using integration tests and fix build issues
Apr 1, 2026
c0bb339
fix(providers): add email and phone validation to RegisterProviderCom…
Apr 1, 2026
175d599
fix(integration-tests): fix routes, data and deserialization issues i…
Apr 1, 2026
62ff949
test: add integration tests for Service Catalogs and Providers admin …
Apr 2, 2026
6fb6e40
test: add integration tests for documents, geographic restrictions, a…
Apr 2, 2026
7ea46f4
test: add integration test suites for providers, service catalogs, us…
Apr 2, 2026
26dbcd0
feat: add backend CI workflow with build, test, and coverage reporting
Apr 2, 2026
b191994
ci: add backend CI workflow with build, test, and coverage reporting
Apr 2, 2026
06f096e
feat: add CI workflow for backend build, test, and coverage reporting
Apr 2, 2026
b26f564
feat: add CI workflow for backend build, unit, and integration testing
Apr 2, 2026
18445be
feat: add backend CI workflow with PostgreSQL and Azurite integration…
Apr 2, 2026
1772862
feat: add CI workflow for backend build and test automation
Apr 2, 2026
10adeb2
feat: add backend CI workflow for automated testing and coverage anal…
Apr 2, 2026
66a0812
ci: unify test suite and fix coverage instrumentation to reflect true…
Apr 2, 2026
a69a1b2
ci: fix coverage file overwriting and restore db wait step
Apr 3, 2026
fce5d13
ci: split unit and integration tests for better debuggability and fix…
Apr 3, 2026
834f3cd
ci: ensure coverage collection even if tests fail and fix file aggreg…
Apr 3, 2026
5cbeb41
ci: fix shell syntax error and revert to separate test steps for bett…
Apr 3, 2026
6d2c221
test: add unit tests for domain event handlers, integration event map…
Apr 6, 2026
f3d600e
test: add unit tests for provider event mappers and register provider…
Apr 6, 2026
8c8c6d1
test: Fix Provider tests and stabilize CI coverage
Apr 7, 2026
14fa7ea
feat: implement business metrics collection service and tracking midd…
Apr 7, 2026
741863b
feat: add backend CI workflow with build, test, and coverage reportin…
Apr 7, 2026
957545c
feat: add backend CI workflow with build, test, and coverage reportin…
Apr 7, 2026
1530ae9
feat: add GitHub Actions workflow for backend CI with automated testi…
Apr 7, 2026
9f0eb0f
feat: add backend CI workflow with build, test, and coverage reporting
Apr 7, 2026
898df51
test: add unit tests for database exceptions, global exception handle…
Apr 7, 2026
71a4f6e
test: add unit tests for authorization extensions, Keycloak permissio…
Apr 7, 2026
d72ce57
feat: implement shared infrastructure options, authorization resolver…
Apr 7, 2026
8183208
feat: implement shared logging infrastructure with correlation ID tra…
Apr 7, 2026
4a60abe
feat: implement standardized API response and error models in new Con…
Apr 7, 2026
1a5815b
test: add unit tests for security middlewares and configure backend C…
Apr 7, 2026
21def1b
ci: add backend CI workflow with build, test, and coverage reporting …
Apr 7, 2026
44dfe4c
feat: implement SimpleHostEnvironment, add unit tests for extensions,…
Apr 7, 2026
c9cb4d4
feat: implement business metrics monitoring, standard API response mo…
Apr 7, 2026
c7883fa
feat: implement Keycloak permission resolver, business metrics monito…
Apr 8, 2026
31d08df
chore: stabilize backend coverage and fix build errors by excluding c…
Apr 8, 2026
99ef5e9
chore: update code coverage include filters to target specific projec…
Apr 8, 2026
ed18dc9
chore: update coverlet coverage scope to include all MeAjudaAi assemb…
Apr 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/master-ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
ConnectionStrings__meajudaai-db: ${{ steps.db.outputs.connection-string }}
run: |
set -e # Exit immediately if any command fails

Check warning on line 101 in .github/workflows/master-ci-cd.yml

View workflow job for this annotation

GitHub Actions / YAML Syntax Check

101:1 [trailing-spaces] trailing spaces
# Define exclude patterns for coverage (files only - assemblies excluded via Include in coverlet)
# Excludes: Migrations, Database, Contracts, OpenApi generated, compiler services, regex generator
EXCLUDE_PATTERNS="**/Migrations/*.cs,**/Database/*.cs,**/*OpenApi*.generated.cs,**/System.Runtime.CompilerServices*.cs,**/*RegexGenerator.g.cs"
Expand Down Expand Up @@ -164,29 +164,43 @@
npm test
echo "React Admin tests completed"

- name: Run E2E Tests (Playwright)
working-directory: src/Web
if: false # Disabled for now - enable after apps are running
run: |
echo "================================"
echo "E2E TESTS (PLAYWRIGHT)"
echo "================================"

# Install Playwright browsers
npx playwright install --with-deps chromium

# Run E2E tests (chromium only)
npx playwright test --reporter=list --project=ci

- name: Free Disk Space for Integration Tests
run: |
echo "Freeing disk space before integration tests..."

Check warning on line 184 in .github/workflows/master-ci-cd.yml

View workflow job for this annotation

GitHub Actions / YAML Syntax Check

184:1 [trailing-spaces] trailing spaces
# Show disk usage before cleanup
echo "Disk usage before cleanup:"
df -h

Check warning on line 188 in .github/workflows/master-ci-cd.yml

View workflow job for this annotation

GitHub Actions / YAML Syntax Check

188:1 [trailing-spaces] trailing spaces
# Remove Docker images and containers that are not needed
echo "️ Removing unused Docker resources..."
docker system prune -af --volumes || true

Check warning on line 192 in .github/workflows/master-ci-cd.yml

View workflow job for this annotation

GitHub Actions / YAML Syntax Check

192:1 [trailing-spaces] trailing spaces
# Remove large packages/tools not needed for tests
echo "️ Removing unnecessary packages..."
sudo apt-get clean
sudo rm -rf /usr/local/lib/android || true
sudo rm -rf /opt/ghc || true
sudo rm -rf /usr/local/.ghcup || true

Check warning on line 199 in .github/workflows/master-ci-cd.yml

View workflow job for this annotation

GitHub Actions / YAML Syntax Check

199:1 [trailing-spaces] trailing spaces
# Show disk usage after cleanup
echo "Disk usage after cleanup:"
df -h

Check warning on line 203 in .github/workflows/master-ci-cd.yml

View workflow job for this annotation

GitHub Actions / YAML Syntax Check

203:1 [trailing-spaces] trailing spaces
echo "Disk space cleanup completed"

- name: Run integration tests
Expand All @@ -202,7 +216,7 @@
ConnectionStrings__meajudaai-db: ${{ steps.db.outputs.connection-string }}
run: |
set -e # Exit immediately if any command fails

Check warning on line 219 in .github/workflows/master-ci-cd.yml

View workflow job for this annotation

GitHub Actions / YAML Syntax Check

219:1 [trailing-spaces] trailing spaces
echo "================================"
echo "INTEGRATION TESTS (NO COVERAGE)"
echo "================================"
Expand All @@ -216,7 +230,7 @@
ConnectionStrings__meajudaai-db: ${{ steps.db.outputs.connection-string }}
run: |
set -e # Exit immediately if any command fails

Check warning on line 233 in .github/workflows/master-ci-cd.yml

View workflow job for this annotation

GitHub Actions / YAML Syntax Check

233:1 [trailing-spaces] trailing spaces
echo "================================"
echo "E2E TESTS (NO COVERAGE)"
echo "================================"
Expand All @@ -239,11 +253,11 @@
env:
DOTNET_ROOT: ${{ env.DOTNET_ROOT }}
with:
reports: 'TestResults/Shared/**/coverage.cobertura.xml;TestResults/Architecture/**/coverage.cobertura.xml;TestResults/ApiService/**/coverage.cobertura.xml;TestResults/Users/**/coverage.cobertura.xml;TestResults/Documents/**/coverage.cobertura.xml;TestResults/Providers/**/coverage.cobertura.xml;TestResults/ServiceCatalogs/**/coverage.cobertura.xml;TestResults/Locations/**/coverage.cobertura.xml;TestResults/SearchProviders/**/coverage.cobertura.xml'

Check warning on line 256 in .github/workflows/master-ci-cd.yml

View workflow job for this annotation

GitHub Actions / YAML Syntax Check

256:121 [line-length] line too long (461 > 120 characters)
targetdir: 'TestResults/Coverage'
reporttypes: 'Html;Cobertura;JsonSummary'
assemblyfilters: '-*.Tests*;-*Test*;-*.Migrations.*;-*.Database;-*.Contracts'
classfilters: '-*.Migrations.*;-*.Database.*;-*.Contracts.*;-*.Metrics.*;-*.HealthChecks.*;-*.Jobs.Hangfire*;-*.Jobs.Configuration*;-*Program*;-*AppHost*;-*.ServiceDefaults*;-*.Keycloak.*;-*.Monitoring.*;-*NoOp*;-*RabbitMq*;-*ServiceBus*;-*Hangfire*;-*.Jobs.*;-*Options;-*BaseDesignTimeDbContextFactory*;-*SchemaPermissionsManager;-*SimpleHostEnvironment;-*CacheWarmupService;-*GeoPointConverter;-*ModuleNames;-*ModuleApiInfo;-*MessagingExtensions;-*ICacheableQuery'

Check warning on line 260 in .github/workflows/master-ci-cd.yml

View workflow job for this annotation

GitHub Actions / YAML Syntax Check

260:121 [line-length] line too long (476 > 120 characters)
verbosity: 'Info'
tag: '${{ github.run_number }}_${{ github.run_id }}'
# Note: UNIT test coverage for backend only.
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,20 @@ jobs:
# 2. Run the affected build for the rest of the workspace
npx nx affected --target=build --exclude=MeAjudaAi.Web.Customer

- name: Run E2E Tests (Playwright)
working-directory: ./src/Web
if: false # Disabled for now - enable after apps are running
run: |
echo "================================"
echo "E2E TESTS (PLAYWRIGHT)"
echo "================================"

# Install Playwright browsers
npx playwright install --with-deps chromium

# Run E2E tests (chromium only)
npx playwright test --reporter=list --project=ci

- name: Prepare Aspire Integration Tests
run: |
echo " Preparing .NET Aspire for integration tests..."
Expand Down
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Uma plataforma abrangente de serviços construída com .NET Aspire, projetada para conectar prestadores de serviços com clientes usando arquitetura monólito modular.

<!-- Atualizado: 5 Fevereiro 2026 - Sprint 7.21 (Package Updates: Microsoft.OpenApi 2.6.1, Aspire.Hosting.Redis 13.1.0, SonarAnalyzer.CSharp 10.19.0) -->
<!-- Atualizado: 24 Março 2026 - Sprint 8D (Admin Portal Migration: Blazor → React) -->

## 🎯 Visão Geral

Expand All @@ -20,9 +20,10 @@ O **MeAjudaAi** é uma plataforma moderna de marketplace de serviços que implem

- **.NET 10.0.2** - Framework principal
- **.NET Aspire 13.1** - Orquestração e observabilidade
- **Blazor WebAssembly 10.0.2** - Admin Portal SPA
- **MudBlazor 8.15.0** - Material Design UI components
- **Fluxor 6.9.0** - Redux state management
- **React 19 + Next.js 15** - Frontend Web Apps (Customer, Provider, Admin)
- **Tailwind CSS v4** - Styling
- **Zustand + TanStack Query** - State management
- **Playwright** - E2E Testing
- **Entity Framework Core 10.0.2** - ORM e persistência
- **Microsoft.OpenApi 2.6.1** - OpenAPI specification
- **SonarAnalyzer.CSharp 10.19.0** - Code quality analysis
Expand Down Expand Up @@ -102,9 +103,10 @@ O projeto foi organizado para facilitar navegação e manutenção:
│ ├── Bootstrapper/ # API Service entry point
│ ├── Modules/ # Módulos de domínio (DDD)
│ ├── Shared/ # Contratos e abstrações
│ └── Web/ # Aplicações Web
│ ├── MeAjudaAi.Web.Admin/ # Admin Portal (Blazor WASM)
│ └── meajudaai-web-customer/ # Customer Web App (Next.js 15)
│ └── Web/ # Aplicações Web (NX Workspace)
│ ├── MeAjudaAi.Web.Admin/ # Admin Portal (React + Next.js 15)
│ ├── MeAjudaAi.Web.Customer/ # Customer Web App (Next.js 15)
│ └── MeAjudaAi.Web.Provider/ # Provider Web App (Next.js 15)
├── 📁 tests/ # Testes automatizados (xUnit v3)
└── 📁 tools/ # Ferramentas de desenvolvimento
└── api-collections/ # Gerador Bruno/Postman collections
Expand Down Expand Up @@ -267,9 +269,8 @@ dotnet test tests/MeAjudaAi.Modules.Users.Tests/
- ✅ Gestão de Documentos (upload, OCR, verificação)
- ✅ Gestão de Service Catalogs (categorias + serviços)
- ✅ Restrições Geográficas (cidades permitidas)
- ✅ Dark Mode com Fluxor state management
- ✅ Localização completa em português
- ✅ 43 testes bUnit (componentes principais)
- ✅ Admin Portal React com Tailwind CSS
- ✅ E2E Tests com Playwright
Comment thread
frigini marked this conversation as resolved.

**Como Executar:**

Expand Down
27 changes: 13 additions & 14 deletions docs/admin-portal/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,24 +158,23 @@ Ver [Dashboard Documentation](dashboard.md) para detalhes completos.

## 🎨 Padrões de UI/UX

### MudBlazor Components
### Componentes React

Todos os módulos utilizam componentes MudBlazor para consistência:
Todos os módulos utilizam componentes React com Tailwind CSS para consistência:
Comment thread
frigini marked this conversation as resolved.

- **MudDataGrid**: Tabelas paginadas com ordenação e filtros
- **MudDialog**: Modais para criação/edição
- **MudForm**: Formulários com validação
- **MudTextField**: Campos de texto com máscaras
- **MudSelect**: Dropdowns para seleção
- **MudChip**: Status badges coloridos
- **MudButton**: Botões de ação
- **DataGrid**: Tabelas paginadas com ordenação e filtros (TanStack Table)
- **Dialog**: Modais para criação/edição
- **Forms**: Formulários com validação (React Hook Form + Zod)
- **Select**: Dropdowns para seleção
- **Badge**: Status badges coloridos
- **Button**: Botões de ação

### Status Chips
### Status Badges

```razor
<MudChip Color="@VerificationStatus.ToColor(provider.VerificationStatus)">
@VerificationStatus.ToDisplayName(provider.VerificationStatus)
</MudChip>
```tsx
<Badge color={statusColors[provider.verificationStatus]}>
{verificationStatusLabels[provider.verificationStatus]}
</Badge>
```

**Cores Padrão**:
Expand Down
179 changes: 102 additions & 77 deletions docs/admin-portal/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## 📋 Introdução

O **Admin Portal** é a interface administrativa da plataforma MeAjudaAi, construída com Blazor WebAssembly para fornecer uma experiência de gerenciamento moderna, responsiva e eficiente.
O **Admin Portal** é a interface administrativa da plataforma MeAjudaAi, construída com React + Next.js para fornecer uma experiência de gerenciamento moderna, responsiva e eficiente.

## 🎯 Propósito

Expand All @@ -17,27 +17,28 @@ O Admin Portal permite que administradores da plataforma gerenciem:
## 🛠️ Stack Tecnológica

### Frontend
- **Blazor WebAssembly (.NET 10)**: Framework principal para SPA
- **MudBlazor 8.15.0**: Biblioteca de componentes UI Material Design
- **Fluxor**: State management (padrão Flux/Redux)
- **React 19 + Next.js 15**: Framework principal para SPA
- **Tailwind CSS v4**: Biblioteca de estilização
- **Zustand**: State management
- **TanStack Query**: Server state management

### Autenticação
- **Keycloak**: Identity Provider (OIDC/OAuth 2.0)
- **PKCE Flow**: Autenticação segura para aplicações públicas
- **NextAuth.js**: Autenticação para Next.js

### Comunicação
- **Refit**: Cliente HTTP tipado para APIs
- **System.Text.Json**: Serialização JSON
- **Axios / Fetch**: Cliente HTTP
- **TanStack Query**: Data fetching e caching

## 🏗️ Arquitetura

```mermaid
graph TB
subgraph "Admin Portal (Blazor WASM)"
UI[Pages/Components]
State[Fluxor State]
Effects[Fluxor Effects]
API[API Clients - Refit]
subgraph "Admin Portal (React + Next.js)"
UI[React Components]
Store[Zustand Store]
Query[TanStack Query]
API[API Calls - Fetch]
end

subgraph "Backend"
Expand All @@ -47,57 +48,57 @@ graph TB

subgraph "Auth"
Keycloak[Keycloak]
NextAuth[NextAuth.js]
end

UI --> State
State --> Effects
Effects --> API
UI --> Store
UI --> Query
Query --> API
API --> Gateway
Gateway --> Modules

UI -.Auth.-> Keycloak
UI -.Auth.-> NextAuth
NextAuth -.-> Keycloak
API -.JWT.-> Gateway
```

## 📁 Estrutura de Diretórios

```text
src/Web/MeAjudaAi.Web.Admin/
├── Pages/ # Páginas principais
│ ├── Dashboard.razor
│ ├── Providers.razor
│ ├── Documents.razor
│ ├── Categories.razor
│ ├── Services.razor
│ └── AllowedCities.razor
├── Components/ # Componentes reutilizáveis
│ ├── Dialogs/ # Modais de criação/edição
│ ├── Common/ # Componentes compartilhados
│ └── Accessibility/ # Componentes de acessibilidade
├── Features/ # Fluxor Features (State/Actions/Effects/Reducers)
│ ├── Modules/
│ │ ├── Providers/
│ │ ├── Documents/
│ │ └── ServiceCatalogs/
│ ├── Dashboard/
│ └── Theme/
├── Services/ # Serviços auxiliares
│ ├── ErrorHandlingService.cs
│ ├── LocalizationService.cs
│ └── LiveRegionService.cs
├── Constants/ # Constantes centralizadas
│ ├── ProviderConstants.cs
│ ├── DocumentConstants.cs
│ └── CommonConstants.cs
│ # Nota: Enums e constantes compartilhadas com backend estão em MeAjudaAi.Contracts
│ # Esta pasta contém apenas constantes específicas da UI (ex: layout, cores, timeouts)
├── Helpers/ # Métodos auxiliares
│ ├── AccessibilityHelper.cs
│ ├── PerformanceHelper.cs
│ └── DebounceHelper.cs
└── Layout/ # Layouts e navegação
├── MainLayout.razor
└── NavMenu.razor
apps/admin-portal/
├── src/
│ ├── app/ # Next.js App Router
│ │ ├── (auth)/ # Authentication routes
│ │ │ ├── login/
│ │ │ └── layout.tsx
│ │ ├── (dashboard)/ # Protected routes
│ │ │ ├── providers/
│ │ │ ├── documents/
│ │ │ ├── services/
│ │ │ ├── cities/
│ │ │ ├── dashboard/
│ │ │ └── layout.tsx
│ │ ├── layout.tsx
│ │ └── page.tsx
│ ├── components/ # Reusable components
│ │ ├── ui/ # Base UI components (Button, Text, etc.)
│ │ ├── providers/ # Provider-specific components
│ │ ├── documents/ # Document-specific components
│ │ └── common/ # Shared components
│ ├── hooks/ # Custom React hooks
│ │ ├── useProviders.ts
│ │ ├── useDocuments.ts
│ │ └── useTranslation.ts
│ ├── stores/ # Zustand stores
│ │ ├── providersStore.ts
│ │ └── uiStore.ts
│ ├── lib/ # Utilities
│ │ ├── api.ts # API client
│ │ └── utils.ts
│ └── types/ # TypeScript types
├── e2e/ # Playwright tests
├── playwright.config.ts
└── package.json
Comment thread
frigini marked this conversation as resolved.
Outdated
```

## 🔐 Autenticação e Autorização
Expand All @@ -121,17 +122,31 @@ src/Web/MeAjudaAi.Web.Admin/

### Uso em Componentes

```razor
@attribute [Authorize(Policy = PolicyNames.AdminPolicy)]

<AuthorizeView Policy="@PolicyNames.ManagerPolicy">
<Authorized>
<MudButton>Editar</MudButton>
</Authorized>
<NotAuthorized>
<MudText>Sem permissão</MudText>
</NotAuthorized>
</AuthorizeView>
```tsx
// Using NextAuth.js useSession for auth
'use client';
import { useSession } from 'next-auth/react';

export function EditButton({ providerId }: { providerId: string }) {
const { data: session } = useSession();

if (session?.user?.role !== 'admin' && session?.user?.role !== 'manager') {
return <span className="text-gray-500">Sem permissão</span>;
}

return <Button>Editar</Button>;
}

// Protected route wrapper
function AdminProtected({ children }: { children: React.ReactNode }) {
const { data: session, status } = useSession();

if (status === 'loading') return <Spinner />;
if (!session) return <Redirect to="/login" />;
if (session.user.role !== 'admin') return <AccessDenied />;
Comment thread
frigini marked this conversation as resolved.
Outdated

return <>{children}</>;
}
```

## 🌐 Localização (i18n)
Expand All @@ -143,11 +158,21 @@ O Admin Portal suporta múltiplos idiomas:

### Uso

```razor
@inject LocalizationService L

<MudButton>@L.GetString("Common.Save")</MudButton>
<MudText>@L.GetString("Providers.ItemsFound", count)</MudText>
```tsx
'use client';
import { useTranslation } from '@/hooks/useTranslation';

export function SaveButton() {
const { t } = useTranslation();

return <Button>{t('Common.Save')}</Button>;
}

// With interpolation
function ProvidersCount({ count }: { count: number }) {
const { t } = useTranslation();
return <Text>{t('Providers.ItemsFound', { count })}</Text>;
}
```

## ♿ Acessibilidade
Expand All @@ -164,10 +189,10 @@ O Admin Portal segue as diretrizes **WCAG 2.1 AA**:

### Otimizações Implementadas

- **Virtualization**: MudDataGrid renderiza apenas linhas visíveis
- **Debouncing**: Search com delay de 300ms
- **Memoization**: Cache de resultados filtrados (30s)
- **Lazy Loading**: Componentes carregados sob demanda
- **Virtualization**: TanStack Table com virtualização para renderizar apenas linhas visíveis
- **Debouncing**: Search com delay de 300ms via TanStack Query
- **Memoization**: Cache de resultados filtrados (30s via TanStack Query)
- **Lazy Loading**: Next.js App Router com code splitting automático

### Métricas

Expand All @@ -180,16 +205,16 @@ O Admin Portal segue as diretrizes **WCAG 2.1 AA**:

## 🧪 Testes

### Cobertura de Testes bUnit
### E2E Tests com Playwright

- **43 testes** implementados
- Testes de páginas, dialogs e componentes
- Integração com Fluxor state
- Testes end-to-end para todos os fluxos principais
- Localização: `src/Web/e2e/admin/`

### Executar Testes

```bash
dotnet test tests/MeAjudaAi.Web.Admin.Tests/
cd src/Web
npx playwright test e2e/admin/
```
Comment thread
frigini marked this conversation as resolved.
Comment thread
frigini marked this conversation as resolved.

## 🚀 Executando Localmente
Expand Down
Loading
Loading