Commit Graph

14 Commits

Author SHA1 Message Date
google-labs-jules[bot]
8d5b29ff42 feat: Implement custom request logging for API
Replaced external 'morgan' library with a native custom logging middleware in api/server.js.

The new middleware logs:
- Incoming requests: Timestamp, HTTP method, URL, and client IP.
- Outgoing responses: Timestamp, status code, status message, original method, URL, and request duration.

This enhances debugging capabilities by providing clear insights into API traffic and performance directly from the server logs.
2025-06-05 22:08:57 +00:00
32f2686f14 se supone que volvio
Some checks failed
build-and-deploy / filter (push) Successful in 2s
Sync to GitHub / sync (push) Failing after 1s
build-and-deploy / build (push) Successful in 54s
build-and-deploy / deploy (push) Successful in 15s
2025-05-30 23:51:22 -06:00
google-labs-jules[bot]
242dc66983 Refactor: Centralize Prisma schema and restrict DB access
This commit refactors the project to use a shared Prisma schema and restricts direct database access to the API service.

Key changes:

- Created a new shared package `core/prisma` containing the Prisma schema, generated client, and types.
- Configured the monorepo to use NPM workspaces, including `core/prisma` and all services.
- Updated all services (`api`, `ui`, `mcp`, `agent`, and the background processing service) to depend on `@empresa/prisma-schema`.
- The API service now imports `PrismaClient` from `@empresa/prisma-schema/client`.
- Other services import only types from `@empresa/prisma-schema`.
- Removed redundant Prisma configurations from `api` and the background processing service.
- Updated the background processing service's `sync-empleados.js` to fetch data via an API call instead of direct database access.
- Updated TypeScript configurations (`tsconfig.base.json` and service-specific ones) to support the new structure and path aliases.
- Updated `README.md` to reflect the new architecture and added convenience scripts for Prisma operations.

This change promotes a single source of truth for data models, reduces code duplication, and improves the overall architecture by centralizing database operations within the API service.
2025-05-30 23:40:00 +00:00
3d1bf3286a modificado uso de CORS en la api, ahora acepta localhost y planilla.interno.com
Some checks failed
build-and-deploy / filter (push) Successful in 2s
Sync to GitHub / sync (push) Failing after 2s
build-and-deploy / build (push) Successful in 13s
build-and-deploy / deploy (push) Successful in 14s
2025-05-30 10:17:41 -06:00
google-labs-jules[bot]
a394c25245 feat: Implement CRUD API endpoints for core modules
Adds Express.js routes and Prisma-based handlers for common database operations (Create, Read, Update, Delete) for the following modules:

- Empleados (subset of Cliente model)
- Asistencias
- Tareas (TareaRealizada model)
- Planillas

Each module's routes are separated into their own files within `api/routes/`. The new routes are registered in `api/server.js`.

Basic error handling, including try-catch blocks and checks for common Prisma errors (e.g., P2025 for record not found, P2003 for foreign key violations), has been implemented in each endpoint.
2025-05-30 06:45:54 +00:00
421ff236ae avances poderosos en ui
Some checks failed
build-and-deploy / filter (push) Successful in 4s
build-and-deploy / build (push) Failing after 19s
build-and-deploy / deploy (push) Has been skipped
2025-05-25 08:21:57 -06:00
55645d0cdd trucasos para hacer tests
All checks were successful
build-and-deploy / filter (push) Successful in 2s
build-and-deploy / build (push) Successful in 8s
build-and-deploy / deploy (push) Successful in 13s
2025-05-14 20:11:44 -06:00
8783dea337 solucionado worker, ahora arreglando api
All checks were successful
build-and-push / build (push) Successful in 12s
build-and-push / deploy (push) Successful in 14s
2025-05-14 19:14:01 -06:00
3595d4c76b seguimos fixeando a esos
Some checks failed
build-and-push / build (push) Failing after 18s
build-and-push / deploy (push) Has been skipped
2025-05-14 18:51:18 -06:00
21dbb4f960 fix cronworker y conexion prisma api
All checks were successful
build-and-push / build (push) Successful in 13s
build-and-push / deploy (push) Successful in 14s
2025-05-14 18:43:30 -06:00
094eaab0b4 agregado endpoint api para crear cliente random
All checks were successful
build-and-push / build (push) Successful in 12s
build-and-push / deploy (push) Successful in 14s
2025-05-14 18:40:08 -06:00
69dee1e603 otro deplkoy
All checks were successful
build-and-push / build (push) Successful in 12s
build-and-push / deploy (push) Successful in 14s
2025-05-14 16:44:02 -06:00
04a19dab46 preparando worker y api test endpoint
All checks were successful
build-and-push / build (push) Successful in 12s
build-and-push / deploy (push) Successful in 14s
2025-05-14 16:32:59 -06:00
e1dc751397 Modulo planilla v1
Some checks failed
build-and-push / build (push) Successful in 33s
build-and-push / deploy (push) Failing after 1s
2025-05-02 17:59:47 -06:00