Skip to content

Develop#12

Merged
Benevanio merged 4 commits into
masterfrom
develop
Mar 22, 2026
Merged

Develop#12
Benevanio merged 4 commits into
masterfrom
develop

Conversation

@Benevanio

Copy link
Copy Markdown
Collaborator

No description provided.

… workspaces

- Updated package.json to define a monorepo structure with workspaces for frontend and backend.
- Removed obsolete files related to job scraping and exporting functionalities.
- Deleted configuration, logger, and server files as part of the refactor.
- Removed tests associated with the deleted functionalities.
- Introduced new scripts for concurrent development of frontend and backend.
…components

- Created unit tests for backend services, including app, browser, exporter, and linkedinScraper.
- Added tests for utility functions and configuration handling.
- Implemented integration tests for frontend hooks and components, ensuring proper functionality and state management.
- Established Vitest configuration for both backend and frontend, including coverage thresholds.
- Introduced mock implementations for external dependencies to isolate tests.
Copilot AI review requested due to automatic review settings March 22, 2026 17:43
@Benevanio
Benevanio merged commit 0861769 into master Mar 22, 2026
4 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR restructures the repository into an npm workspaces monorepo (frontend + backend), adds Vitest-based test suites with coverage enforcement, and updates Docker/CI to match the new layout.

Changes:

  • Convert root project into a workspaces-based monorepo and adjust root scripts accordingly.
  • Add Vitest configs and a broad set of frontend/backend unit + integration tests with 80% coverage thresholds.
  • Update Docker Compose, Dockerfiles, and CI workflow to build/run the new frontend and backend services.

Reviewed changes

Copilot reviewed 35 out of 50 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
vitest.config.js Remove root Vitest config.
package.json Define workspaces + root orchestration scripts.
frontend/vitest.config.js Add frontend Vitest + coverage configuration.
frontend/tsconfig.json Add Vitest/testing-library types and include tests.
frontend/tests/unit/utils/useJobsPagination.test.ts Add pagination hook unit tests.
frontend/tests/unit/utils/useJobsFiltering.test.ts Add filtering hook unit tests.
frontend/tests/unit/utils/jobsService.test.ts Add jobs service fetch/validation tests.
frontend/tests/unit/utils/cn.test.ts Add cn utility test.
frontend/tests/unit/pages/main.test.tsx Add main entrypoint behavior tests.
frontend/tests/unit/pages/App.test.tsx Add App rendering test with mocked hooks.
frontend/tests/unit/hooks/useTheme.test.ts Add theme hook behavior tests.
frontend/tests/unit/components/ThemeToggle.test.tsx Add ThemeToggle click behavior test.
frontend/tests/unit/components/JobsTableCard.test.tsx Add table card rendering/pagination tests.
frontend/tests/unit/components/JobsHeaderCard.test.tsx Add header card metadata/fallback tests.
frontend/tests/unit/components/JobsFiltersCard.test.tsx Add filters interactions/loading tests.
frontend/tests/setup.js Add jest-dom Vitest setup import.
frontend/tests/integration/useJobsData.test.tsx Add integration test for useJobsData.
frontend/package.json Add frontend test scripts + testing deps.
frontend/Dockerfile Adjust Docker build to frontend workspace context.
docker-compose.yml Split services into backend and frontend.
backend/vitest.config.js Add backend Vitest + coverage configuration.
backend/tests/unit/utils/logger.test.js Add logger unit tests.
backend/tests/unit/utils/config.test.js Fix config test import + expand parsing tests.
backend/tests/unit/services/server.test.js Add backend server entrypoint tests.
backend/tests/unit/services/linkedinScraper.test.js Add scraper parsing/dedupe + error tests.
backend/tests/unit/services/index.test.js Add backend index entrypoint error handling tests.
backend/tests/unit/services/exporter.test.js Add XLSX/PDF exporter tests.
backend/tests/unit/services/browser.test.js Add browser executable + launch tests.
backend/tests/unit/services/app.test.js Add run() orchestration unit test.
backend/tests/unit/models/.gitkeep Keep empty test dir in VCS.
backend/tests/unit/controllers/.gitkeep Keep empty test dir in VCS.
backend/tests/integration/jobsApi.test.js Fix integration test import paths/formatting.
backend/src/server.js Add backend API server entrypoint.
backend/src/logger.js Add simple timestamped logger helpers.
backend/src/linkedinScraper.js Add HTTP-based LinkedIn scraper implementation.
backend/src/jobsApiApp.js Ensure output dir exists when listing XLSX files.
backend/src/exporter.js Add Excel/PDF export implementation.
backend/src/config.js Add env parsing + defaults for scraper/runtime.
backend/src/browser.js Add browser executable resolution + launch helper.
backend/src/app.js Add scraper/export orchestration (run).
backend/package.json Add backend workspace scripts and deps.
backend/package-lock.json Add backend lockfile for workspace installs.
backend/index.js Add backend scraper entrypoint with error handling.
backend/Dockerfile Add backend Docker image definition.
backend/.env.example Document backend environment variables.
TESTING.md Add testing/coverage guide for monorepo.
README.md Update documentation for monorepo + scripts + Docker.
.gitignore Expand ignores for envs/builds/coverage outputs.
.github/workflows/ci.yml Run workspace coverage + frontend lint/build in CI.
Comments suppressed due to low confidence (1)

backend/src/jobsApiApp.js:22

  • listXlsxFiles() chama mkdirSync(outputDir, { recursive: true }) em toda requisição. Se outputDir estiver inválido ou sem permissão, isso lança exceção; em /api/jobs/files não há try/catch, então o endpoint pode falhar com 500 e logar stack trace. Sugestão: criar/validar o diretório uma única vez na inicialização do app (ou envolver mkdirSync em try/catch e responder com erro controlado), e remover o existsSync (fica redundante após mkdirSync).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread frontend/tests/unit/utils/useJobsPagination.test.ts
Comment thread backend/package-lock.json
Comment thread frontend/package.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants