Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Esteban-Mendez-j/Proyecto-Docker/llms.txt

Use this file to discover all available pages before exploring further.

SearchJobs runs as two containerized services — a Spring Boot backend and a MySQL database — orchestrated with Docker Compose. This guide takes you from zero to a running instance and walks you through registering your first account.
1

Install prerequisites

You need Docker and Docker Compose installed on your machine. No other runtime is required to run the platform.Verify your installation:
docker --version
docker compose version
Node.js (for local frontend development) and Java 21 (for local backend development) are only needed if you intend to run services outside of Docker.
2

Clone the repository

git clone https://github.com/Esteban-Mendez-j/Proyecto-Docker.git
cd Proyecto-Docker
3

Configure environment variables

The backend service reads configuration from a .env file in the project root. Create it before starting the stack:
cp .env.example .env   # if an example file exists, otherwise create it manually
Populate .env with the values for your environment. All variables listed here are required:
# Database — must match the MySQL service in docker-compose.yml
SPRING_DATASOURCE_URL=jdbc:mysql://mysql:3306/mydb?createDatabaseIfNotExist=true&useSSL=false&allowPublicKeyRetrieval=true
SPRING_DATASOURCE_USERNAME=root
SPRING_JPA_HIBERNATE_DDL_AUTO=update

# JWT — use a long random string for MY_SECRET_KEY (min. 32 chars)
MY_SECRET_KEY=replace-with-a-strong-random-secret-key
JWT_EXPIRATION=86400000

# MongoDB — provide a connection URI (e.g. MongoDB Atlas or a local instance)
MONGODB_URI=mongodb://host.docker.internal:27017/searchjobs

# File upload directories (inside the container, mapped to ./Proyecto_backup/uploads)
UPLOAD_DIR_IMG=/app/uploads/img/
UPLOAD_DIR_PDF=/app/uploads/pdf/
UPLOAD_DIR_VIDEO=/app/uploads/video/

# URL the backend uses for CORS and WebSocket allowed origins
URL_FRONTEND=http://localhost:5173
Never commit your .env file to version control. It contains secrets such as MY_SECRET_KEY that must stay out of public repositories.
MongoDB is not included in the Docker Compose file. You must provide your own MongoDB instance, either a free MongoDB Atlas cluster or a locally running mongod. Update MONGODB_URI accordingly.
4

Build and start the stack

From the project root, run:
docker compose up --build -d
Docker will build the Spring Boot image from ./Proyecto_backup/Dockerfile and pull the official mysql:8.0 image. On the first run this can take a few minutes.Check that both services are healthy:
docker compose ps
docker compose logs -f backend
Wait until you see the Spring Boot startup banner and a line similar to Started ProyectoApplication in X seconds in the backend logs before proceeding.
To stop all containers without removing data volumes, run docker compose down. To also wipe the MySQL data volume, add the -v flag.
5

Start the React frontend

The React frontend is not included in the Docker Compose file and must be run separately during development:
cd client
npm install
npm run dev
Vite starts a dev server at http://localhost:5173 by default.
Make sure URL_FRONTEND=http://localhost:5173 in your .env so the backend’s CORS policy and WebSocket allowed origins include the Vite dev server.
6

Access the application

ServiceURL
React frontend (Vite dev)http://localhost:5173
Spring Boot APIhttp://localhost:8080
Swagger UI (API docs)http://localhost:8080/swagger-ui/index.html
MySQLlocalhost:3306 (database: mydb)
Open the frontend URL in your browser. The home page lists available job vacancies and does not require authentication.
7

Register your first account

Navigate to http://localhost:5173/registro. SearchJobs offers two account types:Candidate — browse and apply to job vacancies, build a professional profile, upload a PDF CV, and chat with companies.Company — post job vacancies (with optional video), review ranked applicants, manage the selection pipeline, and chat with candidates.Select your account type and complete the registration form. After registering, log in at /login using your email and password.
The login endpoint is POST /api/usuarios/login on the backend. Credentials are submitted as application/x-www-form-urlencoded. On success the backend returns a JWT stored as a session cookie for subsequent requests.

Useful commands

# View logs from all services
docker compose logs -f

# Open a shell inside the backend container
docker exec -it springboot-app bash

# Stop all containers
docker compose down

Architecture

Understand how the frontend, backend, and databases fit together

API reference

Explore authentication and all available REST endpoints

Build docs developers (and LLMs) love