Apps:
@jobs/api
: TRPC API for the frontend.@jobs/scraper
: TRPC microservice for scraping getonbrd.@jobs/web
: Main web app.@jobs/worker
: Scheduler for running scraping jobs.
Packages:
-
@jobs/api-util
: Common shared methods between microservices. -
@jobs/configs
: Shared frontend configs. -
@jobs/db
: Database connection, config, and schema. -
@jobs/helpers
: Shared frontend/backend utilities. -
@jobs/ui
: React shared UI components. -
@jobs/eslint-config-next
-
@jobs/eslint-config-node
-
@jobs/tsconfig
In your local environment, make sure the DEVCONTAINER_CPUS
is set to a number of cpu's below the number of total
that you have on your machine (e.g 8 cores -> 6 cores for the container).
Create a stack.env
file:
POSTGRES_USER=jobs
POSTGRES_PASSWORD=some_password
POSTGRES_DB=jobs
docker compose up -d
To build all apps and packages, run the following command:
npm run build
To start the development server for all apps run:
npm run dev
# or
turbo run dev
# or with filters
turbo run dev --filter=@jobs/worker --filter=@jobs/scraper
To install a dependency on a repo:
# Example
npm i fastify -w @jobs/api
# Options are --dir=up|down|latest
npm run db:generate -w @jobs/db
# Specify seed file using --seed=seed_filename
npm run db:seed -w @jobs/db -- --seed=init_job_sources
Set your git email and username:
git config --global user.email "[email protected]"
git config --global user.name "admin"
Install Commitizen for conventional commits.
pip install --user -U Commitizen
cz commit
cz bump
The devcontainer already comes with Commitizen and the Conventional Commits extension for VSCode.
If TypeScript starts acting up:
find . -name 'node_modules' -type d -prune -exec rm -rf '{}' +
If you are using the devcontainer and have to rebuild it, backup the ~/.zsh_history
cp ~/.zsh_history ./
Killing a node process:
./util/kill-node-port.sh 3000
or./util/kill-node.sh