A Next.js application for merging PDF files with a freemium model. Users can merge files after creating a free account.
- PDF merging with pdf-lib
- Drag and drop file upload
- Authentication with Clerk
- MongoDB for storing user data and merge transactions
- Node.js 18+ and npm
- MongoDB database
- Clerk account for authentication
- Clone the repository
- Install dependencies
npm install
- Copy the
.env.local.example
file to.env.local
and fill in your environment variablescp .env.local.example .env.local
- Start the development server
npm run dev
The following environment variables are required:
CLERK_SECRET_KEY
: Your Clerk secret keyNEXT_PUBLIC_CLERK_PUBLISHABLE_KEY
: Your Clerk publishable keyCLERK_WEBHOOK_SECRET
: Your Clerk webhook secretMONGODB_URI
: Your MongoDB connection stringNEXT_PUBLIC_APP_URL
: The URL of your application
- Sign up or log in using Clerk authentication
- Upload PDF files by dragging and dropping or using the file picker
- Click the "Merge PDFs" button to combine the files
/app
: Next.js app router pages and API routes/components
: React components/context
: React context providers/lib
: Utility functions and database connections/public
: Static assets
/api/merge/check
: Check if a user can merge PDFs/api/merge/record
: Record a merge transaction
This project is licensed under the MIT License.