Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/kenri89/PROYECTO_UTP_AED_1_1/llms.txt

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

The application reads all connection settings from src/config.properties at startup through the ConexionSQL utility class, which calls ConexionSQL.class.getClassLoader().getResourceAsStream("config.properties") to load the file from the classpath. If a valid SQL Server connection is established, all reads and writes go through the JDBC-based DAOs (CursoDAO, EstudianteDAO, MatriculaDAO, UsuarioDAO). If the connection cannot be established, the application automatically switches to the local TSV persistence model managed by PersistenciaAcademica, which stores data as tab-separated files under ~/.proyecto_utp_aed_datos/.

Connection Properties

db.server
string
required
The hostname or IP address of the SQL Server instance. Use localhost when running SQL Server on the same machine as the application.
db.port
integer
default:"1433"
The TCP port SQL Server listens on. The default SQL Server port is 1433. Change this only if your instance is configured to use a non-standard port.
db.name
string
required
The name of the target database. Must match the database created by schema.sql. The expected value is iestp_peru_japon.
db.user
string
required
The SQL Server login username used for authentication. The system user sa works during development; use a dedicated application-scoped login in shared or production environments.
db.password
string
required
The password for the SQL Server login specified in db.user. Stored in plain text in this file — see the security warning at the bottom of this page.
db.encrypt
boolean
default:"true"
Passed to the mssql-jdbc driver as the encrypt connection property. Set to true to enable TLS encryption on the JDBC connection.
db.trustCertificate
boolean
default:"true"
Passed to the driver as trustServerCertificate. When true, the driver accepts self-signed certificates, which is typical for local developer SQL Server installations that do not have a CA-signed TLS certificate.

Full Configuration File

The file below shows all properties as they appear in src/config.properties:
# Configuracion de base de datos
db.server=localhost
db.port=1433
db.name=iestp_peru_japon
db.user=sa
db.password=1234
db.encrypt=true
db.trustCertificate=true

Local File Persistence

When SQL Server is unavailable, PersistenciaAcademica reads from and writes to the directory:
~/.proyecto_utp_aed_datos/
This translates to C:\Users\<you>\.proyecto_utp_aed_datos\ on Windows or /home/<you>/.proyecto_utp_aed_datos/ on Linux/macOS. The directory is created automatically on first save via FileUtils.forceMkdir(...). Four TSV files store the in-memory state of the five custom data structures:
FileColumnsBacked structure
cursos.tsvcodigo, nombre, creditos, semestreArregloCursos, MatrizSemestres, ListaCursos
estudiantes.tsvcarnet, nombre, carreraArbolEstudiantes
matriculas.tsvcarnet, codigo_cursoListaMatricula
solicitudes.tsvcarnet, tipo, descripcion, fecha, atendida, fecha_atencionQueue<Solicitud>
Files are written by PersistenciaAcademica.guardar(...) and read back by PersistenciaAcademica.cargar(...). Lines beginning with # and blank lines are ignored. Each call to cargar clears all five in-memory structures before repopulating them, ensuring a clean load on every startup.

Default Users

schema.sql seeds three accounts into the usuarios table immediately after the schema is created:
-- Usuarios por defecto
INSERT INTO usuarios (username, password, rol) VALUES ('admin',      '1234', 'Administrador');
INSERT INTO usuarios (username, password, rol) VALUES ('secretaria', '1234', 'Secretaria');
INSERT INTO usuarios (username, password, rol) VALUES ('estudiante', '1234', 'Estudiante');
GO
The usuarios table schema for reference:
CREATE TABLE usuarios (
    id       INT IDENTITY(1,1) PRIMARY KEY,
    username VARCHAR(50)  NOT NULL UNIQUE,
    password VARCHAR(100) NOT NULL,
    rol      VARCHAR(20)  NOT NULL DEFAULT 'Administrador'
);
Authentication is performed in dao.UsuarioDAO.autenticar(username, password, rol). The role value selected in the LoginFrame drop-down is matched against the rol column, so the username, password, and role must all be correct for a successful login.
Change default passwords before any shared or production deployment. All three seed accounts use the password 1234, which is stored in plain text both in schema.sql and in the usuarios table. Update passwords with a direct SQL UPDATE statement and restrict access to src/config.properties, since it also contains the database password in plain text.

Build docs developers (and LLMs) love