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.