feat: implement unified researcher search and enhance dashboard functionality

- Updated the API service to include a new `searchResearcher` function for streamlined researcher data retrieval.
- Modified `LandingPage` to utilize the new search functionality, reducing the number of API calls.
- Refactored `DashboardPage` to handle the new data structure returned from the search, improving loading efficiency and user experience.
- Enhanced `vite.config.js` and `.env.example` for better API integration and development setup.
- Added health checks in `docker-compose.yml` for database and Redis services to ensure service reliability.
This commit is contained in:
Alexis
2026-04-29 10:16:26 +02:00
parent 334b92bda3
commit f8241f7607
8 changed files with 409 additions and 149 deletions
+13 -9
View File
@@ -1,17 +1,21 @@
# URL base del backend FastAPI (sin barra final).
#
# Déjalo VACÍO en desarrollo para que las peticiones pasen por el proxy
# de Vite (ver vite.config.js). El proxy reenvía /researchers y /health
# al destino indicado en VITE_API_PROXY_TARGET.
#
# En producción apunta directamente al backend, p. ej.
# VITE_API_URL=https://api.midominio.com
VITE_API_URL=
# En desarrollo puedes dejarlo en blanco y el proxy de Vite
# (ver vite.config.js) reenviará todo lo que cuelgue de /api al
# destino indicado en VITE_API_PROXY_TARGET. Esto evita problemas
# de CORS sin exponer el host del backend al navegador.
VITE_API_URL=http://localhost:8000/api
# Solo para dev: destino al que el proxy de Vite reenvía las peticiones.
# Cambia a http://backend:8000 si ejecutas el frontend dentro de docker-compose.
# Solo para dev: destino al que el proxy de Vite reenvía las peticiones
# que empiecen por /api. Cambia a http://backend:8000 si ejecutas el
# frontend dentro de docker-compose.
VITE_API_PROXY_TARGET=http://localhost:8000
# Clave compartida con el backend. Se inyecta como header `X-API-Key`
# en TODAS las peticiones salientes (ver src/services/api.js). Debe
# coincidir con `API_KEY_VALUE` del .env del backend.
VITE_API_KEY=12ao.9-8a7b-4c&d-9e,f-?89abc
# Pon "true" SOLO si el backend no está disponible y quieres trabajar
# con los fixtures de src/services/mocks.js. En producción debe estar a "false".
VITE_USE_MOCKS=false