- Kotlin 81.9%
- HTML 11.1%
- Python 3.3%
- TypeScript 2.4%
- Dockerfile 0.9%
- Other 0.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .forgejo/workflows | ||
| frontend | ||
| gradle/wrapper | ||
| jenkins | ||
| k8s | ||
| monitoring | ||
| nginx | ||
| scripts | ||
| src | ||
| week_02 | ||
| week_03 | ||
| week_04 | ||
| week_05 | ||
| week_06 | ||
| week_07 | ||
| week_08 | ||
| .dockerignore | ||
| .gitignore | ||
| build.gradle.kts | ||
| docker-compose.yml | ||
| Dockerfile | ||
| Dockerfile.ci | ||
| gradlew | ||
| gradlew.bat | ||
| README.md | ||
| settings.gradle.kts | ||
CS4297 LinkLab workspace
This directory is the single Git repository and working copy for the LinkLab application. Do not clone or copy the application into individual week folders.
Layout
Labs/
├── src/, frontend/, build.gradle.kts, ... # the LinkLab application
├── week_02/ # Week 2 handouts and notes
├── week_03/ # Week 3 handouts and notes
├── week_04/ # Week 4 handouts and notes
├── week_05/ # Week 5 handouts, worksheets, and Postman collection
├── week_06/ # Week 6 handouts and evidence
├── week_07/ # Week 7 brief, answers, and evidence
├── week_08/ # Week 8 brief, design answers, and evidence
└── k8s/ # Week 8 application deployment
The repository root contains the current cumulative solution. Each week builds on that same application. The week_XX/ folders contain teaching material only: PDFs, worksheets, troubleshooting notes, and any week-specific supporting files. They must not contain another .git directory or a second src/ tree.
Working convention
- Read the relevant handout in
week_XX/. - Make application changes from this directory,
Labs/. - Run Gradle and Docker Compose from this directory.
- Keep written answers or screenshots for a lab in its matching
week_XX/folder. - Commit the code and the handouts or notes that should be retained together.
Useful commands:
./gradlew test
./gradlew bootRun
docker compose up -d mysql redis dynamodb-local dynamodb-admin elasticsearch kafka
docker compose ps
Current state: Week 8
The original Week 8 brief is a Kubernetes replication and health-probe lab, with eleven design questions. It does not require a new application feature. See week_08/requirements.md, week_08/answers.md, and k8s/README.md. Recorded runtime results and limitations are in week_08/verification.md.
The API runs as two replaceable Kubernetes pods, with the same Compose datastores
outside the cluster. Kafka adds a pod-accessible listener at port 9094. JPA uses
update rather than create-drop so replacing a pod preserves shared tables.
The lab deliberately uses dependency-sensitive liveness probes to demonstrate a
shared failure; this is not a production health-probe recommendation.
Week 7 authentication foundation
The application now uses bcrypt for password storage and HS384-signed JWTs for
stateless authentication. Register and login are under /api/auth; authenticated
requests send the token as Authorization: Bearer <token>. Registration retains
the lab's deliberate role selector so the RBAC vulnerability can be discussed.
Method security restricts link reindexing, link statistics, and Kafka consumer
lag to ROLE_ADMIN. The Week 6 consumer-lag implementation remains optional, so
an authorized administrator reaches its intentional 501 Not Implemented
response. JWT expiry is restored to 3600 seconds.
The Week 7 brief is in
week_07/lab-week7-instructions.pdf, answers
are in week_07/answers.md, and redacted command output is in
week_07/evidence/.
Week 6 foundation
The application includes the Week 6 Kafka work. A link creation saves the source record in MySQL, then publishes a link-created event. A consumer updates ElasticSearch and the Redis leaderboard. Redirects publish link-clicked events, and a second consumer records clicks in DynamoDB.
Kafka runs in KRaft mode through the root docker-compose.yml. The two application topics are link-created and link-clicked. Events use the short code as their Kafka key so events for the same link retain their order if the topics gain partitions later.
Run the app from the repository root. The Week 6 instructions are in week_06/lab-week6-instructions.pdf, with troubleshooting in week_06/lab-week6-troubleshooting.pdf.
Repository remotes
origin is your personal Forgejo repository. upstream is the professor repository for the previous supplied baseline. Push only to origin.