Skip to content

EducReports v3.0

Latest

Choose a tag to compare

@itsmenicky itsmenicky released this 09 Jul 21:49

Whats new?

  • Implement MVC Pattern: The project now follows the Model-View-Controller (MVC) design pattern, improving the separation of concerns and making the codebase more modular and maintainable.
  • EducReports now generates reports that include the child's photo!

Installation Manual 👇

Database

  • First of all, make sure you have a local database based on MySQL 8.

  • In phpMyAdmin, create a new database called "educdb"

CREATE DATABASE educdb;
USE educdb;
  • In the SQL tab, paste the SQL script below and execute:
 CREATE TABLE `tb_user` (`id_user` int not null PRIMARY KEY auto_increment, 
`username` varchar(30) not null, 
`email` varchar(50) not null, 
`login` varchar(20) not null UNIQUE KEY, 
`password` varchar(32) not null, 
`hierarchy` varchar(20) not null, 
`status` varchar(20) not null default 'Active');

CREATE TABLE `tb_child` (
    `RA` INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
    `child_name` VARCHAR(50) NOT NULL,
    `birth` DATE NOT NULL,
    `class` VARCHAR(20) NOT NULL,
    `child_photo` LONGBLOB NOT NULL,
    `child_phone` VARCHAR(15) NOT NULL,
    `responsible` VARCHAR(50) NOT NULL,
    `address` VARCHAR(100) NOT NULL,
    `teacher_name` VARCHAR(50) NOT NULL,
    `teacher_id` INT NOT NULL,
    `status` VARCHAR(20) NOT NULL DEFAULT 'Active',
    FOREIGN KEY (teacher_id)
        REFERENCES tb_user (id_user)
);

CREATE TABLE `tb_reports` (`ID_Rel` int not null auto_increment PRIMARY KEY, 
`child_RA` int not null, 
`birth` date not null, 
`class` varchar(20) not null, 
`report` varchar(5000) not null,
`emission_date` timestamp not null default current_timestamp,
`child_name` varchar(50) not null,
`teacher_name` varchar(50) not null,
`child_photo` longblob not null,
foreign key(child_RA) references tb_child(RA));

Application

The application uses environment variables for email use. With this in mind, you need to set the variables:

  • EMAIL_ADDRESS (email to be used by the email service)
  • EMAIL_PASSWORD (email password)

After setting up the database and configuring the environment variables, you can run the application using Maven. Execute the following command:

mvn exec:java