You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Clone o repositório
git clone <repo-url>cd frontend
# Instale as dependências
npm ci
Executando
# Desenvolvimento (http://localhost:4200)
npm start
# O backend deve estar rodando em http://localhost:8080
Variáveis de ambiente
Variável
Dev
Produção
apiUrl
http://localhost:8080/api/v1
/api/v1
sseUrl
http://localhost:8080/api/v1/notifications
/api/v1/notifications
Configuradas em src/environments/environment.ts e environment.prod.ts.
Testes
# Rodar todos os testes
npm test# Modo watch
npm run test:watch
# Com relatório de cobertura
npm run test:coverage
Cobertura mínima (jest.config.js)
Métrica
Threshold
Statements
70%
Branches
70%
Functions
70%
Lines
70%
Build de Produção
npm run build:prod
Os artefatos são gerados em dist/rideflow-frontend/browser/.
Docker
# Build da imagem
docker build -t rideflow-frontend .# Executar standalone (porta 4200)
docker run -p 4200:80 rideflow-frontend
Stack completa via Docker Compose
# A partir da pasta backend/, sobe tudo (PG + Redis + Kafka + Backend + Frontend)cd ../backend
docker compose up -d --build
# Ver logs do frontend
docker logs -f rideflow-frontend
# Parar tudo
docker compose down
O Nginx serve a SPA e faz proxy reverso de /api/ para o backend.