add env
This commit is contained in:
parent
8ac872bdc6
commit
06f5f9cf02
9 changed files with 503 additions and 5 deletions
2
.env
2
.env
|
|
@ -9,4 +9,4 @@ SERVER_PORT=8080
|
|||
SERVER_HOST=localhost
|
||||
|
||||
CV_AI_MODEL=your_ai_model
|
||||
OPENROUTER_API_KEY=your_openrouter_api_key
|
||||
OPENROUTER_API_KEY=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
|
||||
2
Makefile
2
Makefile
|
|
@ -7,7 +7,7 @@ SCRAPER_LINKEDIN_DIR=./services/scraper-linkedin
|
|||
SCRAPER_GLASSDOOR_DIR=./services/scraper-glassdoor
|
||||
CRON_ANALYZER_DIR=./apps/cron-analyzer
|
||||
CV_ANALYZER_DIR=./apps/cv-analyzer
|
||||
DOCS_DIR=./internal/swagger
|
||||
DOCS_DIR=./services/api/pkg/swagger
|
||||
BIN_DIR=./bin
|
||||
API_MAIN_FILE=$(API_DIR)/cmd/server/main.go
|
||||
SCRAPER_LINKEDIN_MAIN_FILE=$(SCRAPER_LINKEDIN_DIR)/main.go
|
||||
|
|
|
|||
1
go.work
1
go.work
|
|
@ -8,7 +8,6 @@ use (
|
|||
./internal/pkg/infrastructure
|
||||
./internal/pkg/openrouter
|
||||
./internal/pkg/utils
|
||||
./internal/swagger
|
||||
./libs/ports
|
||||
./libs/repo
|
||||
./libs/server
|
||||
|
|
|
|||
12
services/api/.env
Normal file
12
services/api/.env
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
DB_HOST=localhost
|
||||
DB_PORT=5432
|
||||
DB_USER=your_db_user
|
||||
DB_PASSWORD=your_db_password
|
||||
DB_NAME=linkedin_jobs
|
||||
DB_SSLMODE=disable
|
||||
|
||||
SERVER_PORT=8080
|
||||
SERVER_HOST=localhost
|
||||
|
||||
CV_AI_MODEL=your_ai_model
|
||||
OPENROUTER_API_KEY=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
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
// Package docs Code generated by swaggo/swag. DO NOT EDIT
|
||||
package docs
|
||||
// Package swagger Code generated by swaggo/swag. DO NOT EDIT
|
||||
package swagger
|
||||
|
||||
import "github.com/swaggo/swag"
|
||||
|
||||
|
|
@ -69,9 +69,183 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/jobs/analysis": {
|
||||
"get": {
|
||||
"description": "Retrieves all job analysis results from the database",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"jobs"
|
||||
],
|
||||
"summary": "Get all job analysis results",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "List of job analysis results",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/domain.JobAnalysisResult"
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal server error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/jobs/analysis/top-matches": {
|
||||
"get": {
|
||||
"description": "Retrieves jobs with high analysis match scores",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"jobs"
|
||||
],
|
||||
"summary": "Get top matching jobs",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Minimum match score (default: 70)",
|
||||
"name": "min_score",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "List of top matching job analysis results",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/domain.JobAnalysisResult"
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid minimum score",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal server error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/jobs/{id}/analysis": {
|
||||
"get": {
|
||||
"description": "Retrieves the analysis result for a specific job",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"jobs"
|
||||
],
|
||||
"summary": "Get job analysis result by job ID",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Job ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Job analysis result",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.JobAnalysisResult"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid job ID",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Analysis result not found",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal server error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"domain.JobAnalysisResult": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"analysisResult": {
|
||||
"type": "string"
|
||||
},
|
||||
"analyzedAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"jobID": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"keySkills": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"matchScore": {
|
||||
"type": "integer"
|
||||
},
|
||||
"missingSkills": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"recommendations": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"domain.JobProvider": {
|
||||
"type": "integer",
|
||||
"enum": [
|
||||
|
|
|
|||
|
|
@ -62,9 +62,183 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/jobs/analysis": {
|
||||
"get": {
|
||||
"description": "Retrieves all job analysis results from the database",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"jobs"
|
||||
],
|
||||
"summary": "Get all job analysis results",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "List of job analysis results",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/domain.JobAnalysisResult"
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal server error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/jobs/analysis/top-matches": {
|
||||
"get": {
|
||||
"description": "Retrieves jobs with high analysis match scores",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"jobs"
|
||||
],
|
||||
"summary": "Get top matching jobs",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Minimum match score (default: 70)",
|
||||
"name": "min_score",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "List of top matching job analysis results",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/domain.JobAnalysisResult"
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid minimum score",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal server error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/jobs/{id}/analysis": {
|
||||
"get": {
|
||||
"description": "Retrieves the analysis result for a specific job",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"jobs"
|
||||
],
|
||||
"summary": "Get job analysis result by job ID",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Job ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Job analysis result",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.JobAnalysisResult"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid job ID",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Analysis result not found",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal server error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"domain.JobAnalysisResult": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"analysisResult": {
|
||||
"type": "string"
|
||||
},
|
||||
"analyzedAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"jobID": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"keySkills": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"matchScore": {
|
||||
"type": "integer"
|
||||
},
|
||||
"missingSkills": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"recommendations": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"domain.JobProvider": {
|
||||
"type": "integer",
|
||||
"enum": [
|
||||
|
|
|
|||
|
|
@ -1,5 +1,30 @@
|
|||
basePath: /
|
||||
definitions:
|
||||
domain.JobAnalysisResult:
|
||||
properties:
|
||||
analysisResult:
|
||||
type: string
|
||||
analyzedAt:
|
||||
type: string
|
||||
id:
|
||||
format: int64
|
||||
type: integer
|
||||
jobID:
|
||||
format: int64
|
||||
type: integer
|
||||
keySkills:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
matchScore:
|
||||
type: integer
|
||||
missingSkills:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
recommendations:
|
||||
type: string
|
||||
type: object
|
||||
domain.JobProvider:
|
||||
enum:
|
||||
- 0
|
||||
|
|
@ -71,4 +96,94 @@ paths:
|
|||
summary: Create a new job
|
||||
tags:
|
||||
- jobs
|
||||
/jobs/{id}/analysis:
|
||||
get:
|
||||
description: Retrieves the analysis result for a specific job
|
||||
parameters:
|
||||
- description: Job ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: Job analysis result
|
||||
schema:
|
||||
$ref: '#/definitions/domain.JobAnalysisResult'
|
||||
"400":
|
||||
description: Invalid job ID
|
||||
schema:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
"404":
|
||||
description: Analysis result not found
|
||||
schema:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
"500":
|
||||
description: Internal server error
|
||||
schema:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
summary: Get job analysis result by job ID
|
||||
tags:
|
||||
- jobs
|
||||
/jobs/analysis:
|
||||
get:
|
||||
description: Retrieves all job analysis results from the database
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: List of job analysis results
|
||||
schema:
|
||||
items:
|
||||
$ref: '#/definitions/domain.JobAnalysisResult'
|
||||
type: array
|
||||
"500":
|
||||
description: Internal server error
|
||||
schema:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
summary: Get all job analysis results
|
||||
tags:
|
||||
- jobs
|
||||
/jobs/analysis/top-matches:
|
||||
get:
|
||||
description: Retrieves jobs with high analysis match scores
|
||||
parameters:
|
||||
- description: 'Minimum match score (default: 70)'
|
||||
in: query
|
||||
name: min_score
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: List of top matching job analysis results
|
||||
schema:
|
||||
items:
|
||||
$ref: '#/definitions/domain.JobAnalysisResult'
|
||||
type: array
|
||||
"400":
|
||||
description: Invalid minimum score
|
||||
schema:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
"500":
|
||||
description: Internal server error
|
||||
schema:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
summary: Get top matching jobs
|
||||
tags:
|
||||
- jobs
|
||||
swagger: "2.0"
|
||||
|
|
|
|||
12
services/scraper-glassdoor/.env
Normal file
12
services/scraper-glassdoor/.env
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
DB_HOST=localhost
|
||||
DB_PORT=5432
|
||||
DB_USER=your_db_user
|
||||
DB_PASSWORD=your_db_password
|
||||
DB_NAME=linkedin_jobs
|
||||
DB_SSLMODE=disable
|
||||
|
||||
SERVER_PORT=8080
|
||||
SERVER_HOST=localhost
|
||||
|
||||
CV_AI_MODEL=your_ai_model
|
||||
OPENROUTER_API_KEY=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
|
||||
12
services/scraper-linkedin/.env
Normal file
12
services/scraper-linkedin/.env
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
DB_HOST=localhost
|
||||
DB_PORT=5432
|
||||
DB_USER=your_db_user
|
||||
DB_PASSWORD=your_db_password
|
||||
DB_NAME=linkedin_jobs
|
||||
DB_SSLMODE=disable
|
||||
|
||||
SERVER_PORT=8080
|
||||
SERVER_HOST=localhost
|
||||
|
||||
CV_AI_MODEL=your_ai_model
|
||||
OPENROUTER_API_KEY=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
|
||||
Loading…
Reference in a new issue