No description
- Java 91.4%
- CSS 5.5%
- JavaScript 3.1%
|
|
||
|---|---|---|
| .mvn/wrapper | ||
| src/main | ||
| .gitignore | ||
| CLAUDE.md | ||
| INTERN-TASKS.md | ||
| mvnw | ||
| mvnw.cmd | ||
| pom.xml | ||
| README.md | ||
Playground (Spring Boot + JSP)
Simple project for internship / junior mentoring sessions.
Modules: Login, Signup, Staff, Leave, KPI, Users, Report.
Requirements
- Java 17
- PostgreSQL (local)
Setup
-
Create a database:
CREATE DATABASE playground; -
Default connection is
localhost:5432/playgroundwith userpostgres/ passwordpostgres. To use different values, set env vars before running:export DB_URL=jdbc:postgresql://localhost:5432/playground export DB_USERNAME=postgres export DB_PASSWORD=postgres -
Run:
./mvnw spring-boot:run -
Open http://localhost:8081/cubixi-playground-spring-boot and click Sign up. The first account becomes ADMIN.
Tables are created automatically from src/main/resources/schema.sql.
Project structure
controller/ HTTP endpoints (no business logic)
service/ validation + business rules
repository/ SQL with JdbcTemplate
entity/ plain Java objects
interceptor/ login check for every page
util/ helpers (params, password hash, pagination, debug SQL)
webapp/WEB-INF/jsp/ views (home.jsp is the shell, others are fragments)
static/custom/ app.css + admin.js
Suggested exercises for interns
- Add a "My Leave" filter that only shows leave for the logged-in user.
- Add a leave balance (e.g. 14 annual days per year) and block applications that exceed it.
- Export the report to CSV.
- Add a "Change password" page.
- Write unit tests for
LeaveService(date validation, status rules).