A modern, full-featured invoice management system built with Next.js, Prisma, PostgreSQL, and powered by Rube MCP by Composio for MCP based development. Manage your clients, create professional invoices, track payments, and gain insights into your business performance.
- 📊 Dashboard - Real-time analytics and business insights
- 📄 Invoice Management - Create, send, and track invoices
- 👥 Client Management - Organize and manage client relationships
- 🎨 Invoice Templates - Professional, customizable invoice templates
- 💳 Payment Tracking - Monitor payment status and history
- 🔔 Automated Reminders - Send payment reminders automatically
- 🏢 Multi-workspace Support - Manage multiple businesses or teams
- 📱 Responsive Design - Works perfectly on desktop and mobile
- 🔐 Secure Authentication - Email-based authentication with NextAuth.js
- Frontend: Next.js 15, React 19, TypeScript, Tailwind CSS
- Backend: Next.js API Routes, Prisma ORM
- Database: PostgreSQL
- Authentication: NextAuth.js
- UI Components: Radix UI, Lucide Icons
- Charts: Recharts
- PDF Generation: @react-pdf/renderer
- Email: Nodemailer (Gmail SMTP)
- Node.js 18+
- PostgreSQL database
- npm, yarn, or bun
-
Clone the repository
git clone https://github.com/rohittcodes/linea.git cd linea -
Install dependencies
npm install # or yarn install # or bun install
-
Set up environment variables
Create a
.env.localfile in the root directory with the following variables:# Database DATABASE_URL="postgresql://your-username:your-password@your-host:5432/your-database" # Application Base URL NEXT_PUBLIC_BASE_URL="http://localhost:3001" # NextAuth.js NEXTAUTH_URL="http://localhost:3001" NEXTAUTH_SECRET="your-nextauth-secret-key-here" # Google Gemini (AI SDK) GOOGLE_GENERATIVE_AI_API_KEY="your-google-api-key" # Provisional IRN (Demo Mode) # Gate all demo IRN generation with this flag (do NOT enable in production) EINV_DEMO_MODE="false" # Email Configuration (for NextAuth email provider) EMAIL_SERVER_USER="your-email@gmail.com" EMAIL_SERVER_PASSWORD="your-app-password" EMAIL_FROM="noreply@yourdomain.com"
-
Set up the database
# Push the schema to your database npx prisma db push # Generate Prisma client npx prisma generate
-
Run the development server
npm run dev # or yarn dev # or bun dev
-
Open your browser
Navigate to http://localhost:3001 to see the application.
- Page:
/ai— chat with the Gemini model. RequiresGOOGLE_GENERATIVE_AI_API_KEY.
- Set
EINV_DEMO_MODE=trueto enable demo IRN generation. - From Invoices → menu:
- Generate Provisional IRN: creates a deterministic provisional IRN and QR (watermarked NOT GOVERNMENT-REGISTERED).
- Enter Official IRN: paste the real IRN when you receive it later.
- Sign up: Visit the login page and enter your email address
- Verify email: Check your email for the verification link
- Complete setup: You'll be redirected to create your first workspace
- Add clients: Start by adding your first client
- Create invoices: Create and send your first invoice
src/
├── app/ # Next.js App Router
│ ├── (auth)/ # Authentication pages
│ ├── (dashboard)/ # Dashboard pages
│ ├── api/ # API routes
│ └── layout.tsx # Root layout
├── components/ # React components
│ ├── ui/ # Reusable UI components
│ ├── invoices/ # Invoice-related components
│ ├── clients/ # Client-related components
│ └── templates/ # Template-related components
├── lib/ # Utility libraries
│ ├── auth.ts # NextAuth configuration
│ ├── db.ts # Database utilities
│ └── utils.ts # General utilities
└── types/ # TypeScript type definitions
The application uses a comprehensive database schema with the following main entities:
- Users - User accounts and preferences
- Workspaces - Multi-tenant workspace support
- Clients - Client information and relationships
- Invoices - Invoice data and line items
- Templates - Invoice template designs
- Payments - Payment tracking and history
- Analytics - Business metrics and reporting
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run lintingnpm run format- Format codenpm run db:generate- Generate Prisma clientnpm run db:push- Push schema to databasenpm run db:migrate- Run database migrations
- Push your code to GitHub
- Connect your repository to Vercel
- Add environment variables in Vercel dashboard
- Deploy!
The application can be deployed to any platform that supports Next.js:
- Netlify
- Railway
- DigitalOcean App Platform
- AWS Amplify
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License.
If you encounter any issues or have questions, please:
- Check the Issues page
- Create a new issue with detailed information
- Join our community discussions