Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

sejoalfaro/paperly

Repository files navigation

Paperly

Create stunning invoices with a design system inspired by Vercel.

This tool focuses purely on aesthetics and simplicity. It is not an accounting system; it takes your data and renders a crisp, minimalist PDF ready to send.

Features

  • Minimalist: High contrast, clean typography.
  • 🚀 Fast: Generates lightweight PDFs instantly.
  • 🎨 Customizable: Easy to adapt the data structure.
  • 🔓 Open Source: Apache License 2.
  • 🌐 Cross-browser: Server-side PDF generation with Playwright (no Safari issues!)
  • 📱 Responsive: Works perfectly on all devices.

PDF Generation

This project uses Playwright + Chromium for server-side PDF generation, ensuring consistent results across all browsers and devices.

Why Playwright?

  • ✅ Consistent PDFs on all platforms (iOS, Android, Safari, Chrome)
  • ✅ Perfect print quality with full CSS support
  • ✅ No client-side dependencies
  • ✅ Complete control over format and margins

Quick Start

  1. Install dependencies:
pnpm install
  1. Install Chromium (development only):
npx playwright install chromium
  1. Run the development server:
pnpm dev
  1. Test PDF generation:

Documentation

Tech Stack

  • Framework: Next.js 15 (App Router)
  • Styling: Tailwind CSS + shadcn/ui
  • PDF Generation: Playwright + Chromium
  • Language: TypeScript
  • Package Manager: pnpm

Deployment

This project is configured for Railway and Dokploy with automatic Chromium installation via nixpacks.toml.

Deploy to Railway

Deploy on Railway

The nixpacks.toml configuration will automatically install Chromium during deployment.

Environment Variables

NEXT_PUBLIC_APP_URL=https://your-app.com

Project Structure

src/
├── app/
│   ├── invoice/
│   │   ├── page.tsx                    # Main invoice editor
│   │   └── print/[id]/page.tsx        # Print-friendly version
│   └── api/
│       └── invoice/[id]/pdf/route.ts  # PDF generation API
├── components/
│   └── invoice/
│       ├── invoice-download-button.tsx
│       └── ...
├── lib/
│   └── playwright-config.ts           # Playwright settings
└── types/
    └── invoice.ts

About

A minimalist PDF invoice generator. Simple, elegant, and inspired by Vercel's design aesthetic.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published