HUB
Sign inSign up

tanaymondal/linksnap-frontend

By tanaymondal

•Updated 5 months ago

Advanced URL Shortening, Analytics, & Bio-Link Platform with Stealth Security.

Image
Web servers
Content management system
Web analytics
0

334

tanaymondal/linksnap-frontend repository overview

React + Vite Frontend Client for the Link-Snap URL Platform, optimized and containerized with Nginx.

License: MIT Version Docker Frontend Docker Backend


This repository contains the containerized production-ready build of the Link-Snap client. It is a Single Page Application (SPA) designed to communicate with the linksnap-backend API.

Key Features Served:

  • Intuitive Dashboard: Manage short links, custom aliases, and expiration configurations.
  • Bio-Link Page Builder: Drag-and-drop "Linktree-style" profile manager.
  • Geographic & Device Analytics: Interactive dashboards rendered via Recharts.
  • Password/Targeting Config: Simple UI to toggle device-based redirections, password protection, and click limits.
  • Progressive Web App: Full PWA support with install prompts, service worker caching, and offline status indicators.

⁠🏗️ Architecture

This container uses a multi-stage Docker build to serve the static bundle with security-hardened Nginx configurations:

StagePurposeBase Image
BuilderInstalls dependencies, runs Vite compilernode:24-alpine
ProductionServes static assets using Nginxnginx:1.27-alpine

Key Container Optimizations:

  • ✅ Unprivileged execution: Runs under a non-root linksnap user for security.
  • ✅ Single-Page Application routing: Custom nginx.conf fallback rule to prevent 404 errors on subroutes.
  • ✅ Compact footprints: Minimal footprint image (~45MB) with all node devDependencies completely excluded.

⁠🐳 Quick Start

⁠1. Pull the Image
docker pull tanaymondal/linksnap-frontend:latest
⁠2. Run the Container

The frontend requires configuration baked in at build time or resolved dynamically via reverse proxy (such as a CDN BFF/Gateway). In standard setups, you expose port 80:

docker run -d \
  -p 80:80 \
  --name linksnap-frontend \
  tanaymondal/linksnap-frontend:latest
⁠3. Access the Application

Open http://localhost.


⁠⚙️ Build Arguments (Baked into Client JS)

Because React is compiled to client-side static assets, frontend environment variables must be injected as build arguments during docker build:

Build ArgDescriptionDefault
VITE_BASE_URLBase canonical domain of the client apphttps://lksnp.qzz.io
VITE_DOMAINTarget short-link cookie domainlksnp.qzz.io
VITE_API_URLRoute path prefix for backend API/api

Example of rebuilding locally with custom targets:

docker build \
  --build-arg VITE_BASE_URL="http://localhost:5000" \
  --build-arg VITE_DOMAIN="localhost" \
  --build-arg VITE_API_URL="/api" \
  -f client/Dockerfile -t my-linksnap-frontend .

⁠📦 Docker Compose Topology (Full Stack)

To run the frontend together with the backend API and MongoDB/Redis stack, refer to the Compose template in the Link-Snap Backend Docker Hub Page⁠.


⁠🛡️ Security

  • Non-Root Execution: Container process permissions are locked to the linksnap system user.
  • Security Headers: Custom Nginx configs prevent clickjacking, MIME sniffing, and enforce strict HTTPS.

Tag summary
Recent tags
Content type
Image
Digest
sha256:20b1633d9…
Size
23.2 MB
Last updated
5 months ago
docker pull tanaymondal/linksnap-frontend:latest