Spring Boot Tutorial 0/110 lessons ~6 min read Lesson 109

    Mock Backend Projects

    End-to-end portfolio projects modelled on what real backend teams ship in year one.

    Course progress0%
    Focus
    12 guided sections
    Practice signal
    Examples included
    Career prep
    Interview Q&A included

    Introduction

    End-to-end portfolio projects modelled on what real backend teams ship in year one. Each TechLearningPRO mock project below includes a problem statement, required Boot 3 / Java 21 stack, acceptance criteria, and a definition of done — not a vague idea list.

    Pick one, build it, write a README, add Grafana screenshots, and publish a fake outage postmortem. That combination stands out more than ten unfinished Initializr zips.

    Use jakarta.* only; keep secrets in env placeholders.

    Purpose of this lesson

    Ship one production-shaped Spring Boot 3 portfolio project with tests, observability, and documented ops evidence.

    Understanding the topic

    Five project briefs — choose one and finish it.

    • 🛒 E-commerce checkout — cart, payment intent, idempotent confirm, order events.
    • 🏦 Banking transfers — accounts, transactional debit/credit, audit log, reports.
    • 🍔 Food delivery — restaurants, menus, orders, courier WebSocket updates.
    • 💬 Chat backend — WS rooms, history, presence, push notification hooks.
    • 🔔 Notification system — email + SMS + push, preferences, retries, dead-letter.

    Step-by-step explanation

    1. Select one brief; write OpenAPI + ERD before coding.
    2. Scaffold Boot 3 + Java 21 + Postgres + Flyway + Testcontainers.
    3. Implement vertical slices with Security 6; add Actuator + Micrometer + Prometheus.
    4. Deploy to a free tier; capture Grafana panels; write README + postmortem.

    Informative example

    Checkout project — acceptance pack (Orders-shaped).

    bash
    Stack: Spring Boot 3.3+, Java 21, Postgres, Redis, Kafka (or Testcontainers Kafka)
    Modules: cart | checkout | catalog | notifications
    Must-have APIs:
    POST /api/cart/items
    POST /api/checkout/payment-intents
    POST /api/checkout/confirm + Idempotency-Key
    GET /api/orders/{id}
    Acceptance:
    - Double confirm with same Idempotency-Key returns same order id
    - Outbox publishes order.placed exactly once per commit
    - @SpringBootTest covers confirm race with parallel threads
    - /actuator/prometheus shows orders.placed counter
    - README: architecture diagram, curl script, Grafana screenshot
    - No javax.*; no real payment provider keys in repo (use stub + env placeholders)
    Stretch:
    - Refund flow with audit events
    - HPA notes + k6 load script hitting p95 SLO

    Real-world use

    Hiring partners reviewing TechLearningPRO alumni portfolios consistently favour one deployed checkout or transfers service with Testcontainers and a Grafana panel over multi-repo toy CRUDs. The mock project's postmortem often becomes the behavioural interview story.

    Security implications

    Portfolio code is public — treat it like production hygiene.

    • Scrub .env from git history; document required variables only.
    • Demo users get weak passwords only in local docker-compose — never production-like credentials.
    • Disable dangerous Actuator endpoints in the public deploy.

    Best practices

    • One polished, deployed project beats ten WIP repos.
    • Include observability screenshots in the README.
    • Write a postmortem for a staged failure — signals seniority.

    Common mistakes

    • Starting five projects and finishing none.
    • Skipping idempotency on payment confirm.
    • Committing provider API keys or using Boot 2 javax.* samples.

    Advanced interview questions

    Interview Prep

    Practice concise answers, then expand each card for the explanation.

    3 questions
    1BeginnerQuestionWhat should a mock backend project prove to a hiring manager?+

    Answer

    You can own an API end-to-end: data model, auth, idempotency, tests, and basic operability — not just controllers.
    2IntermediateQuestionWhy include a postmortem in a portfolio?+

    Answer

    It shows how you debug and communicate under failure — a senior signal beyond happy-path CRUD.
    3IntermediateQuestionHow does the checkout brief map to this course's Orders service?+

    Answer

    Same seams: idempotent confirm, outbox events, Postgres truth, metrics on place-order — portfolio-ready packaging of course labs.

    Hands-on exercise

    Project challenge. Deliver one brief fully: 1) Repo with green CI (unit + Testcontainers). 2) OpenAPI + ERD in /docs. 3) Deployed URL + Grafana PNG. 4) One-page postmortem (e.g. simulated double-charge caught by idempotency). 5) 5-minute loom/video walkthrough. Rubric: correctness 40%, tests 20%, ops evidence 20%, README clarity 20%.

    Summary

    Mock projects turn course skills into a hireable portfolio. Next: study how large enterprises actually run backends.

    Ready to mark this lesson complete?Track your journey across the entire course.