Introduction

What is GO?

An overview of GO Shortener, its core philosophy, and design architecture.

What is GO?

GO Shortener is a high-performance, ultra-lightweight, and fully self-contained public URL shortening service built in pure Go. Engineered specifically for resource-constrained environments—such as a small 1 GB RAM Ubuntu VPS hosting multiple services concurrently—GO compiles into a single standalone binary with zero external runtime dependencies.

GO operates with a runtime memory footprint of less than 0.5 MB RAM, making it virtually unnoticeable on low-spec cloud instances.

Core Philosophy

"Simple to use for normal visitors, powerful for registered users, and controllable by administrators."

GO eschews bloat, complex microservices, container orchestrators, and heavyweight database engines in favor of simplicity, reliability, and security:

  1. Zero External Dependencies: No Docker daemon required, no Node.js runtime, no external Redis instances, and no system C library dependencies.
  2. Zero-Compile Deployment: The production server never compiles code. Multi-architecture release binaries (linux/amd64 and linux/arm64) are built and verified automatically in the cloud via GitHub Actions.
  3. Privacy by Design: Visitor IP addresses are hashed using SHA-256 with an identity salt prior to analytics aggregation. Raw IPs are never written to the SQLite database.
  4. Self-Contained Embedded Frontend: HTML templates, CSS styles, client-side scripts, and assets are embedded directly into the Go executable via Go's native embed.FS.

Why No Custom Aliases?

Unlike traditional URL shorteners that let visitors choose vanity aliases (such as go.arcn.online/my-brand), GO strictly issues cryptographically random, collision-resistant identifiers (e.g., go.arcn.online/K8xP2q).

Custom alias selection is intentionally prohibited for public users in accordance with the core design specification.

Rationale:

  • Prevent Vanity Squatting: Disallows malicious users or bots from hoarding common keywords, company names, or popular terms.
  • Phishing & Impersonation Mitigation: Eliminates deceptive links designed to spoof legitimate services (e.g., go.arcn.online/paypal-login).
  • Uniform Database Distribution: Short codes are generated using cryptographically secure random bytes mapped to a URL-safe character set, ensuring uniform index distribution in SQLite.

Architecture at a Glance

ComponentTechnologyDescription
Language & RuntimeGo 1.22+Compiled to native machine code; sub-millisecond route handling
Databasemodernc.org/sqlitePure Go, CGO-free SQLite running with Write-Ahead Logging (WAL)
FrontendPure HTML/JS (embed.FS)Statically compiled inside the binary; zero disk reads in production
AuthenticationDual-EngineNative Email/Password (bcrypt cost 12) + Google OAuth via Firebase
Edge & IngressCloudflare TunnelExposes local port 3000 securely via cloudflared without open VPS ports
Process ManagerLinux systemdAutomatic restarts, boot execution, and resource limits

Next Steps

Copyright © 2026