A full-stack web application for creating personalized link pages with advanced customization options, built with Next.js, TypeScript, and MongoDB.
- User authentication with Google and GitHub
- Create and manage multiple Linktrees
- Customizable themes and styles
- Link management with drag-and-drop functionality
- Analytics tracking
- Premium features for subscribed users
- Frontend: Next.js 14, TypeScript, Tailwind CSS
- Backend: Next.js API Routes
- Database: MongoDB with Mongoose
- Authentication: NextAuth.js
- Deployment: Vercel (recommended)
-
Clone the repository:
git clone https://github.com/yourusername/linktree-app.git cd linktree-app -
Install dependencies:
npm install
-
Set up environment variables:
- Copy
.env.local.exampleto.env.local - Fill in your MongoDB connection string
- Add your OAuth credentials for Google and GitHub
- Generate a NextAuth secret with:
openssl rand -base64 32
- Copy
-
Run the development server:
npm run dev
-
Open http://localhost:3000 in your browser
- Go to Google Cloud Console
- Create a new project or select an existing one
- Enable the Google+ API
- Go to Credentials > Create Credentials > OAuth Client ID
- Add authorized redirect URI:
http://localhost:3000/api/auth/callback/google - Copy the Client ID and Secret to your
.env.local
- Go to GitHub Developer Settings
- Create a new OAuth App
- Add homepage URL:
http://localhost:3000 - Add callback URL:
http://localhost:3000/api/auth/callback/github - Copy the Client ID and Secret to your
.env.local
├── app/
│ ├── (auth)/
│ │ └── signin/
│ ├── api/
│ │ └── auth/
│ ├── dashboard/
│ ├── components/
│ ├── lib/
│ ├── models/
│ └── types/
├── public/
└── ...
- Fork the repository
- Create your feature branch:
git checkout -b feature/my-feature - Commit your changes:
git commit -am 'Add my feature' - Push to the branch:
git push origin feature/my-feature - Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.