How kaiz-dev/mini-blog works
Mini Blog is a full-stack publishing and community platform: a React SPA presents blog, category, contact, and account workflows over a Spring Boot REST API, with STOMP/WebSocket for live comments. Blog discovery supports paginated and cursor-based search; authors manage posts, readers participate in comments, and administrators manage contacts. Backend services apply domain logic and persist through repositories. The README documents PostgreSQL, Redis, and optional WebAuthn; only sampled controller, auth, and live-comment implementations were inspected, so unsampled service wiring is represented conservatively.
Main entry points: client.js HTTP API client · repository JPA repositories · index.js React application · BlogController.java Blog endpoints
Components 23
React experience
- React application
ui/src/components/App/index.js - Blog browsing
ui/src/components/Blog/index.jsx - Blog detail
ui/src/components/BlogDetail/index.jsx - Sign in and register
ui/src/pages/SignInPage.jsx - Contact workflows
ui/src/components/Contact/index.jsx - HTTP API client
ui/src/api/client.js
Publishing and contacts
- Blog endpoints
server/miniblog/src/main/java/com/miniblog/controller/BlogController.java - Blog services
server/miniblog/src/main/java/com/miniblog/service/impl/BlogServiceImpl.java - Category endpoints
server/miniblog/src/main/java/com/miniblog/controller/CategoryController.java - Category services
server/miniblog/src/main/java/com/miniblog/service/impl/CategoryServiceImpl.java - Contact endpoints
server/miniblog/src/main/java/com/miniblog/controller/ContactController.java - Contact services
server/miniblog/src/main/java/com/miniblog/service/impl/ContactServiceImpl.java
Identity and security
- Authentication endpoints
server/miniblog/src/main/java/com/miniblog/controller/AuthController.java - Authentication services
server/miniblog/src/main/java/com/miniblog/service/impl/AuthServiceImpl.java - JWT and WebAuthn
server/miniblog/src/main/java/com/miniblog/config/SecurityConfig.java - Redis blacklist
Live comments
- Live comment client
ui/src/hooks/useLiveComments.js - Comment endpoints
server/miniblog/src/main/java/com/miniblog/controller/CommentController.java - Comment services
server/miniblog/src/main/java/com/miniblog/service/impl/CommentServiceImpl.java - STOMP WebSocket
server/miniblog/src/main/java/com/miniblog/config/WebSocketConfig.java
Backend persistence
- JPA repositories
server/miniblog/src/main/java/com/miniblog/repository - PostgreSQL
Other components
- Visitor or member
Connections 29
- Visitor or member → React application: uses
- React application → Blog browsing: presents
- React application → Sign in and register: presents
- React application → Contact workflows: presents
- Blog browsing → HTTP API client: requests posts
- Blog detail → HTTP API client: requests detail
- Sign in and register → HTTP API client: requests auth
- Contact workflows → HTTP API client: requests contacts
- HTTP API client → Blog endpoints: sends REST
- HTTP API client → Authentication endpoints: sends REST
- HTTP API client → Contact endpoints: sends REST
- Blog endpoints → Blog services: delegates
- Blog endpoints → Comment services: lists comments
- Category endpoints → Category services: delegates
- Contact endpoints → Contact services: delegates
- Authentication endpoints → Authentication services: delegates
- JWT and WebAuthn → Authentication endpoints: protects
- Blog services → JPA repositories: reads and writes
- Category services → JPA repositories: reads and writes
- Contact services → JPA repositories: reads and writes
- Authentication services → JPA repositories: reads and writes
- JPA repositories → PostgreSQL: persists
- Live comment client → HTTP API client: loads comments
- Live comment client → STOMP WebSocket: connects STOMP
- STOMP WebSocket → Comment endpoints: dispatches messages
- Comment endpoints → Comment services: delegates
- Comment endpoints → STOMP WebSocket: broadcasts updates
- Comment services → JPA repositories: reads and writes
- Authentication services → Redis blacklist: revokes tokens