A microservices application that accepts a plain text file upload, counts word frequencies across the file, and renders the results as an interactive word cloud.
- The frontend accepts a file upload (up to 100 MB) and sends it to the core service.
- The core service splits the file into 1 MB chunks and publishes each chunk as a message to RabbitMQ.
- The worker service consumes each chunk, tokenises the text, filters stop words, and upserts word counts into PostgreSQL.
- Once all chunks are processed the worker marks the submission as complete.
- The frontend polls every 2 seconds until the submission is complete, then displays the word cloud and a sortable word count table.
Browser
└── Frontend (React + Vite)
└── /api/* → proxied to Core
└── Core (Spring Boot)
└── RabbitMQ (wordcloud.chunks queue)
└── Worker (Spring Boot)
└── PostgreSQL
| Layer | Technology |
|---|---|
| Frontend | React 19, TypeScript, Vite, Tailwind CSS, TanStack Query, react-dropzone, d3-cloud |
| Core service | Java 21, Spring Boot 3.4.1, Spring AMQP, Spring Data JPA, Flyway |
| Worker service | Java 21, Spring Boot 3.4.1, Spring AMQP, Spring Data JPA |
| Database | PostgreSQL 16 |
| Message broker | RabbitMQ 3.13 |
| Container | Docker + Docker Compose |
- Docker with Docker Compose
That is the only requirement. All services build and run inside containers.
# Clone the repository
git clone <https://github.com/Gereks123/wordcloud.git>
# Build and start all services
docker compose up --buildOnce all containers are healthy, open http://localhost:3000 in your browser.
| Service | URL |
|---|---|
| Frontend | http://localhost:3000 |
| Core API | http://localhost:8080 |
| RabbitMQ management | http://localhost:15672 (guest / guest) |
| PostgreSQL | localhost:5432 (wordcloud / wordcloud) |
Each service can also be run locally outside Docker, provided PostgreSQL and RabbitMQ are reachable (e.g. via docker compose up postgres rabbitmq).
cd wordcloud-core
./gradlew bootRuncd wordcloud-worker
./gradlew bootRuncd wordcloud-frontend
npm install
npm run devThe Vite dev server starts on http://localhost:5173. API calls are proxied to http://localhost:8080 via the Vite config.
.txt, .text, .md, .csv, .log — maximum 100 MB.