Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/miagv/PlataformaEduca/llms.txt

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

PlataformaEduca is packaged as a standard Spring Boot application and runs anywhere Java 21 is available. This page covers system requirements, the full application.properties configuration reference, and the commands to build and start the server.

System requirements

RequirementVersion
Java21
Maven3.8+ (or use the included mvnw wrapper)
MySQL8.x

Create the database

Before starting the server, create the MySQL schema:
mysql -u root -p -e "CREATE DATABASE plataforma_educativa;"
The schema name plataforma_educativa must match the spring.datasource.url property exactly.

Configure application.properties

Open src/main/resources/application.properties and populate it with the following settings. Adjust the username, password, and JWT secret for your environment.
# DataSource
spring.datasource.url=jdbc:mysql://localhost:3306/plataforma_educativa
spring.datasource.username=root
spring.datasource.password=yourpassword
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

# JPA / Hibernate
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect

# JWT
jwt.secret=esta_es_una_clave_secreta_super_larga_y_segura_de_mas_de_32_caracteres_para_la_plataforma
jwt.expiration=86400000
The jwt.secret value must be at least 32 characters long for HS256 signing. Use a random, high-entropy string in production and never commit it to version control.

Key properties explained

PropertyDescription
spring.jpa.hibernate.ddl-auto=updateHibernate creates and updates tables automatically on startup. No manual migration needed.
jwt.expirationToken validity in milliseconds. 86400000 = 24 hours.
spring.jpa.show-sql=trueLogs all SQL statements to stdout. Disable in production for performance.

Build the project

./mvnw clean package -DskipTests
-DskipTests skips the test suite to speed up the initial build. Run ./mvnw test separately to execute tests.

Start the server

./mvnw spring-boot:run
The application starts on port 8080. On first startup, the DataInitializer component seeds the database with roles, sample grade levels, classrooms, courses, and four default user accounts. You do not need to run any SQL scripts manually.

Verify the setup

Confirm the server is running and data is seeded by calling the courses endpoint with the admin credentials:
1

Log in as admin

curl -s -X POST http://localhost:8080/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email": "admin@gmail.com", "password": "admin123"}'
Copy the token value from the response.
2

Call GET /api/cursos

curl -s http://localhost:8080/api/cursos \
  -H "Authorization: Bearer <your-token>"
You should see the seeded courses (Matemáticas and Comunicación) in the response. If you receive a non-empty array, the server and database are configured correctly.

API documentation

Once the server is running, two documentation interfaces are available:

Swagger UI

Interactive API explorer. Paste your Bearer token to authenticate and test endpoints directly in the browser.

OpenAPI JSON

Raw OpenAPI specification at http://localhost:8080/v3/api-docs. Import this into Postman or other API clients.

Build docs developers (and LLMs) love