A Spring Boot project designed as a sandbox and reference implementation for Proofs of Concepts (POCs), architectural experiments, and design pattern exploration.
The current implementation follows a layered architecture with:
- Controller Layer - HTTP request handling
- Service Layer - Business logic and orchestration
- Repository Layer - Data persistence (Spring Data JPA)
- Model Layer - Domain objects and entities
For a Clean Architecture approach to the same API, check out the feat/clean-arch branch:
git checkout feat/clean-archThis branch implements the same Task Management API using Clean Architecture principles, featuring:
- Independent Layer Structure - Business logic separated from frameworks
- Use Cases - Core application workflows isolated
- Domain Entities - Pure business rules without framework dependencies
- Adapters - Explicit boundaries for external systems
- Ports & Adapters Pattern - Framework-agnostic interfaces
- Dependency Inversion - Dependencies point inward to business logic
Key Directories in feat/clean-arch:
├── usecases/ # Application business rules
├── domains/ # Pure business entities
├── adapters/ # Framework implementations
├── gateways/ # External system boundaries
└── presenters/ # Response formatting
- Spring Boot 3.5.16 - Framework
- Spring Data JPA - Data access
- H2 Database - In-memory database
- JUnit 5 - Testing framework
- Mockito - Mocking library
- Maven - Build tool
- Java 21 - Programming language
This POC playground includes examples of:
- ✅ RESTful API design patterns
- ✅ Unit testing with mocks and Mockito
- ✅ Spring Boot configuration and best practices
- ✅ JPA/Hibernate integration
- ✅ Error handling and validation strategies
- ✅ Layered architecture pattern
- ✅ SOLID principles application in practice
- ✅ Dependency Injection patterns
- ✅ Clean code principles
- Layered Architecture - Current implementation
- Clean Architecture -
feat/clean-archbranch - Hexagonal Architecture (Ports & Adapters)
- Domain-Driven Design (DDD) concepts
- Separation of Concerns
- Dependency Injection
- Interface-based programming
- Test-Driven Development (TDD)
- Mock-based unit testing
This project serves as a practical playground for:
- 🏗️ Architectural Pattern Exploration - Testing different design patterns and architectures
- 🧪 POC Development
- 📚 Learning Reference - Clean examples of Spring Boot best practices
- 🔄 Pattern Comparison - Side-by-side implementations of different approaches
- 💡 Technical Experimentation - Validating new frameworks, libraries, and techniques
This repository is meant to be a sandbox environment where developers can:
- Experiment with POCs - Build proofs of concepts without production constraints
- Test architectural patterns - Implement solutions using different architectural approaches
- Apply SOLID principles - Practice clean code and design principles in real-world scenarios
- Explore design patterns - Reference implementations of common and advanced patterns
- Prototype new features - Validate technical approaches before production implementation
- Document learnings - Create working examples for team knowledge sharing
- Java 21+
- Maven 3.9+
- Spring Boot 3.5.16
# Clone the repository
git clone https://github.com/rcoelho6/just_to_code.git
cd just-to-code
# Build the project
mvn clean install
# Run the application
mvn spring-boot:runThe API will be available at http://localhost:8080
This project includes a Task Management module as an example implementation demonstrating RESTful API design and CRUD operations.
Endpoints:
- POST
/tasks- Create a new task - PUT
/tasks/{id}- Update an existing task - 🔨
[To Be Implemented]GET/tasks/{id}- Retrieve a specific task - 🔨
[To Be Implemented]DELETE/tasks/{id}- Delete a task
Request Body Example:
{
"description": "Hey, look this! It has a branch for clean arch impl!",
"priority": 9999
}Error Response Example:
{
"message": "Oh God! No! No! Nooo!",
"status": 404
}Feel free to add more modules and POCs to this project!
Run the test suite:
mvn testTests are written using:
- JUnit 5 - Test framework
- Mockito - Mocking framework
- Spring Test - Spring Boot testing utilities
| Branch | Purpose | Architecture |
|---|---|---|
main |
Primary implementation and POCs | Layered Architecture |
feat/clean-arch |
Clean Architecture reference | Clean/Hexagonal Architecture |
feat/* |
Feature branches and experiments | Various patterns |
Feel free to:
- Create feature branches -
feat/new-poc-namefor new proofs of concepts - Add new modules - Implement different POCs within this sandbox
- Experiment with patterns - Try different architectural approaches
- Test frameworks/libraries - Validate new technologies in isolation
- Document learnings - Add comments and examples of what you discovered
- Submit pull requests - Share your POCs and experiments with the team
# 1. Create a feature branch
git checkout -b feat/your-poc-name
# 2. Create a new module/package
mkdir -p src/main/java/com/example/test/just_to_code/yourpoc
# 3. Implement your POC
# 4. Add tests
# 5. Document your findings
# 6. Commit and push
git commit -m "feat: Add [Your POC Name] proof of concept"
git push origin feat/your-poc-name# Create a new feature branch
git checkout -b feat/new-concept
# Make your changes and commit
git add .
git commit -m "Add new POC or example"
# Push to repository
git push origin feat/new-concept
# Compare with other branches
git diff main feat/new-conceptQ: Can I use this in production?
A: This is a learning/POC project. For production use, ensure proper security, validation, and error handling are implemented.
Q: How do I compare different architectures?
A: Use git diff to compare the main branch with feat/clean-arch to see different implementation approaches for the same API.
Q: Where should I add new experiments?
A: Create a feature branch (feat/your-experiment-name) to keep experiments organized and isolated.
This project is open source and available under the MIT License.
Created as a reference implementation and POC playground by the development team.
Happy coding! This repository is your sandbox for learning and experimentation. 🎉