Get the Payroll Check System up and running in 5 minutes!
- Java 17+ installed
- Maven 3.6+ installed
mvn clean packagemvn spring-boot:runThe application will start on port 8080.
Open your browser and navigate to:
- Swagger UI (API Documentation): http://localhost:8080/swagger-ui.html
- H2 Database Console: http://localhost:8080/h2-console
API Authentication:
- Username:
admin - Password:
admin123
H2 Console:
- JDBC URL:
jdbc:h2:mem:payrolldb - Username:
sa - Password: (leave blank)
The application comes pre-loaded with sample data:
-
Acme Corporation (ID: 1)
- EIN: 12-3456789
- Location: San Francisco, CA
- 3 employees
-
TechStart Inc (ID: 2)
- EIN: 98-7654321
- Location: New York, NY
- 1 employee
- John Doe - Software Engineer ($120,000/year)
- Jane Smith - Senior Product Manager ($145,000/year)
- Mike Johnson - Marketing Specialist ($75,000/year)
- Sarah Williams - Data Scientist ($135,000/year)
Using curl:
curl -u admin:admin123 http://localhost:8080/api/companies/1/employeesOr use Swagger UI for an interactive experience!
- Go to Swagger UI
- Navigate to "Payroll Management"
- Click on "POST /api/companies/{companyId}/payrolls"
- Click "Try it out"
- Enter:
- companyId:
1 - Request body:
{ "periodStartDate": "2024-01-01", "periodEndDate": "2024-01-15", "payDate": "2024-01-19" } - companyId:
- Click "Execute"
After creating a payroll (let's say it got ID 1):
- Find "POST /api/companies/{companyId}/payrolls/{payrollId}/generate-items"
- Click "Try it out"
- Enter:
- companyId:
1 - payrollId:
1
- companyId:
- Click "Execute"
You'll see calculated payroll items with taxes automatically computed!
- Find "GET /api/companies/{companyId}/payrolls/{payrollId}"
- Enter:
- companyId:
1 - payrollId:
1
- companyId:
- Click "Execute"
You'll see the complete payroll with all items, taxes, and totals!
- Explore the full README for detailed documentation
- Try different API endpoints in Swagger UI
- Create your own companies and employees
- Process a complete payroll from start to finish
- Check out the tax calculations in the payroll items
POST /api/companies
POST /api/companies/{companyId}/employees
- POST
/api/companies/{companyId}/payrolls- Create payroll - POST
/api/companies/{companyId}/payrolls/{payrollId}/generate-items- Generate items - PUT
/api/payroll-items/{itemId}- Update items (optional) - POST
/api/companies/{companyId}/payrolls/{payrollId}/process- Process payroll
GET /api/payroll-items/employee/{employeeId}
Port 8080 already in use?
Change the port in src/main/resources/application.yml:
server:
port: 8081Build fails?
Make sure you have Java 17+ and Maven 3.6+:
java -version
mvn -versionFor issues or questions, check the main README or open an issue on GitHub.
Happy payroll processing!