How klap-s/noevo-backend-api works
Project Type and Purpose
• This is a standalone backend service (“Backend – NOEVO”) built with Spring Boot and Java 17.
• Its role is to expose REST endpoints that handle user, conversation, message, and AI-related operations, persist data in a MySQL database via JPA, and relay requests to external voice-to-text and text-to-voice APIs.
File Structure Analysis
• src/main/java/noevo/controller – REST Controllers
• src/main/java/noevo/service/interfaces & implement – Business-logic interfaces and implementations
• src/main/java/noevo/repository – Spring Data JPA repositories for persistence
• src/main/java/noevo/model – JPA Entity classes
• src/main/resources/application.properties – DB and server configuration
• Test folder under src/test for unit/integration tests
This clearly follows a layered architecture:
• API layer (Controllers)
• Service layer (Interfaces + Implementations)
• Data access layer (Repositories)
• Persistence (MySQL)
• External integration (voice/text APIs)
Key README Insights
• Describes Spring Boot + Java stack
• MySQL as the database
• Connects to two external services: voice→text and text→voice
• Runs on port 8080
Main Components
a. Client(s)
• Mobile or Web front end (not in this repo)
• Test clients (Postman, automated tests)
b. API Layer
• ConversacionController, MensajeController, UsuarioController, IAController
c. Service Layer
• IAServiceImpl, UsuarioServiceImpl, MensajeServiceImpl, ConversacionServiceImpl
d. Persistence Layer
• JPA Repositories (IARepository, UsuarioRepository, MensajeRepository, ConversacionRepository)
• MySQL Database (logical schema of User, Message, Conversation, IA tables)
e. External Services
• Voice-to-Text API (e.g., Google Speech-to-Text)
• Text-to-Voice API (e.g., AWS Polly)
Relationships and Data Flows
• Client → HTTP requests → Controllers
• Controllers → invoke Service interfaces → Service implementations
• Service implementations → read/write via Repositories → MySQL
• Service implementations → call external voice APIs → get/return audio/text data
• Controllers → return JSON (or audio binary) → Client
Architectural Patterns & Principles
• Layered architecture (controller → service → repository → DB)
• Dependency inversion via service interfaces
• Single responsibility: each layer has a distinct concern
• Spring-managed beans and annotations for wiring
Elements
• Clear labels for each component (e.g., ConversacionController)
• Rectangles for code modules (controllers, services, repos)
Tooling and Detail Recommendations
• Ports (8080) and protocols (HTTP, JDBC, REST)
• Data model as an ER overlay or separate inset
• Version notes (Java 17, Spring Boot) in a corner