← Back to Projects

URL Shortener Service

NestJS Redis NanoID DigitalOcean Postman

An internal URL shortener service built for company employees, featuring high-speed long URL retrieval, server-side redirects, and company-wide error handling integration.

OVERVIEW

Built during my internship at Token Financial Technologies, this is an internal URL shortener service designed to streamline link sharing within the company's daily workflow. Employees can generate short codes for long URLs and share them across internal tools without managing unwieldy links.


TECHNICAL HIGHLIGHTS

Redis as Primary Database — Rather than a relational database with a caching layer on top, Redis was chosen as the sole data store. Given the nature of the service (high-frequency short code lookups with no complex relational data), this eliminated unnecessary overhead and maximised retrieval speed.

Server-Side Redirects — Redirects are handled on the server rather than the client to prevent XSS vulnerabilities that could arise from client-side URL injection.

NanoID Short Code Generation — Short codes are generated using NanoID, providing collision-resistant, URL-safe identifiers without the overhead of UUIDs.

Company Module Integration — Integrated internal company modules for consistent error handling, keeping the service aligned with the existing codebase conventions.


TESTING & HANDOVER

E2E tests were implemented prior to shipping to ensure reliability and correctness of the full request-response cycle. The project was handed over to the DevOps lead for deployment alongside detailed API documentation prepared with Postman.


LATER ADDITIONS

After my internship, I added a basic user interface to the service and deployed it on a VPS.