There’s a vast number of link shorteners out there, and like any good dev who enjoys learning by doing, I decided to build my own.
What I did
I designed and built the REST API in Go, and also developed the frontend using Next.js—which was my biggest challenge.
On the backend, I integrated Firebase Auth through the Firebase Admin SDK so users can authenticate and manage their own links. I connected the API to a PostgreSQL database using GORM, and I added Redis caching to some of the endpoints to speed up responses.
On the frontend, I used this project to learn and apply the Next.js App Router. Creating UIs for short links creation and management, user login and sign up, e.g.
Project’s structure
The project is split into two main parts that communicate over HTTP:
- Frontend: Built with Next.js, React and TypeScript, using the App Router. It handles the user interface and sign-in flow.
- REST API: Built with Go. It validates Firebase tokens with the Admin SDK, handles link creation and management, and serves the redirects.
- Data layer: PostgreSQL (accessed through GORM) stores users’ data and links, while Redis caches responses on selected endpoints.

