The Origin Story
A third-party URL shortening service shut down overnight. No warning.
Every shortened link across CareerLabs broke simultaneously - in marketing campaigns, email sequences, HR documents, student onboarding flows, and sales decks. Conversion tracking was severed. Teams couldn't reach their own links.
This was a mission-critical incident. I had days to fix it.
Phase 1: The MVP (Days)
The immediate goal was simple: restore URL shortening and redirect traffic. I built a functional MVP in days - Express.js backend, basic Vue.js interface - restoring core operations and bringing broken links back to life with new short codes.
Once the fire was out, a bigger opportunity came into focus: the company now had a URL shortener it owned entirely. What should it become?
Phase 2: The Enterprise Platform
What started as an emergency fix became the backbone for marketing, HR, and sales link management across the entire organization - serving hundreds of thousands of URL redirects across all teams.
Key Features
| Feature | Detail |
|---|---|
| URL Shortening | Long URLs to short, shareable links with optional custom aliases |
| Role-Based Access Control | Granular permissions - different departments own and manage different links |
| Advanced Click Analytics | Click-through rates, IP geolocation, browser, device, and referrer breakdowns |
| Password Protection | Sensitive links secured with passwords for confidential use cases |
| Conflict Resolution | Detects duplicate custom shortlink requests; surfaces conflicts before they cause problems |
| Licensing & Payment Integration | Monetization layer added to position the tool as a potential external SaaS product |
Technical Architecture
Backend: Node.js · Express.js · Sequelize ORM
Frontend: Vue.js · Vuetify
Databases: PostgreSQL + MongoDB (hybrid)
Infrastructure: AWS EC2
The Hybrid Database Architecture
This was the most consequential design decision - and the most deliberate.
PostgreSQL (via Sequelize ORM) handles all relational data: users, links, roles, permissions, password protection records. This is structured data with complex relationships - foreign keys, transactions, referential integrity. A relational database is exactly the right tool.
MongoDB handles click analytics. Every redirect fires a write: timestamp, short code, destination, IP, geolocation, browser, device, referrer. This is write-heavy, schema-flexible (different analytics fields for different link types), and queried primarily through aggregations at scale. A document store handles this pattern far better than a normalized relational schema.
The result: neither database is being asked to do something it wasn't designed for. PostgreSQL runs fast, clean relational queries. MongoDB absorbs high-volume analytics writes and powers the reporting dashboard with aggregation pipelines.
High-Performance Redirect Engine
The redirect path - short.co/xyz → destination URL - is the most latency-sensitive operation in the system. Every millisecond on the redirect adds perceived latency for end users and can affect conversion rates on marketing links. The lookup was optimized for sub-millisecond resolution from short code to destination, with indexed queries ensuring consistent performance as the link database grew.
RBAC for Multi-Department Use
Different teams have different access needs. Marketing owns campaign links. HR owns onboarding links. Sales owns prospect-facing links. The RBAC system enforces ownership and access at the link level - a sales rep can't accidentally edit or delete a marketing team's links, and vice versa.
Development Process
- MVP in days - Restored core URL shortening and redirection; new short codes mapped over broken links from the shutdown vendor
- Auth & RBAC - Introduced authentication, user accounts, and role-based access for multi-department link ownership
- Analytics layer - Added MongoDB-backed click analytics with geolocation (IP lookup), device, browser, and referrer tracking
- Advanced features - Custom aliases, password protection, and duplicate shortlink conflict detection
- Productization - Payment and licensing infrastructure for potential external SaaS launch
Quantified Impact
| Metric | Result |
|---|---|
| Time to MVP | Days (emergency response to vendor shutdown) |
| Total redirects served | Hundreds of thousands |
| Departments using the platform | Marketing, HR, Sales |
| Vendor dependency | Eliminated entirely |
| Analytics visibility | Zero (before) → click-level geolocation, device, browser data |
Impact & Takeaway
This project demonstrates two things simultaneously: the ability to execute fast under pressure, and the discipline to build it right once the immediate crisis is resolved.
The hybrid PostgreSQL + MongoDB architecture is a reusable model for any system where transactional correctness and analytical scale live at different layers. The RBAC model made a single internal tool usable by three different departments with different access patterns - without chaos.
And the fact that it was scoped for potential SaaS launch shows what's possible when you build with the right foundations from the start, even during a crisis.
Crisis → functional MVP in days → hundreds of thousands of redirects. The internal tool that replaced a dead vendor and became organizational infrastructure.
Tags: URL shortener · link management · click analytics · IP geolocation · short links · campaign tracking · link analytics · marketing tools · URL management platform