Case study 04 / 04
- Type
- Full stack
- Year
- Ongoing
- Status
- Live
- Core stack
- Java, Spring Boot, React
01Overview
Overview
A full-stack URL shortener built with Spring Boot, React and PostgreSQL. Long URLs become compact TinyTrail links that redirect in under 50 ms and count every click.
Redirects served
Average redirect time
Secured management API
02The problem
A shortener lives or dies on redirect speed, and it still has to record analytics on every click without slowing that redirect down.
03The approach
A Spring Boot REST API issues short codes and serves redirects, PostgreSQL stores links and click counts, and JWT secures the management API. The React frontend runs on Netlify with the backend on Render.
04How it works
How a link resolves
- 01
Shorten
POST /api/v1/shorten with an originalUrl and get a compact short URL back.
- 02
Resolve
GET /{shortCode} looks the destination up in PostgreSQL.
- 03
Redirect
A 302 sends the visitor straight on to the original URL.
- 04
Count
Every click is recorded against its link for analytics.
05Under the hood
Under the hood
01
A small, clean API
Two endpoints do the real work: one to create a link and one to resolve it, documented and easy to integrate.
02
Click tracking
Each shortened link keeps its own click count, so you can see which links are actually being used.
03
Deployed end to end
React on Netlify, Spring Boot on Render, PostgreSQL underneath and secrets kept out of the code.
06Stack
Technology stack
- Java
- Spring Boot
- React
- PostgreSQL
- JWT
- REST APIs
- Docker
- Render
- Netlify