Skip to content

Ratnadeep2k/Invoice

Repository files navigation

🚀 Invoice Management System

📌 Project Overview

An Invoice Management System built with Next.js, Auth.js, and Prisma to streamline invoice generation, tracking, and management. Users can send invoices, track payments, and automate reminders.

🛠 Tech Stack

  • Framework: Next.js (App Router)
  • Auth: Auth.js (Magic Link via Mailtrap)
  • Database: PostgreSQL (via Prisma ORM)
  • UI: TailwindCSS, shadcn/ui
  • Emails: Resend / Nodemailer + Mailtrap
  • PDF Generation: Puppeteer / PDFKit
  • Deployment: Vercel / Railway + GitHub Actions

📌 Features

🔑 Authentication & Onboarding

  • Magic Link authentication with Auth.js
  • Custom verification route for email login
  • User onboarding with name and address (for invoices)

📊 Dashboard & Analytics

  • Overview of invoices, payments, and clients
  • Interactive charts & stats for revenue tracking

📝 Invoice Management

  • Create invoices & send email notifications
  • Edit invoices (auto-email updates to clients)
  • Download invoices as PDFs
  • Delete invoices when needed
  • Mark invoices as paid
  • Automated email reminders for due invoices

🌍 Landing Page

  • Clean and modern marketing page
  • SEO-optimized for better visibility

🛠 Installation & Setup

1️⃣ Clone Repository

git clone https://github.com/yourusername/invoice-management.git
cd invoice-management

2️⃣ Install Dependencies

yarn install   # or npm install

3️⃣ Set Up Environment Variables

Create a .env.local file and add the following:

DATABASE_URL=your_postgresql_url
NEXTAUTH_SECRET=your_secret_key
NEXTAUTH_URL=http://localhost:3000
MAILTRAP_USER=your_mailtrap_user
MAILTRAP_PASS=your_mailtrap_pass

4️⃣ Run Database Migrations

npx prisma migrate dev --name init

5️⃣ Start Development Server

yarn dev   # or npm run dev

📤 Deployment

Deploy on Vercel

vercel

Deploy on Railway

railway up

🚀 Roadmap & Future Enhancements

  • Implement Stripe integration for payments
  • Add multi-user/team functionality
  • Support recurring invoices

📜 License

This project is licensed under the MIT License.


🤝 Contributing

Pull requests are welcome! For major changes, please open an issue first to discuss what you’d like to change.


📧 Contact

For inquiries, reach out at: [email protected]

Happy Coding! 🚀

Invoice