LinkSecure is a secure file sharing platform with password-protected links, short links, analytics, and role-based access control.
- Secure upload and download workflows
- Public and protected sharing links
- Link expiry and revocation
- Optional short-link flow
- File activity history and analytics dashboard
- Local or Azure Blob storage support
- Email integration for auth and notifications
- Frontend: React, TypeScript, Vite, Tailwind CSS, shadcn/ui
- Backend: Node.js, Express, TypeScript, Mongoose
- Database: MongoDB
- Storage: Local filesystem or Azure Blob Storage
.
|-- client/ # Frontend app
|-- server/ # Backend API and services
|-- README.md
- Node.js 18+
- npm 9+
- MongoDB instance
- Install client dependencies:
cd client
npm install- Install server dependencies:
cd ../server
npm install-
Create server environment file at
server/.env. -
Start backend:
cd server
npm run dev- Start frontend in a second terminal:
cd client
npm run devDefault local URLs:
- Frontend:
http://localhost:8080 - Backend API:
http://localhost:5000
Set these in server/.env.
PORT=5000
NODE_ENV=development
MONGO_URI=mongodb://localhost:27017/linksecure
JWT_SECRET=replace_with_a_strong_secret
# local | azure
STORAGE_TYPE=localBASE_URL=http://localhost:5000
CLIENT_URL=http://localhost:8080
FRONTEND_URL=http://localhost:8080
PUBLIC_BASE_URL=http://localhost:5000
CLIENT_BASE_URL=http://localhost:8080AZURE_STORAGE_ACCOUNT_NAME=your_account_name
AZURE_STORAGE_ACCOUNT_KEY=your_account_key
AZURE_STORAGE_CONTAINER_NAME=your_containerGOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
OAUTH_REDIRECT_URI=http://localhost:5000/api/auth/google/callback
AUTH_GOOGLE_ONLY=falseUse one provider setup. SMTP example:
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your_email
SMTP_PASS=your_app_password
EMAIL_FROM="LinkSecure <noreply@example.com>"
EMAIL_SERVICE=smtpAlternative provider keys used by the codebase:
SENDGRID_API_KEY=...
RESEND_API_KEY=...
MAILGUN_API_KEY=...
MAILGUN_DOMAIN=...SAS_DEFAULT_EXPIRY_HOURS=24
SAS_MIN_EXPIRY_HOURS=1
SAS_MAX_EXPIRY_HOURS=168
SAS_PERMISSIONS=rSet this in client/.env when not using local defaults:
VITE_API_URL=http://localhost:5000npm run dev- start Vite dev servernpm run build- production buildnpm run preview- preview built appnpm run lint- run ESLint
npm run dev- start API in watch modenpm run build- compile TypeScriptnpm run start- run compiled APInpm run cleanup:trash- cleanup scriptnpm run test:email- email service test script
Client:
cd client
npm run buildServer:
cd server
npm run build
npm run start- Keep all secrets in platform environment variables.
- Do not commit
.envfiles. - Ensure frontend URL variables and backend base URL variables are aligned.
- If using Azure storage, verify account, container, and key permissions.
This project is provided as-is by the repository owner.