Skip to content

Latest commit

Β 

History

History
96 lines (65 loc) Β· 3.03 KB

File metadata and controls

96 lines (65 loc) Β· 3.03 KB

Spring Boot Teaching Template for Frontend Developers

Welcome, developer! πŸ‘‹ This project is a learning platform for frontend devs who want to understand the Java + Spring ecosystem β€” through code, not slides.

βœ… What you'll find

  • βœ… A working feature: Todo

    • TodoController, TodoService, TodoRepository, Todo model
    • Uses MongoDB for persistence with Testcontainers for testing
    • Demonstrates Dependency Injection (DI) using constructor injection
    • Has Swagger UI docs via springdoc-openapi
  • 🧠 Learning-oriented JavaDocs with links to Spring resources

  • πŸ§ͺ ArchUnit tests to enforce clean architecture

  • πŸ” Functional tests to validate feature behavior using Testcontainers

πŸ— Architecture

This project implements Vertical Slice Architecture (VSA), organizing code around features rather than technical layers. You can explore this through the Todo feature implementation.

Why VSA?

  • 🎯 Feature-focused organization
  • πŸ”„ Independent, full-stack slices
  • πŸš€ Faster development cycles
  • πŸ›  Easier maintenance

Learn more about VSA:

🎯 Todo Feature Showcase

The Todo feature demonstrates VSA principles in action:

  • Complete vertical slice from API to persistence
  • Self-contained in features/todo package
  • Includes dedicated tests and documentation
  • Shows proper dependency management

πŸš€ Run the app

  1. Make sure you have:

    • Java 21
    • Docker running
  2. Start MongoDB:

docker run -d --name mongodb -p 27017:27017 mongo:latest
  1. Start the app:
./gradlew bootRun

Open Swagger docs: http://localhost:8080/swagger-ui.html

πŸ“š Learning Tasks

🌳 Branch Management

  1. Personal Feature Branch

    • You should have a personal feature branch created by trainers
    • This will be your main working branch
  2. Task Branches

    • For each task, create a new branch from your personal feature branch
    • Naming convention: task/<task-number> (e.g., task/1, task/2)
  3. Pull Request Process

πŸ“ Available Tasks

  1. Task 1: Create the "Greeting" Feature

    • Implement a new greeting endpoint
    • Connect it with the existing Todo feature
  2. Task 2: Create the "Statistics" Feature

    • Build statistics endpoint for Todo items
    • Implement date filtering and different response formats

For detailed requirements and step-by-step instructions, please refer to the respective task files: TASK1.md and TASK2.md