You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Welcome to bly.li: A scalable Short URL Service in GoLang
Easily create and share memorable links to any webpage with bly.li! Simply input the URL you want to shorten, and our service will generate a concise link that you can share on social media, via email, or anywhere else.
Tech-stack
Key Features:
Scalability: Our architecture is designed for horizontal scaling, allowing services to be easily expanded to meet growing demands.
Statelessness: All services are stateless, ensuring seamless performance even in the event of node failures. This also makes it easy to maintain and update individual components without affecting the overall system.
Flexible Cache Management: Redis can be used as a shared cache cluster or per-node read cache, providing flexibility in scaling depending on your specific needs.
MongoDB Scalability: MongoDB can be scaled using a shared cluster or via a cloud-based solution like MongoDB Atlas.
Configurable Logging: Centralized logging with Loki, configurable log levels and endpoints.
OpenID Connect Integration: Built-in OIDC support for secure authentication.
Metrics & Monitoring: Each service exposes a dedicated Prometheus metrics endpoint for comprehensive monitoring.
Graceful Shutdown: All services support graceful shutdown and cleanup of resources.
Services
Service
Description
Main Port
Metrics Port
Nginx
Reverse-Proxy and Load-balancer
:80/:443
-
Shortn
Shortener-Service - Handles new shortn-requests, manages URL shortening with distributed counter system
:8082
:9082
BlowUp
URL Resolution Service - Resolves short URLs to their original form and handles redirects with configurable status
:8081
:9081
Dasher
Dashboard Service - Provides analytics and management interface for shortened URLs
:8083
:9083
Perso
Personalization Service - Handles user preferences and custom URL management with periodic cleanup
:8084
:9084
Front
Angular-based frontend with modern UI/UX, built with Tailwind CSS
:80
-
Redis
High-performance data store for URL mappings and inter-service communication via Pub/Sub
└──src
└──services
| ├─-front # Angular frontend application
│ ├──shortn # URL shortening service with metrics
│ ├──blowup # URL resolution service with metrics
│ ├──dasher # Analytics dashboard service with metrics
│ └──perso # User personalization service with metrics
└──shared # Shared Go packages and utilities
├──config # Configuration management
├──model # Data models
├──mongo # MongoDB client and operations
├──redis # Redis client and operations
└──utils # Shared utilities
Deployment
Deployment works via Docker. Images are hosted on GitHub Container Registry (ghcr.io). Use the docker-compose.yml as a blueprint for your deployment.
Service
Description
ghcr.io/[owner]/bly.li/front
Frontend Angular application
ghcr.io/[owner]/bly.li/blowup
URL resolution service
ghcr.io/[owner]/bly.li/shortn
URL shortening service
ghcr.io/[owner]/bly.li/dasher
Analytics dashboard service
ghcr.io/[owner]/bly.li/perso
User personalization service
Each service is available with the following tags:
latest: Latest stable release version (from tags)
main: Latest build from the main branch
The images are built for linux/amd64 platform and include automated build caching via GitHub Actions.
License
This project is licensed under the GNU Affero General Public License v3.0. You can view the full license text in the LICENSE file. This license ensures that the code remains free and open, promoting collaboration and sharing within the community.
About
A fast, modern, scalable short-URL platform written in Go