A modern link-in-bio tool that helps you organize, manage, and share all your important links with a single, shareable URL. Built with Next.js 16 and MongoDB.
- Custom Handles — Claim your unique username and get a personalized link page at
/yourhandle - Unlimited Links — Add as many links as you need with custom titles
- JWT Authentication — Secure signup and login with JWT tokens (1-day expiry)
- Password Security — Passwords are hashed with bcrypt before storage
- Email Password Reset — Forgot password flow with 6-digit OTP sent via email (SMTP)
- Protected API Routes — API endpoints require valid JWT tokens for authenticated operations
- Link Management — Add and delete links from your dashboard
- Responsive Design — Works on all devices
| Technology | Version |
|---|---|
| Next.js | 16.0.10 |
| MongoDB | 7.0.0 |
| Tailwind CSS | 4.0 |
| jsonwebtoken | 9.0.3 |
| bcryptjs | 3.0.3 |
| nodemailer | 7.0.13 |
| AWS EC2 | - |
Database is deployed on AWS EC2.
- Node.js 18.17 or later
- MongoDB database (local or MongoDB Atlas)
-
Clone the repository
git clone https://github.com/yourusername/linkium.git cd linkium -
Install dependencies
npm install
-
Set up environment variables
Create a
.envfile in the root directory:MONGODB_URI=your_mongodb_connection_string JWT_SECRET=your-secret-key-for-jwt-tokens # SMTP settings for password reset emails (Gmail example) SMTP_HOST=smtp.gmail.com SMTP_PORT=587 SMTP_USER=your.email@gmail.com SMTP_PASS=your-gmail-app-password SMTP_FROM_EMAIL="Linkium <your.email@gmail.com>"
Note: For Gmail, you need to:
- Enable 2-Step Verification on your Google account
- Create an App Password at myaccount.google.com/apppasswords
- Use that 16-character App Password as
SMTP_PASS(not your regular Gmail password)
-
Run the development server
npm run dev
The application uses JWT (JSON Web Tokens) for authentication:
- Signup: Passwords are hashed with bcrypt before storage
- Login: Returns a JWT token (stored in localStorage) with 1-day expiry
- Protected Routes: API endpoints verify JWT tokens from the
Authorization: Bearer <token>header - Password Reset: Two-step OTP flow:
- User requests a 6-digit code via email
- User enters code + new password to reset
Token Storage: JWT tokens are stored in localStorage as linkium_token. The user email is stored separately as linkium_user for display purposes.
- Sign up with your email and password
- Log in to receive a JWT token
- Claim a unique handle for your profile URL
- Add links with titles (requires authentication)
- Share your
/yourhandleURL (public, no auth needed)