Skip to content

A modern, user-friendly web application for merging PDF files with a clean and intuitive interface. Built with Next.js, TypeScript, and Tailwind CSS. Features drag-and-drop file upload, file reordering, and responsive design.

Notifications You must be signed in to change notification settings

BjornMelin/simple-pdf-merger

Repository files navigation

Simple PDF Merger

A modern, user-friendly web application for merging PDF files with a clean and intuitive interface. Built with Next.js, TypeScript, and Tailwind CSS.

MIT License Contributions Welcome TypeScript React Next.js GitHub LinkedIn

πŸ“š Quick Links

🌟 Features

Core Application Features

  • πŸ“Ž Drag and Drop PDF Files: Easily add files by dragging and dropping them into the application.
  • πŸ“‹ Reorder Files Before Merging: Arrange the order of your PDF files before merging them.
  • πŸ”„ Simple and Intuitive Interface: User-friendly design for a seamless experience.
  • πŸ“± Responsive Design: Optimized for all devices, including mobile and tablets.
  • 🎯 File Size Display: View the size of each PDF file before merging.
  • πŸ—‘οΈ Easy File Removal: Quickly remove unwanted files from the list.
  • ⚑ Fast and Efficient: Merge PDF files quickly with high performance.
  • πŸ“± Modern Frontend: Next.js with Tailwind CSS for a sleek and modern look.
  • πŸ› οΈ TypeScript Support: Strongly typed codebase for improved maintainability.
  • πŸ“¦ Component Library: Utilizes shadcn/ui components for a consistent design.
  • πŸš€ Deploy with Vercel: Easily deploy to Vercel with a single click.

Modern Tech Features

  • ⚑ React 19 RC Integration

    • Document Metadata API
    • Asset Loading API
    • Progressive Loading
    • Optimization Compiler
  • πŸš€ Next.js 15 App Router

    • Server Components
    • Partial Prerendering
    • Parallel Routes
    • Edge Runtime
  • πŸ”„ Full-Stack Type Safety

    • End-to-end typesafe APIs with tRPC
    • Runtime validation
    • Strict TypeScript
    • Comprehensive error handling
  • ⚑ Performance First

    • Edge deployment
    • Streaming SSR
    • Smart bundling
    • Optimal caching

Live Demo

Visit Simple PDF Merger

πŸ› οΈ Tech Stack

  • Framework: Next.js
  • Language: TypeScript
  • Styling: Tailwind CSS
  • Components: shadcn/ui

πŸ“ Project Structure

simple-pdf-merger/
β”œβ”€β”€ .eslintrc.json
β”œβ”€β”€ .gitignore
β”œβ”€β”€ .husky/
β”‚   β”œβ”€β”€ _/...
β”‚   β”œβ”€β”€ commit-msg
β”œβ”€β”€ .vscode/
β”‚   β”œβ”€β”€ settings.json
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ fonts/
β”‚   β”œβ”€β”€ globals.css            # Global styles
β”‚   β”œβ”€β”€ layout.tsx             # Root layout with metadata
β”‚   └── page.tsx               # Home page
β”œβ”€β”€ commitlint.config.js
β”œβ”€β”€ components/
β”‚   └── ui/                    # shadcn/ui components
β”‚       β”œβ”€β”€ button.tsx
β”‚       └── card.tsx
β”‚       └── PDFMerger.tsx      # Main PDF merger component
β”œβ”€β”€ components.json
β”œβ”€β”€ lib/
β”‚   └── utils.ts               # Utility functions
β”œβ”€β”€ next-env.d.ts
β”œβ”€β”€ next.config.ts
β”œβ”€β”€ package.json
β”œβ”€β”€ pnpm-lock.yaml
β”œβ”€β”€ postcss.config.mjs
β”œβ”€β”€ public/
β”‚   └── screenshot.png         # App screenshot
β”œβ”€β”€ README.md
β”œβ”€β”€ tailwind.config.ts
β”œβ”€β”€ tsconfig.json
β”œβ”€β”€ types/
β”‚   β”œβ”€β”€ api.ts                 # API type definitions
β”‚   β”œβ”€β”€ components.ts          # Component type definitions
β”‚   β”œβ”€β”€ events.ts              # Event type definitions
β”‚   β”œβ”€β”€ index.ts               # Main type exports
β”‚   β”œβ”€β”€ pdf.ts                 # PDF type definitions
β”‚   └── utils.ts               # Utility type definitions

πŸš€ Getting Started

Prerequisites

  • Node.js 18.17 or later
  • pnpm (recommended), npm, or yarn

Installation

  1. Clone the repository:

    git clone https://github.com/BjornMelin/simple-pdf-merger.git
    cd simple-pdf-merger
  2. Install pnpm if you don't have it:

    npm install -g pnpm
  3. Install dependencies:

    pnpm install
  4. Set up shadcn/ui components:

    pnpm dlx shadcn@latest init

    Choose the following options when prompted:

    • TypeScript: Yes
    • Style: Default
    • Base color: Slate
    • Global CSS: globals.css
    • CSS variables: Yes
    • tailwind.config.js location: tailwind.config.js
    • Components import alias: @/components
    • Utilities import alias: @/lib/utils
  5. Install required shadcn/ui components:

    pnpm dlx shadcn@latest add card button
  6. Run the development server:

    pnpm run dev
  7. Open http://localhost:3000 in your browser.

Development

Type Checking

npm run type-check

Linting

npm run lint

Building for Production

npm run build

Deployment

Deploy to Vercel

  1. Push your code to GitHub
  2. Go to Vercel
  3. Import your repository
  4. Deploy

Manual Deployment

Build the application:

npm run build

The build output will be in the .next directory.

Troubleshooting

If you encounter the error 'pnpm' is not recognized as an internal or external command, operable program or batch file, follow these steps:

  1. Ensure Node.js and npm are installed:

    • Download and install Node.js from nodejs.org.

    • Verify the installation:

      node -v
      npm -v
  2. Install pnpm globally:

    • Run the following command to install pnpm:

      npm install -g pnpm
  3. Verify pnpm installation:

    • Check the pnpm version:

      pnpm -v
  4. Run the command again:

    • Use pnpm dlx to ensure the latest version is used:

      pnpm dlx shadcn@latest init

Visual Representation

graph TD;
    A[Install Node.js and npm] --> B[Install pnpm globally];
    B --> C[Clone the repository];
    C --> D[Install dependencies];
    D --> E[Initialize shadcn/ui];
    E --> F[Install required components];
    F --> G[Run development server];
Loading

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ‘¨β€πŸ’» Author

Bjorn Melin

AWS Certified Solutions Architect AWS Certified Developer AWS Certified AI Practitioner AWS Certified Cloud Practitioner

AWS-certified Solutions Architect and Developer with expertise in cloud architecture and modern development practices. Connect with me on:

Project Link: https://github.com/BjornMelin/simple-pdf-merger

πŸ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

🌟 Star History

Star History Chart

πŸ™ Acknowledgments

Built with React 19 RC + Next.js 15 by Bjorn Melin

About

A modern, user-friendly web application for merging PDF files with a clean and intuitive interface. Built with Next.js, TypeScript, and Tailwind CSS. Features drag-and-drop file upload, file reordering, and responsive design.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published