No description
  • Java 91.4%
  • CSS 5.5%
  • JavaScript 3.1%
Find a file
2026-10-19 12:33:47 +08:00
.mvn/wrapper Initial commit: playground app for intern mentoring 2026-10-19 12:22:55 +08:00
src/main Starter version for interns: stub login and staff logic 2026-10-19 12:31:19 +08:00
.gitignore Initial commit: playground app for intern mentoring 2026-10-19 12:22:55 +08:00
CLAUDE.md Initial commit: playground app for intern mentoring 2026-10-19 12:22:55 +08:00
INTERN-TASKS.md Starter version for interns: stub login and staff logic 2026-10-19 12:31:19 +08:00
mvnw Initial commit: playground app for intern mentoring 2026-10-19 12:22:55 +08:00
mvnw.cmd Initial commit: playground app for intern mentoring 2026-10-19 12:22:55 +08:00
pom.xml Initial commit: playground app for intern mentoring 2026-10-19 12:22:55 +08:00
README.md Initial commit: playground app for intern mentoring 2026-10-19 12:22:55 +08:00

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

  1. Create a database:

    CREATE DATABASE playground;
    
  2. Default connection is localhost:5432/playground with user postgres / password postgres. 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
    
  3. Run:

    ./mvnw spring-boot:run
    
  4. 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

  1. Add a "My Leave" filter that only shows leave for the logged-in user.
  2. Add a leave balance (e.g. 14 annual days per year) and block applications that exceed it.
  3. Export the report to CSV.
  4. Add a "Change password" page.
  5. Write unit tests for LeaveService (date validation, status rules).