Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AnalyticsCodeCup · MS4

Microservicio de analytics y reportes públicos del torneo Code Cup.

  • Puerto: 8084
  • Prefix: /api/analytics/**
  • Stack: Spring Boot 3.3.5 · Java 21 · PostgreSQL (Supabase #3)

Ver plan_ms4.md para el plan completo de la primera entrega.

Endpoints públicos

GET /api/analytics/torneos/{torneoId}/posiciones
GET /api/analytics/torneos/{torneoId}/goleadores?limit=10
GET /api/analytics/torneos/{torneoId}/porteros?limit=10

Webhook (interno, requiere X-Webhook-Secret)

POST /api/analytics/webhooks/partido-cerrado
body: { "torneoId": "uuid", "partidoId": "uuid" }

Variables de entorno

Variable Default Uso
SERVER_PORT 8084
DB_URL localhost:5432/analytics Supabase #3 PG URL
DB_USERNAME postgres
DB_PASSWORD_MS4 (required)
MS2_BASE_URL http://localhost:8082 URL del MS2 para pedir datos
ANALYTICS_WEBHOOK_SECRET dev-webhook-secret-... Auth del webhook
INTERNAL_API_SECRET dev-internal-secret-... Header X-Internal-Secret al pegar MS2
FRONTEND_URL http://localhost:5173 CORS allow-origin

Schema inicial

Ejecutar db/supabase_schema_ms4.sql en la nueva BD Supabase.

Arrancar local

./mvnw spring-boot:run

Smoke test:

curl http://localhost:8084/actuator/health
curl http://localhost:8084/api/analytics/torneos/<uuid>/posiciones

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages