Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .cspell/custom-dictionary-workspace.txt

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ CACHE_TTL_MS=600000
REDIS_KEY_PREFIX=vagas-full
KEYWORDS_REDIS_KEY=vagas-full:keywords
KEYWORDS_STORAGE_MODE=env
# Mantém GET /keywords ativo, mas bloqueia POST /keywords e publicação no kwsync.
KWSYNC_ENABLED=false

# Legacy flags kept for compatibility
HEADLESS=false
Expand Down
38 changes: 19 additions & 19 deletions LOCAL_DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,13 +234,13 @@ Como criar usuário para testes:

## 7.1 Subir stack completa (recomendado para onboarding)

1. Criar rede:
1; Criar rede:

```bash
docker network create vagas-net
```

2. Subir infra + app + migrate:
2; Subir infra + app + migrate:

```bash
docker compose -f docker-compose.infra.yml -f docker-compose.yml -f docker-compose.migrate.yml up --build -d
Expand Down Expand Up @@ -298,10 +298,10 @@ Use o comando da seção de Docker.

Portas esperadas:

- frontend: http://localhost:5173
- front_admin: http://localhost:5174
- backend: http://localhost:3001
- scraper-go: http://localhost:8081
- frontend: <http://localhost:5173>
- front_admin: <http://localhost:5174>
- backend: <http://localhost:3001>
- scraper-go: <http://localhost:8081>

## Caminho B: Node local (frontend + backend)

Expand Down Expand Up @@ -345,27 +345,27 @@ Observação importante para o Caminho B:

URLs principais:

- App principal: http://localhost:5173
- Login: http://localhost:5173/login
- Cadastro: http://localhost:5173/register
- App principal: <http://localhost:5173>
- Login: <http://localhost:5173/login>
- Cadastro: <http://localhost:5173/register>
- Dashboard app: /home, /dashboard, /vagas, /mentoria, /perfil, /ajuda
- Callback OAuth: /auth/callback

Backend:

- Health: http://localhost:3001/health
- Swagger: http://localhost:3001/docs
- Metrics: http://localhost:3001/metrics
- Health: <http://localhost:3001/health>
- Swagger: <http://localhost:3001/docs>
- Metrics: <http://localhost:3001/metrics>

Scraper:

- Health: http://localhost:8081/health
- Metrics: http://localhost:8081/metrics
- Admin jobs count: http://localhost:8081/admin/jobs/count
- Health: <http://localhost:8081/health>
- Metrics: <http://localhost:8081/metrics>
- Admin jobs count: <http://localhost:8081/admin/jobs/count>

Front admin:

- http://localhost:5174
- <http://localhost:5174>
- rota de login: /login
- rotas principais: /dashboard, /users, /scrapers, /observability, /audit, /permissions, /settings

Expand Down Expand Up @@ -430,7 +430,7 @@ Abaixo, os testes manuais sugeridos para os módulos principais.

Passos:

1. Acesse http://localhost:5173/login
1. Acesse <http://localhost:5173/login>
2. Tente enviar vazio
3. Informe credenciais inválidas
4. Informe credenciais válidas
Expand All @@ -445,7 +445,7 @@ Resultado esperado:

Passos:

1. Acesse http://localhost:5173/register
1. Acesse <http://localhost:5173/register>
2. Preencha campos obrigatórios
3. Teste telefone opcional vazio
4. Teste telefone válido
Expand Down Expand Up @@ -500,7 +500,7 @@ Resultado esperado:

Passos:

1. Acesse http://localhost:5174/login
1. Acesse <http://localhost:5174/login>
2. Faça login com conta com permissão
3. Navegue por dashboard/users/scrapers/observability/audit/permissions/settings

Expand Down
2 changes: 2 additions & 0 deletions backend/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ CORS_ALLOWED_ORIGINS=http://localhost:5173,http://localhost:5174
DATABASE_URL=postgresql://vagas:vagas@localhost:5432/vagas
VALKEY_URL=redis://localhost:6379/0
CACHE_TTL_MS=600000
# Mantém GET /keywords ativo, mas bloqueia POST /keywords e publicação no kwsync.
KWSYNC_ENABLED=false

# Scraping behavior
WAIT_BETWEEN_SEARCHES_MS=5000
Expand Down
2 changes: 2 additions & 0 deletions backend/drizzle/0012_woozy_mephistopheles.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- Baseline para sincronizar os snapshots do Drizzle com o schema atual.
-- Nenhuma alteração no banco é necessária nesta migration.
14 changes: 14 additions & 0 deletions backend/drizzle/0013_chunky_wonder_man.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
CREATE TABLE "application_events" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"user_id" uuid NOT NULL,
"saved_job_id" uuid NOT NULL,
"type" varchar(50) NOT NULL,
"from_status" varchar(50) NOT NULL,
"to_status" varchar(50) NOT NULL,
"metadata" jsonb,
"created_at" timestamp DEFAULT now() NOT NULL
);
--> statement-breakpoint
ALTER TABLE "application_events" ADD CONSTRAINT "application_events_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "application_events" ADD CONSTRAINT "application_events_saved_job_id_saved_jobs_id_fk" FOREIGN KEY ("saved_job_id") REFERENCES "public"."saved_jobs"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
CREATE INDEX "application_events_saved_job_id_created_at_idx" ON "application_events" USING btree ("saved_job_id","created_at");
Loading
Loading