Welcome to ClassTrack, a comprehensive web-based system designed to streamline attendance tracking and classroom management within educational institutions.
ClassTrack is a secure and robust system that allows administrators, faculty, and students to manage various aspects of a college efficiently. It features role-based access control, ensuring that each user has access to the functionalities they need.
ClassTrack is a web-based application designed for placement projects at TheKiranAcademy. It aims to simplify attendance recording and tracking for students and faculty, provide efficient course scheduling, and enhance communication between faculty, administrators, and students.
- Simplify attendance recording and tracking for students and faculty.
- Provide efficient course scheduling and faculty management tools.
- Enhance communication between faculty, administrators, and students.
The project includes features such as user authentication, course scheduling, attendance recording, and faculty profile management. It excludes integration with external systems, advanced analytics, and support for non-academic events.
- Java 21
- Spring Boot 3.3.0
- Spring Security
- Spring Validation
- Spring Web
- Spring Data JPA
- Hibernate
- JPA
- Swagger
- OpenAPI
- SLF4J
- H2 Database
- MySQL
- Lombok
- IntelliJ IDEA
- Maven
- Postman
- Git
- H2 Database Console
ClassTrack ensures secure and precise access control through distinct roles:
- Admin: Full access to all modules and features.
- Faculty: Manage courses, faculty attendances, and class schedules.
- Student: View courses and subjects.
Robust logging using SLF4J for better debugging and tracking.
Comprehensive API documentation generated using Swagger and OpenAPI. Accessible at http://localhost:8080/swagger-ui/index.html.
Admins can create and manage user accounts effortlessly.
Manage classrooms, including creating, updating, and deleting classroom information. Assign classrooms, subjects, and faculty to classes.
Faculty can manage course details, assignments, and student attendance.
Keep track of student attendance efficiently with dedicated tools.
Utilizes Spring Security to ensure secure access to different parts of the application.
The project follows a layered architecture pattern, with distinct layers for handling different aspects of functionality and data management.
- Controller Layer: Responsible for handling incoming HTTP requests, processing them, and returning appropriate responses. Controllers act as the entry point to the application and delegate business logic to the service layer.
- Service Layer: Acts as an intermediary between the controller and the data access layer (DAO). It contains business logic and orchestrates interactions between different parts of the application. Services handle tasks such as validation, data manipulation, and transaction management.
- DAO (Data Access Object) Layer: Responsible for interacting with the database and performing CRUD (Create, Read, Update, Delete) operations on the underlying data. DAOs abstract away the details of database interactions and provide a clean interface for the service layer to work with.
- Controller Layer:
- Handle incoming HTTP requests.
- Validate request parameters and payload.
- Invoke appropriate methods in the service layer.
- Format and return HTTP responses.
- Service Layer:
- Implement business logic and rules.
- Coordinate interactions between controllers and DAOs.
- Perform data manipulation and transformation.
- Manage transactions and ensure data integrity.
- DAO Layer:
- Provide CRUD operations for accessing and modifying data.
- Translate database queries and commands into appropriate SQL statements.
- Handle database transactions and connections.
- Abstract away database-specific details from the service layer.
- GET /api/courses: Get all courses.
- GET /api/courses/{id}: Get a specific course by ID.
- POST /api/courses: Create a new course.
- PUT /api/courses/{id}: Update an existing course.
- DELETE /api/courses/{id}: Delete a course by ID.
To explore all the endpoints in detail, visit the http://localhost:8080/swagger-ui/index.html after starting application.
-
POST /api/admin/addusers
Add a new user with username, password, and role.
-
Note: role can be FACULTY, STUDENT not ADMIN
Request Body:
{ "username": "newUser", "password": "password", "role": "STUDENT" }
-
DELETE /api/admin/deleteuser/{username}
Delete a user by path variable username.
-
e.g. /api/admin/deleteuser/username
- Classroom: Stores information about classrooms, including ID, name, capacity, and availability.
- ClassSchedule: Represents class schedules, including ID, date, time, classroom ID, course ID, and faculty ID.
- Course: Contains details about academic courses, such as ID, name, description, department ID.
- Department: Stores information about academic departments, including ID, name, and description.
- Faculty: Represents faculty members, including ID, name, email, department ID, and contact information.
- Subject: Contains details about academic subjects, such as ID, name, description, and department ID.
- Faculty Attendance: Stores attendance records for faculty members in relation to specific class schedules.
- Java 21
- Maven 3.x
- MySQL 8.x (Optional) or H2 in-memory database included in the project.
- Clone the repository:
git clone https://github.com/TheKiranAcademy/classtrack.git cd classtrack - update the application.properties file (Optional):
src/main/resources/application.properties
- Build the project:
mvn clean install
- Run the application:
mvn spring-boot:run
- Access the application:
- Open a web browser and go to http://localhost:8080/home
- Postman:
- use postman to test the api's with following credentials:
- Admin
- Username:
admin - Password:
admin
- Username:
- Faculty
- Username:
faculty - Password:
faculty
- Username:
- Student
- Username:
student - Password:
student
- Username:
- Access the API documentation:
- Open a web browser and go to [http://localhost:8080/swagger-ui/index.html] (http://localhost:8080/swagger-ui/index.html) and explore the API documentation.
- Access the H2 Database Console:
- Open a web browser and go to http://localhost:8080/h2-console
- Use the following JDBC URL:
jdbc:h2:mem:classtrack - Connect to the database and explore the tables and data.
- Note: The H2 in-memory database is used by default. If you want to use MySQL, update the
application.propertiesfile with the MySQL database configuration.
- Admin Endpoints for Adding and Deleting Users:
- Use the provided endpoints to add and delete users with different roles.
- Refer to the API documentation for more details on the endpoints.