How hieplp/url-shorten works
Project type and purpose
• This is a full-stack, microservice-based URL Shortener application.
• Front-end: a Vue 3 SPA (web-services).
• Back-end: a set of Java/Vert.x microservices—API Gateway, Auth, User, Shortener, Statistic—plus a Common library.
• Supporting infrastructure: MariaDB, Kafka, Elasticsearch, Logstash, and Docker Compose orchestration.
File structure
• Top-level microservice folders:
• auth-services
• user-services
• shorten-services
• statistic-services
• gateway-services
• common-services (shared library)
• Front-end: web-services.
• Docker: docker-compose.yml and service-specific Dockerfiles; extensions for ELK stack.
• Each service uses the same pattern: Application entry, config modules, controllers, handlers, repositories, services, Kafka consumers/producers (where applicable).
• common-services contains shared annotations, config classes, models, payloads, repository bases, utilities.
• SQL schemas under docker/sql.
• CI/build scripts: build.sh, gradlew, Dockerfiles.
Insights from README
• Microservices communicate via REST through the Gateway; Kafka for click events; Logstash forwards statistics from MariaDB to Elasticsearch; UI uses Axios to call the Gateway.
• Databases: three MariaDB schemas (shortenUser, shortenUrl, shortenStatistic).
• Elasticsearch + Kibana for analytics and monitoring.
Elements
• Clear, consistent labels for each service, database, and external component.
• UI layer (e.g., blue rectangle)
• API layer (Gateway – green)
• Microservices (e.g., orange)
• Shared library (e.g., gray note)
• Annotations for protocols (HTTP/JSON, JDBC/jOOQ, Kafka topics, SQL, Elasticsearch queries).