Beakon is a full-stack link tracking platform. It lets users create short links, redirect traffic through the backend, and view click analytics (dashboard, per-link analytics, and audience insights).
client/— React frontend (landing page, auth, dashboard, analytics UI)server/— Express + MongoDB API (auth, links, analytics, redirect)
- Frontend: React, React Router, Axios, D3
- Backend: Node.js, Express, MongoDB (Mongoose), JWT (HttpOnly cookies)
- Node.js 18+
- pnpm
- MongoDB connection string
- Install dependencies:
cd client && pnpm installcd ../server && pnpm install
- Configure environment:
- Copy
server/.env.exampletoserver/.env - Update values (
MONGO_URI,JWT_SECRET, and URLs)
- Copy
- Start backend:
cd server && pnpm dev
- Start frontend in a second terminal:
cd client && pnpm start
- Open http://localhost:3000
- Frontend:
http://localhost:3000 - Backend API:
http://localhost:5000 - Redirect host (short links):
http://localhost:5000/<shortCode>
The backend controls public short-link generation via SERVER_URL.
The frontend uses:
REACT_APP_API_URLfor API calls- Optional
REACT_APP_PUBLIC_BASE_URLto override displayed short-link base URL
Workflows are in .github/workflows/:
-
ci.yml- Runs on PRs and pushes to
main - Server: install, env check, lint, test
- Client: install, env check, lint, build
- Runs on PRs and pushes to
-
cd.yml- Runs only after
CIsucceeds onmain - SSH deploys to EC2, installs deps, builds client, restarts PM2 process
- Performs health check with retries
- Runs only after
Set these in GitHub repository secrets:
EC2_HOST(e.g.17.32.298.16orec2-17-32-298-16.eu-north-1.compute.amazonaws.com)EC2_USER(e.g.ec2-user)EC2_SSH_KEYEC2_APP_DIR(e.g./home/ec2-user/beakon)PM2_PROCESS_NAME(e.g.beakon-server)HEALTHCHECK_URL— e.g.https://api.beakn.lol/api/health
- Frontend:
https://beakn.lol - API:
https://api.beakn.lol - Health:
https://api.beakn.lol/api/health
client/README.md— frontend detailsserver/README.md— backend/API details