October, 26th 2025 3 min read
Java-Powered Dynamic Blog with Spring Boot & AWS

Java Blog Project: Full-Stack Portfolio Website with Dynamic Blog Functionality

🌐 Live Demo

View Live Project

GitHub Repository

GitHub - Java Blog Project

Overview

This project showcases a professional portfolio website integrated with a fully dynamic blog system built using modern Java enterprise technologies. While the main site (Home, About, Skills, Portfolio, Contact) provides a static yet responsive presentation of my work, the blog functions as a full CRUD web application, enabling content creation, user interaction, and secure administration.

The backend is powered by Spring Boot with JPA/Hibernate for ORM, MySQL for data persistence, and Spring Security for robust authentication and role-based authorization. The frontend uses Thymeleaf for server-side rendering, Bootstrap 5 for responsive design, and enhanced UX tools like Summernote (WYSIWYG editor), Prism.js (syntax highlighting), and jQuery.

Deployment is containerized using Docker and hosted on AWS EC2, ensuring scalability and environment consistency.


Key Features

✅ Dynamic Blog System

  • Paginated blog post grid with thumbnails, titles, dates, categories, and tags.
  • Clean URL routing using post slugs (e.g., /blog/java-spring-boot-intro).
  • Full-text post view with syntax-highlighted code blocks and embedded media.
  • Filter posts by category or tag via interactive UI.

User Engagement

  • Comment system allowing:
    • Registered users to comment after login.
    • Guests to comment with name and email.
  • Reply functionality for threaded discussions.
  • Edit and delete own comments (with session validation).
  • Admin moderation capabilities.

Secure Authentication

  • Role-based access control: Admin, Editor, Author, Subscriber.
  • Hierarchical permissions (e.g., Admin inherits all lower roles).
  • Login, logout, registration, and “Remember Me” functionality.
  • “Forgot Password” flow with email reset token.
  • Custom LoginSuccessHandler to track last login time.

User Profiles

  • Edit personal information (name, bio, social links).
  • Upload and manage profile picture.
  • View own posts and comments.

🖋️ Rich Content Management

  • WYSIWYG editor (Summernote) for creating and editing blog posts.
  • Support for:
    • Text formatting (bold, italic, lists, headings).
    • Image uploads with server-side storage.
    • Code block embedding with Prism.js highlighting.
  • Draft saving and scheduled publishing.

🛠️ Admin Dashboard

  • Full CRUD operations for blog posts.
  • User management: view, edit roles, disable accounts.
  • Comment moderation: approve, edit, delete.
  • Real-time activity monitoring.

🏗️ Architecture & Technologies

🖥️ Frontend

TechnologyPurpose
ThymeleafServer-side HTML templating
Bootstrap 5Responsive UI framework
JavaScript/jQueryDOM manipulation & interactivity
SummernoteRich text editor
Prism.jsCode syntax highlighting

⚙️ Backend

TechnologyPurpose
Java 17Core language
Spring BootWeb framework & dependency injection
Spring MVCREST and form handling
Spring Data JPAORM & database interaction
Spring SecurityAuthentication & authorization
MySQLRelational database
BCryptPassword hashing

☁️ Deployment & DevOps

TechnologyPurpose
DockerContainerization
AWS EC2Cloud hosting
Docker SecretsSecure credential management

UI/UX Design

Leveraged premium-quality templates from HTMLCodex.com:

  • FreeFolio – For the personal portfolio layout.
  • Bloggy – For blog structure and styling.

These templates were customized to ensure visual consistency across the static portfolio and dynamic blog, creating a seamless user experience.


🧩 Challenges & Solutions

ChallengeSolution
Summernote image upload conflictsImplemented custom file upload handler with UUID-named files and session-safe deletion logic
Role hierarchy in Spring SecurityUsed RoleHierarchyImpl to define parent-child role relationships
CSRF protection with Thymeleaf formsIntegrated th:action with Spring’s CSRF token auto-inclusion
Secure credential storageUsed Docker secrets mounted as files, not environment variables

Future Improvements

  • Email notifications for new comments (via JavaMail).
  • Newsletter subscription system with confirmation workflow.
  • CI/CD pipeline using GitHub Actions.
  • Orchestration with Docker Swarm or Kubernetes.
  • Admin dashboard SPA using React/Vue for better UX.

Project Structure (Simplified)

plaintext
12345678910111213
      src/
├── main/
│   ├── java/com/example/blog/
│   │   ├── controller/
│   │   ├── model/
│   │   ├── repository/
│   │   ├── service/
│   │   └── security/
│   └── resources/
│       ├── templates/
│       ├── static/
│       └── application.yml
└── Dockerfile
    

How to Run Locally

  1. Clone the repository:
    bash
    1
          git clone https://github.com/yourusername/java-blog-project.git
        

Set up MySQL database and update application.yml. Build with Maven: ./mvnw clean package

Run with Docker: docker build -t java-blog . docker run -p 8080:8080 java-blog

Access at http://localhost:8080

Conclusion

This project demonstrates my ability to design and implement a secure, scalable, and maintainable full-stack web application using enterprise-grade Java technologies. It blends professional frontend design with robust backend logic, showcasing skills in authentication, database modeling, API design, deployment, and UX optimization — all essential for modern web development.

Ideal for developers seeking to build content-driven platforms with Java, this architecture serves as a strong foundation for blogs, CMS, or enterprise dashboards.