Commit graph

6 commits

Author SHA1 Message Date
Elshimy Ziad Magdy Taha
2ab810be72 Move shared Go packages from libs/ to internal/
All checks were successful
Deploy scraper-google / build (push) Successful in 21m58s
Deploy scraper-google / deploy (push) Has been skipped
internal/ and libs/ were both shared-code roots with no rule for which
one a package belonged in, so the split carried no information. Adopt a
rule the language answers by itself:

  shared Go          -> internal/
  shared TypeScript  -> libs/   (npm workspace packages)

libs/{ports,repo,server} move to internal/, leaving libs/ holding only
the two TypeScript packages (@jobs-scraper/rabbitmq-ts and
@jobs-scraper/browser-automation), which matches npm workspace
convention. internal/ is also Go's marker for code not importable from
outside the repo, which is accurate here since none of it is published.

Import paths are rewritten mechanically (jobs-scraper/libs/ ->
jobs-scraper/internal/) across 15 lines in 10 files. The 6 moved files
are pure renames with no content change. Doing this after the module
collapse in the previous commit meant no go.mod or replace-directive
edits were needed.

gofmt is applied to services/api/pkg/http/job.go, whose import group the
rewrite left out of order. Three files were already unformatted before
this refactor (internal/openai/interface.go, internal/ports/job-queries.go,
internal/repo/job-analysis-result.go) and are deliberately left alone to
keep this diff limited to the move.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-04 17:30:04 +05:00
Elshimy Ziad Magdy Taha
fcbe2f04f9 Collapse shared Go packages into the root module
internal/ and libs/ were split into 9 single-package Go modules, held
together by 22 replace directives across 7 go.mod files. The module
boundaries bought nothing: internal/dto, internal/browser and
internal/migrations were already plain packages in the root module and
worked fine.

Delete the 9 go.mod/go.sum pairs so those packages belong to the root
github.com/jobs-scraper module. Import paths are unchanged --
github.com/jobs-scraper/internal/domain resolves identically whether it
is its own module or a package inside the root module -- so no .go file
is touched by this commit.

Each deployable module now needs one require + one replace on the root
module instead of four to six:

  go.work entries:      14 -> 5
  replace directives:   22 -> 4
  go.mod files:         14 -> 5

Dependency versions are deliberately held at their previous pins. A bare
go mod tidy resolved several to latest once the per-package constraints
were gone (lib/pq 1.10.9 -> 1.12.3, amqp091-go 1.10.0 -> 1.13.0,
migrate 4.19.0 -> 4.19.1, go-openai 1.41.2 -> 1.42.0, genai
1.39.0 -> 1.66.0); all five are pinned back, since a structural refactor
should not move dependency versions.

Side effect worth noting: `go build ./...` at the repo root previously
matched only 2 packages, because everything else sat behind a module
boundary. It now covers all 12 shared packages, so the build and vet
steps in .forgejo/workflows/ actually exercise the shared code.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-04 17:27:10 +05:00
Elshimy Ziad Magdy Taha
af52085ea3 fix errors and restructure project 2026-01-26 17:33:48 +05:00
Elshimy Ziad Magdy Taha
a195d3b8fe google scraper 2025-12-15 10:26:52 +05:00
Elshimy Ziad Magdy Taha
5060643a3f infrastructure fixes 2025-11-03 00:29:33 +05:00
Elshimy Ziad Magdy Taha
8ac872bdc6 feat: restructure project into monorepo with CI/CD
- Reorganized project structure into services/ and apps/ directories for better separation of concerns
- Added comprehensive CI/CD pipeline with GitHub Actions for testing and Docker builds
- Created .dockerignore file to optimize container builds
- Updated Makefile with new targets for each service and application
- Added detailed README with architecture overview, setup instructions and development guidelines
- Moved cron-analyzer to dedicate
2025-11-01 16:20:44 +05:00