React + Vite Frontend Client for the Link-Snap URL Platform, optimized and containerized with Nginx.
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 Technical Features Served:
This container uses a multi-stage Docker build to serve the static bundle with security-hardened Nginx configurations:
| Stage | Purpose | Base Image |
|---|---|---|
| Builder | Installs dependencies, runs Vite compiler | node:24-alpine |
| Production | Serves static assets using Nginx | nginx:1.27-alpine |
Key Container Optimizations:
linksnap user for security.nginx.conf fallback rule to prevent 404 errors on subroutes.docker pull tanaymondal/linksnap-frontend:latest
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
Open http://localhost.
Because React is compiled to client-side static assets, frontend environment variables must be injected as build arguments during docker build:
| Build Arg | Description | Default |
|---|---|---|
VITE_BASE_URL | Base canonical domain of the client app | https://lksnp.qzz.io |
VITE_DOMAIN | Target short-link cookie domain | lksnp.qzz.io |
VITE_API_URL | Route 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 .
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.
linksnap system user.docker pull tanaymondal/linksnap-frontend-beta:sha-eec4ff2