One Link for Everything You Are
A modern, full-stack link-in-bio platform that helps creators, entrepreneurs, and brands share all their important links through a single, beautiful page. Built with React, Node.js, Express, and PostgreSQL.
git clone https://github.com/yourusername/linkshare.git
cd linksharecd backend
npm installCreate .env file:
NODE_ENV=development
PORT=5000
# Database
DATABASE_URL="postgresql://user:password@localhost:5432/linkshare?schema=public"
# JWT Secrets (use strong random strings)
JWT_ACCESS_SECRET=your-super-secret-access-key-min-32-characters-long
JWT_REFRESH_SECRET=your-super-secret-refresh-key-min-32-characters-long
# Cloudinary (get free account at cloudinary.com)
CLOUDINARY_CLOUD_NAME=your-cloud-name
CLOUDINARY_API_KEY=your-api-key
CLOUDINARY_API_SECRET=your-api-secret
# Frontend URL
FRONTEND_URL=http://localhost:5173Run database migrations:
npx prisma migrate dev
npx prisma generateStart backend server:
npm run devBackend will run on http://localhost:5000
cd ../frontend
npm installCreate .env file:
VITE_API_URL=http://localhost:5000/api
VITE_PUBLIC_URL=http://localhost:5173Start frontend development server:
npm run devFrontend will run on http://localhost:5173
Visit http://localhost:5173 and start building your LinkShare page! 🎉
POST /api/auth/register Register new user
POST /api/auth/login Login user
POST /api/auth/refresh Refresh access token
GET /api/auth/me Get current user [Protected]
GET /api/profile Get user profile [Protected]
PUT /api/profile Update profile [Protected]
POST /api/profile/avatar Upload avatar [Protected]
DELETE /api/profile/avatar Delete avatar [Protected]
GET /api/profile/availability/:username Check username availability
GET /api/links Get all links [Protected]
POST /api/links Create link [Protected]
PUT /api/links/:id Update link [Protected]
DELETE /api/links/:id Delete link [Protected]
POST /api/links/:id/icon Upload link icon [Protected]
PUT /api/links/reorder Reorder links [Protected]
PUT /api/links/:id/toggle Toggle link active status [Protected]
GET /api/public/:username Get public profile
POST /api/public/:username/links/:linkId/click Track link click
GET /api/analytics/overview Get analytics overview [Protected]
GET /api/analytics/links Get link performance [Protected]
- Create a new Web Service on Render
- Connect your GitHub repository
- Configure:
- Build Command:
npm install && npx prisma generate - Start Command:
npm start
- Build Command:
- Add environment variables from
.env.example - Create a PostgreSQL database on Render or use Neon
- Run migrations:
npx prisma migrate deploy
- Create a new project on Vercel
- Connect your GitHub repository
- Configure:
- Framework Preset: Vite
- Root Directory:
frontend - Build Command:
npm run build - Output Directory:
dist
- Add environment variables:
VITE_API_URL=https://your-backend-url.com/api
VITE_PUBLIC_URL=https://your-frontend-url.com
- Add redirect rule in
vercel.json:
{
"rewrites": [
{ "source": "/(.*)", "destination": "/index.html" }
]
}Create netlify.toml:
[[redirects]]
from = "/*"
to = "/index.html"
status = 200Edit frontend/src/utils/platforms.js:
export const SOCIAL_PLATFORMS = [
{ id: 'yourplatform', name: 'Your Platform', icon: 'fa-brands fa-youricon', color: '#HEXCOLOR' },
// ... existing platforms
];Edit frontend/tailwind.config.js:
theme: {
extend: {
colors: {
primary: {
// Your custom colors
},
},
},
}Contributions are what make the open-source community amazing! Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request