Este é o backend da aplicação LabSync Scheduler, desenvolvido com Java, Spring Boot WebFlux e Spring Data R2DBC. O objetivo é fornecer uma API reativa, escalável e segura para gerenciar o agendamento de laboratórios, usuários e horários.
O projeto segue o padrão de arquitetura modular do Spring, com foco na programação reativa. As responsabilidades são divididas em:
Controller
: Recebe requisições HTTP de forma não-bloqueante e as encaminha para a camada de serviço.Service
: Contém a lógica de negócio principal da aplicação, orquestrando as operações.Repository
: Interage com o banco de dados de forma reativa, abstraindo a lógica de acesso aos dados usandoMono
eFlux
.Entity
/DTO
: Define a estrutura dos dados persistidos no banco (Entity) e a estrutura dos dados transferidos via API (DTO), garantindo a consistência e a segurança.
- Framework: Spring Boot 3.5.4 (com WebFlux)
- Linguagem: Java 17
- Acesso a Dados: Spring Data R2DBC
- Banco de Dados: PostgreSQL
- Gerenciamento de Dependências: Maven
- Autenticação: Spring Security (com suporte a JWT e OAuth2)
- Migrações de Banco: Flyway
- Monitoramento: Spring Boot Actuator
- Desenvolvimento: Lombok e Spring DevTools
Para rodar o projeto localmente, siga estes passos:
- Pré-requisitos: Certifique-se de ter o Java 17 e o Maven instalados. O uso do Docker é altamente recomendado para o banco de dados.
- Instalação das Dependências: Na pasta
backend-labschedulerg-reactive
, as dependências serão instaladas automaticamente pelo Maven na primeira execução. - Configuração do Banco de Dados:
- Suba o container do PostgreSQL usando Docker:
docker-compose up -d
. - Configure as credenciais do banco de dados (ex: usuário, senha, URL) diretamente no seu ambiente de execução do IntelliJ.
- As migrações do banco de dados serão aplicadas automaticamente pelo Flyway na inicialização do projeto.
- Suba o container do PostgreSQL usando Docker:
- Execução do Servidor: Para iniciar o servidor em modo de desenvolvimento, use o comando
./mvnw spring-boot:run
. O servidor rodará emhttp://localhost:8080
(porta padrão).
This is the backend for the LabSync Scheduler application, developed with Java, Spring Boot WebFlux, and Spring Data R2DBC. The goal is to provide a reactive, scalable, and secure API for managing lab schedules, users, and time slots.
The project follows the Spring modular architecture pattern, with a focus on reactive programming. Responsibilities are divided into:
Controller
: Receives non-blocking HTTP requests and forwards them to the service layer.Service
: Contains the core business logic of the application, orchestrating operations.Repository
: Interacts with the database reactively, abstracting data access logic usingMono
andFlux
.Entity
/DTO
: Defines the structure of persisted data in the database (Entity) and the structure of data transferred via the API (DTO), ensuring consistency and security.
- Framework: Spring Boot 3.5.4 (with WebFlux)
- Language: Java 17
- Data Access: Spring Data R2DBC
- Database: PostgreSQL
- Dependency Management: Maven
- Authentication: Spring Security (with JWT and OAuth2 support)
- Database Migrations: Flyway
- Monitoring: Spring Boot Actuator
- Development: Lombok and Spring DevTools
To run the project locally, follow these steps:
- Prerequisites: Ensure you have Java 17 and Maven installed. Using Docker is highly recommended for the database.
- Install Dependencies: In the
backend-labschedulerg-reactive
folder, dependencies will be automatically installed by Maven upon the first run. - Database Configuration:
- Start the PostgreSQL container using Docker:
docker-compose up -d
. - Configure database credentials (e.g., username, password, URL) directly in your IntelliJ run environment.
- Database migrations will be automatically applied by Flyway when the project starts.
- Start the PostgreSQL container using Docker:
- Server Execution: To start the server in development mode, use the command
./mvnw spring-boot:run
. The server will run athttp://localhost:8080
(default port).