Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Yurben-bit/Sistema-de-Administraci-n-Escolar-Backend/llms.txt

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

Overview

EduTec Backend is built on Spring Boot 2.6.6 with Java 8, following a layered MVC (Model-View-Controller) architecture pattern. The application is designed for educational administration with RESTful API endpoints.

System Architecture

The application currently follows a simplified layered architecture. The system is in early development with basic authentication functionality:
┌─────────────────────────────────────┐
│      Client Application             │
│      (Frontend/Mobile)              │
└─────────────┬───────────────────────┘
              │ HTTP/REST

┌─────────────────────────────────────┐
│      Controller Layer               │
│   (AuthController)                  │
│   • Request handling                │
│   • Response formatting             │
│   • Delegates to services           │
└─────────────┬───────────────────────┘


┌─────────────────────────────────────┐
│      Service Layer                  │
│   (JwtService)                      │
│   • Token generation                │
│   • JWT signing & expiration        │
└─────────────────────────────────────┘

Note: Database integration and repository layer 
are configured via dependencies but not yet 
implemented in the current codebase.

Planned Architecture:
┌─────────────────────────────────────┐
│   Repository Layer (Future)         │
│   • User authentication             │
│   • Data persistence                │
└─────────────┬───────────────────────┘


┌─────────────────────────────────────┐
│      Database                       │
│   (MySQL/MariaDB/Oracle/MSSQL/H2)  │
└─────────────────────────────────────┘

Package Organization

The codebase is organized into distinct packages following Spring Boot best practices:
Location: com.tecmilenio.edutec.controllerContains REST controllers that handle HTTP requests and responses.Responsibilities:
  • Define API endpoints
  • Validate incoming requests
  • Return appropriate HTTP responses
  • Delegate business logic to services
Example: AuthController.java handles authentication endpoints

Technology Stack

The project leverages a comprehensive set of Spring Boot and Java ecosystem libraries:

Core Framework

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.6.6</version>
</parent>
Java Version: 1.8

Key Dependencies

Spring Data JPA - Object-Relational Mapping and repository abstractionSpring Data JDBC - Direct JDBC access when neededHibernate 5.x - JPA implementation with advanced features:
  • hibernate-agroal (5.4.30.Final) - Connection pooling
  • hibernate-search-orm (5.11.8.Final) - Full-text search capabilities
  • hibernate-validator (7.0.1.Final) - Bean validation
  • hibernate-envers (5.5.0.Final) - Entity auditing and versioning
Spring Data Envers (2.5.1) - Integration layer for audit trails
The application supports multiple database systems:
  • MySQL (8.0.19) - Primary production database
  • MariaDB - MySQL-compatible alternative
  • Oracle JDBC (21.5.0.0) - Enterprise database support
  • MS SQL Server - Microsoft database support
  • H2 - In-memory database for development/testing
JWT (JSON Web Tokens) - Stateless authentication using io.jsonwebtoken (0.11.5):
  • jjwt-api - Core JWT API
  • jjwt-impl - Implementation library
  • jjwt-jackson - JSON processing
TOTP (de.taimos:totp:1.0) - Time-based one-time password supportCommons Codec (1.10) - Encoding utilities
Spring Security starter is currently commented out in pom.xml:103-106, indicating a custom lightweight authentication implementation.
Spring Boot Starter Web - RESTful web servicesSpring Boot Starter Mail - Email functionalityTomcat Embed Jasper - JSP support (provided scope)Springfox Swagger (2.4.0) - API documentation:
  • springfox-swagger2 - OpenAPI specification
  • springfox-swagger-ui - Interactive documentation UI
Spring REST Docs (2.0.6) - Test-driven documentation
Lombok - Boilerplate code reduction (@Data, @NoArgsConstructor, etc.)Dozer (5.5.1) - Bean mapping and transformationSpring DevTools - Hot reload during developmentSpring Session JDBC - Distributed session managementZXing (3.2.1) - QR code generation (javase)CGLIB (3.3.0) - Bytecode generation for proxiesJAXB API (2.3.0) - XML binding for Java 8+

Application Structure

The Spring Boot application follows the standard project structure:
com.tecmilenio.edutec/
├── controller/          # REST API endpoints
│   └── AuthController.java
├── dto/                 # Request/Response objects
│   └── LoginRequest.java
├── model/               # JPA entities
│   └── User.java
├── security/            # Security components
│   └── JwtService.java
├── repository/          # Data access layer (Spring Data JPA)
├── service/             # Business logic layer
└── config/              # Configuration classes
Application Name: edutec (defined in application.properties:1)Group ID: com.escolarArtifact ID: com.escolar

Request Flow Example

Here’s how a typical authentication request flows through the system:
  1. Client sends POST request to /auth/login with credentials
  2. AuthController receives the request and extracts LoginRequest DTO
  3. JwtService generates a JWT token for the username
  4. Controller returns the token as a String response
  5. Client stores the token for subsequent authenticated requests
// src/main/java/com/tecmilenio/edutec/controller/AuthController.java:15-19
@PostMapping("/login")
public String login(@RequestBody LoginRequest loginRequest) {
    System.out.println("El usuario " + loginRequest.getUsername() + " está intentando entrar");
    return jwtService.generateToken(loginRequest.getUsername());
}

Build Configuration

The project uses Maven as its build tool with the following plugins:

Spring Boot Maven Plugin

Packages the application as an executable JAR with embedded Tomcat server. Excludes Lombok from the final artifact.

Asciidoctor Maven Plugin

Generates HTML documentation from Asciidoc files during the prepare-package phase, integrating with Spring REST Docs.

Maven Resources Plugin

Handles resource filtering and copying (version 3.1.0).
Java Version Compatibility: The project targets Java 1.8. Ensure your development environment uses Java 8 or a compatible version to avoid compilation issues.

Next Steps

Now that you understand the architecture, explore:

Build docs developers (and LLMs) love