How callicoder/spring-security-react-ant-design-polls-app works
Project type and purpose
• This is a full-stack polling application (“Polls App”) that lets users sign up, authenticate (via JWT), create polls, vote, and view results.
• The back end is a monolithic Spring Boot application with REST APIs, Spring Security (JWT), MySQL persistence, and Flyway-like migrations (db/migration).
• The front end is a React single-page application styled with Ant Design, served by a lightweight Nginx container in production.
File structure
Top-level directories/files:
• polling-app-client: React code, Webpack overrides, public assets, service worker, Nginx config, Dockerfile
• polling-app-server: Java source, Maven wrapper, security config, controllers, services, repositories, migration scripts, Dockerfile
• deployments: Kubernetes manifests (Kustomize, MySQL, frontend, backend)
• docker-compose.yml & minikube.txt: local multi-container orchestration
• .gitignore, Readme.md: repo-wide docs and ignores
Architectural hints:
• separation of concerns between client, server, and database
• use of JWT for stateless auth
• containerization via Dockerfiles & orchestration via Docker Compose or Kubernetes
• Spring MVC + service + repository layers (typical layered monolith)
README for additional insights
• Walkthrough series on building back-end (Spring Boot + Spring Security + JWT + MySQL) and front-end (React + Ant Design).
• Ports: 8080 for APIs, 3000 for client.
• Default roles loaded via data.sql.
Elements
• Labels: name each component (e.g., “React SPA”, “Nginx Proxy”, “Spring Boot API”)
• Blue rectangles for user-facing components (Browser, SPA)
• Green rectangles for services (Nginx, API)
Layer 1: User’s Browser
Layer 2: React SPA (static assets), served by Nginx container
Layer 3: Request routing (Nginx ↔ API Proxy)
Layer 4: Spring Boot Monolith
• Security filter chain (JWTAuthenticationFilter → JwtTokenProvider)
• Controllers (Auth, Poll, User)
• Services → Repositories
Layer 5: MySQL Database (with migrations & seed data)
Layer 6: DevOps / Infra
• Docker Build & Push (two images)
• docker-compose.yml (services + network + volumes)
• Kubernetes manifests (mysql-deployment, client/server deployments, kustomization)
Summary:
• Inside API, subdivide into Security layer, Controllers, Services, Repositories.
• JWT token flow on the path between client and API.
• Surround with an orchestration boundary indicating Docker Compose/Kubernetes.