A comprehensive blog platform built with Spring Boot and Kotlin, featuring a modern web interface, REST API, and advanced blogging capabilities.
- 📝 Post Management: Create, read, update, and delete blog posts
- 🖼️ Image Attachments: Upload up to 3 images per post with automatic storage
- 👥 User Management: User profiles with customizable display names and bios
- 📂 Category System: Organize posts with hierarchical categories
- 💬 Comment System: Nested comments with full CRUD operations
- ❤️ Like System: Like posts and track engagement
- 🔍 Search & Filter: Search posts by title, author, or category
- 🏗️ Domain-Driven Design: Clean architecture with separate domain, application, and infrastructure layers
- 🔄 RESTful API: Comprehensive REST endpoints with OpenAPI documentation
- 🌐 Web Interface: Modern, responsive Korean-language web UI
- 📁 File Management: Image upload and download with proper MIME type handling
- 🧪 Comprehensive Testing: Unit, integration, and API tests with MockK and Kotest
- 📊 Monitoring: Spring Boot Actuator endpoints for health and metrics
- Language: Kotlin 2.1.20
- Framework: Spring Boot 3.5.0
- Build Tool: Gradle 8.8 with Kotlin DSL
- JDK: OpenJDK 21 (Temurin)
- Web: Spring Boot Starter Web
- JSON: Jackson Module for Kotlin
- Documentation: SpringDoc OpenAPI UI (Swagger)
- Testing: Spring Boot Test, MockK, Kotest, SpringMockK
- Utilities: Kotlin Reflection, ByteBuddy
- JDK 21 (Temurin recommended)
- IntelliJ IDEA (recommended IDE)
- Git for version control
git clone https://github.com/doljae/vibe-coding.git
cd vibe-coding./gradlew clean build./gradlew bootRunThe application will start on http://localhost:8080
- Web Interface: http://localhost:8080
- API Documentation: http://localhost:8080/swagger-ui/index.html
- Health Check: http://localhost:8080/actuator/health
The application includes a modern, responsive web interface with the following pages:
- Home Page (
/): Welcome page with feature overview - Posts List (
/posts.html): Browse all blog posts - Post Detail (
/post-detail.html): View individual posts with comments and likes - Create Post (
/post-form.html): Create new blog posts with image uploads
GET /api/posts- Get all postsPOST /api/posts- Create a new postGET /api/posts/{id}- Get a specific postPUT /api/posts/{id}- Update a postDELETE /api/posts/{id}- Delete a postPOST /api/posts/{id}/images- Add image to postDELETE /api/posts/{id}/images/{imageId}- Remove image from postGET /api/posts/{id}/images/{imageId}- Download image
GET /api/users- Get all usersPOST /api/users- Create a new userGET /api/users/{id}- Get user by IDPUT /api/users/{id}- Update userDELETE /api/users/{id}- Delete user
GET /api/posts/{postId}/comments- Get comments for a postPOST /api/posts/{postId}/comments- Create a commentPUT /api/comments/{id}- Update a commentDELETE /api/comments/{id}- Delete a comment
GET /api/categories- Get all categoriesPOST /api/categories- Create a categoryPUT /api/categories/{id}- Update a categoryDELETE /api/categories/{id}- Delete a category
POST /api/posts/{postId}/like- Like a postDELETE /api/posts/{postId}/like- Unlike a postGET /api/posts/{postId}/likes- Get likes for a post
./gradlew test- Unit Tests: Domain logic and service layer tests
- Integration Tests: Full application context tests
- API Tests: HTTP endpoint testing with test files in
api-tests/
The project includes comprehensive test coverage with:
- Domain entity validation tests
- Service layer business logic tests
- Repository implementation tests
- Controller integration tests
- End-to-end feature tests
src/
├── main/
│ ├── kotlin/com/example/vibecoding/
│ │ ├── application/ # Application services
│ │ │ ├── category/ # Category business logic
│ │ │ ├── comment/ # Comment business logic
│ │ │ ├── post/ # Post business logic
│ │ │ └── user/ # User business logic
│ │ ├── domain/ # Domain models and interfaces
│ │ │ ├── category/ # Category domain
│ │ │ ├── comment/ # Comment domain
│ │ │ ├── post/ # Post domain
│ │ │ └── user/ # User domain
│ │ ├── infrastructure/ # Infrastructure implementations
│ │ │ ├── repository/ # In-memory repository implementations
│ │ │ └── storage/ # File storage implementations
│ │ ├── presentation/ # Web and API layer
│ │ │ ├── controller/ # REST controllers
│ │ │ ├── dto/ # Data transfer objects
│ │ │ └── exception/ # Exception handling
│ │ └── VibeCodingApplication.kt
│ └── resources/
│ ├── static/ # Web UI assets (HTML, CSS, JS)
│ └── application.yml # Application configuration
└── test/
└── kotlin/com/example/vibecoding/
├── application/ # Service tests
├── domain/ # Domain tests
├── infrastructure/ # Infrastructure tests
├── integration/ # Integration tests
└── presentation/ # Controller tests
- Domain-Driven Design (DDD): Clear separation of concerns
- Clean Architecture: Dependency inversion and layer isolation
- Repository Pattern: Abstracted data access
- Service Layer: Business logic encapsulation
- Kotlin Conventions: Idiomatic Kotlin code
- Conventional Commits: Standardized commit messages
- Test-Driven Development: Comprehensive test coverage
- Type Safety: Leveraging Kotlin's type system
./gradlew clean # Clean build artifacts
./gradlew build # Build the project
./gradlew test # Run tests
./gradlew bootRun # Run the application
./gradlew bootJar # Create executable JAR
./gradlew check # Run all checks/actuator/health- Application health status/actuator/info- Application information/actuator/metrics- Application metrics
- Configured with structured logging
- Log files stored in
logs/vibe-coding.log - Configurable log levels per package
The project includes comprehensive API test files in the api-tests/ directory:
blog-api-tests.http- Complete blog workflow testscomment-api-tests.http- Comment system testslike-feature-tests.http- Like functionality testsquick-test.http- Quick development tests
These can be run directly in IntelliJ IDEA or any HTTP client.
- Branching: Create feature branches with descriptive English names
- Commits: Follow Conventional Commits format
- Testing: Ensure all tests pass before submitting
- Code Style: Follow Kotlin coding conventions
- Documentation: Update relevant documentation
feat: add image upload functionality to postsfix: resolve comment deletion permission issuedocs: update API documentation with new endpointstest: add integration tests for like feature
- Port Already in Use: Change server.port in application.yml
- File Upload Issues: Check app.image.storage.path configuration
- Test Failures: Ensure ByteBuddy agent is properly configured
Run with debug logging:
./gradlew bootRun --args='--logging.level.com.example.vibecoding=DEBUG'This project is licensed under the MIT License - see the LICENSE file for details.
Vibe Coding - Building a community where developers share knowledge and connect through code.