This document describes the directory structure, environment configuration, and dependencies for the Business Management Platform project.
final-project-final-project-team-10/
│
├── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── edu/
│ │ │ └── neu/
│ │ │ └── csye6200/
│ │ │ │
│ │ │ ├── Driver.java # Main Spring Boot Application Entry Point
│ │ │ │
│ │ │ ├── config/ # Spring Configuration Classes
│ │ │ │ ├── WebConfig.java # Web-related configuration
│ │ │ │ ├── SecurityConfig.java # Security configuration
│ │ │ │ └── CorsConfig.java # CORS configuration
│ │ │ │
│ │ │ ├── model/ # Data Models
│ │ │ │ ├── domain/ # Core business entities (Business, BusinessPerson, Employee, Employer)
│ │ │ │ ├── payroll/ # Payroll-related models (Paycheck, deductions)
│ │ │ │ └── training/ # Training and certification models
│ │ │ │
│ │ │ ├── repository/ # JPA Repositories for database operations
│ │ │ │
│ │ │ ├── service/ # Service Layer
│ │ │ │ ├── interfaces/ # Service interfaces (PayrollService, EmployeeService, etc.)
│ │ │ │ └── impl/ # Service implementations
│ │ │ │
│ │ │ ├── controller/ # REST Controllers
│ │ │ │ └── HelloController.java # Example controller
│ │ │ │
│ │ │ ├── dto/ # Data Transfer Objects for API requests/responses
│ │ │ │
│ │ │ ├── factory/ # Factory Pattern Implementations
│ │ │ │ └── BusinessPersonFactory.java
│ │ │ │
│ │ │ ├── strategy/ # Strategy Pattern
│ │ │ │ ├── tax/ # Tax calculation strategies
│ │ │ │ └── insurance/ # Insurance deduction strategies
│ │ │ │
│ │ │ ├── util/ # Utility Classes
│ │ │ │ ├── csv/ # CSV parsing utilities
│ │ │ │ └── comparators/ # Employee comparators for sorting
│ │ │ │
│ │ │ └── exception/ # Custom Exceptions
│ │ │ └── InvalidBusinessException.java
│ │ │
│ │ └── resources/
│ │ ├── application.properties # Main application configuration
│ │ ├── static/ # Static resources
│ │ │ ├── css/ # Stylesheets
│ │ │ ├── js/ # JavaScript files
│ │ │ └── images/ # Static images
│ │ ├── templates/ # Thymeleaf templates
│ │ │ ├── auth/ # Authentication pages
│ │ │ ├── dashboard/ # Dashboard pages
│ │ │ ├── payroll/ # Payroll pages
│ │ │ └── training/ # Training pages
│ │ └── data/ # Data files
│ │ └── csv/ # CSV seed files for database initialization
│ │
│ └── test/ # Test Directory
│ └── java/
│ └── edu/
│ └── neu/
│ └── csye6200/
│ ├── service/ # Service layer tests
│ ├── controller/ # Controller integration tests
│ └── util/ # Utility class tests
│
├── pom.xml # Maven configuration
├── .gitignore # Git ignore rules
└── README.md # Project documentation
The main Spring Boot application entry point is Driver.java located at:
src/main/java/edu/neu/csye6200/Driver.java
Run the application using:
mvn spring-boot:runOr directly run the main method in Driver.java from your IDE.
The main configuration file is located at:
src/main/resources/application.properties
spring.application.name=business-management-platform
server.port=8080- spring.application.name: Application identifier
- server.port: HTTP server port (default: 8080)
spring.datasource.url=jdbc:mysql://localhost:3306/business_management_db
spring.datasource.username=root
spring.datasource.password=mysql_password_here
spring.datasource.driver-class-name=com.mysql.cj.jdbc.DriverSetup Steps:
- Install and start MySQL server
- Create the database:
CREATE DATABASE business_management_db;
- Update
spring.datasource.passwordwith your MySQL root password - Update
spring.datasource.usernameif using a different user
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect
spring.jpa.properties.hibernate.format_sql=true- ddl-auto: Automatically creates/updates database schema (
update,create,none, etc.) - show-sql: Logs SQL queries to console (useful for debugging)
- format_sql: Formats SQL output for readability
spring.servlet.multipart.max-file-size=10MB
spring.servlet.multipart.max-request-size=10MB- Maximum file size for CSV imports and file uploads
logging.level.edu.neu.csye6200=DEBUG
logging.level.org.springframework.web=INFO- DEBUG: Detailed logging for application code
- INFO: Standard logging for Spring framework
For different environments, create separate property files:
application-dev.properties- Development environmentapplication-prod.properties- Production environmentapplication-local.properties- Local development (already in .gitignore)
Activate with:
mvn spring-boot:run -Dspring-boot.run.profiles=dev<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>Purpose: Provides REST API support, embedded Tomcat server, and Spring MVC framework.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>Purpose:
- JPA (Java Persistence API) support
- Hibernate ORM integration
- Repository pattern implementation
- Database abstraction layer
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<scope>runtime</scope>
</dependency>Purpose:
- JDBC driver for MySQL database
- Runtime dependency (not needed at compile time)
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>Purpose:
- Testing framework (JUnit, Mockito, AssertJ)
- Spring Test support
- Only available during test phase
- Parent POM: Spring Boot 3.2.0
- Java Version: 11
-
Start MySQL Database
mysql.server start
-
Configure Database Password
- Edit
src/main/resources/application.properties - Update
spring.datasource.password
- Edit
-
Run Application
mvn spring-boot:run
Or run
Driver.javamain method from IDE -
Access Application
- Web Interface: http://localhost:8080
- API Endpoints: http://localhost:8080/api/...
Run tests with:
mvn testTest structure mirrors main source structure:
src/test/java/edu/neu/csye6200/service/- Service testssrc/test/java/edu/neu/csye6200/controller/- Controller testssrc/test/java/edu/neu/csye6200/util/- Utility tests
- Empty directories contain
.gitkeepfiles to ensure they are tracked by Git - Personal documentation should be stored in
local/directory (ignored by Git) - Database schema is auto-generated based on JPA entities
- Logs are output to console (configure logging in
application.propertiesfor file output)