turbo-invoice

byYashwnath

Build a production-ready multi-tenant micro-SaaS called “PayPilot”. PayPilot helps small web-design, marketing, branding, and development agencies automatically follow up on unpaid invoices without sending awkward messages manually. Positioning: “Get overdue invoices paid without awkward follow-up.” This is NOT a full accounting or invoice-generation platform. It is a focused accounts-receivable reminder tool for businesses that already create invoices elsewhere. TARGET USERS - Web-design agencies with 2–15 employees - Marketing agencies - Freelance developers and designers - Branding studios - Small consulting businesses TECHNOLOGY Use the platform’s modern full-stack web framework, relational database, secure authentication, responsive UI, scheduled background jobs, email provider integration, and Stripe subscriptions. Use environment variables for secrets. Build a real working application, not only a visual mockup. MULTI-TENANCY AND AUTHENTICATION - Email/password signup and login - Forgot/reset password - Workspace creation after signup - Invite team members - Roles: Owner, Admin, Member - Every record must include organization/workspace ownership - Enforce server-side tenant isolation and authorization - Users must never access another workspace’s data MAIN NAVIGATION - Overview - Invoices - Clients - Reminder Campaigns - Templates - Activity - Settings - Billing ONBOARDING Create a setup wizard asking for: - Business name - Logo - Website - Sender name and email - Timezone - Currency - Default payment terms: due on receipt, 7, 14, 30, or custom - Preferred import method: CSV, Stripe, or manual entry Allow users to load demo data. OVERVIEW DASHBOARD Display: - Total outstanding amount - Total overdue amount - Number of overdue invoices - Amount recovered - Recovery rate - Reminders sent this month - Invoices by aging: not due, 1–7, 8–14, 15–30, and 31+ days overdue - Payments recovered over time - Overdue invoices by client Add a prominent “Review overdue invoices” button. INVOICES Create an invoice table with: - Invoice number - Client - Amount - Balance due - Currency - Issue date - Due date - Days overdue - Status - Last reminder - Next reminder Statuses: - Draft - Sent - Due soon - Overdue - Partially paid - Paid - Disputed - Paused - Written off Invoice details must show: - Full invoice information - Client information - Payment URL - Reminder timeline - Email delivery status - Client replies - Internal notes - Send reminder now - Pause/resume reminders - Mark paid - Record partial payment Support: - Manual invoice creation - CSV import/export - Search - Filtering and sorting - Duplicate warnings - Bulk pause/resume - Bulk send with confirmation Invoice fields: invoice number, client, client email, company, amount, amount paid, balance due, currency, issue date, due date, payment URL, notes, status, campaign, created date, and updated date. CSV IMPORT Accept: invoice_number, client_name, client_email, client_company, amount, amount_paid, currency, issue_date, due_date, payment_url, notes. Show column mapping, validation errors, duplicate warnings, preview, and import summary. CLIENTS Create a client list showing: - Name/company - Email - Total invoiced - Outstanding balance - Overdue invoices - Last payment - Average days to pay Client profiles should show all invoices, payment history, reminder history, notes, tags, and a “pause all reminders” setting. Tags: VIP, Retainer, Slow payer, New client, Disputed, Agency partner. REMINDER CAMPAIGNS Create configurable campaigns with this default sequence: 1. Three days before due date: friendly heads-up 2. Due date: payment due reminder 3. Seven days overdue: professional follow-up 4. Fourteen days overdue: firm follow-up 5. Twenty-one days overdue: owner review notification Each step supports: - Enable/disable - Days relative to due date - Template - Sending time and timezone - Approval required or automatic sending - Stop if payment is detected - Stop if client replies - Internal notification - Maximum reminders Require approval before automatic sending for all new users. Include create, edit, duplicate, activate, pause, preview, test email, and campaign performance features. EMAIL TEMPLATES Provide templates for: - Upcoming reminder - Due today - Seven-day overdue - Fourteen-day overdue - Payment confirmation - Payment-plan request - Client says they paid - Invoice dispute - Client requests more time Variables: {{client_first_name}}, {{client_full_name}}, {{client_company}}, {{invoice_number}}, {{invoice_amount}}, {{balance_due}}, {{currency}}, {{issue_date}}, {{due_date}}, {{days_overdue}}, {{payment_link}}, {{business_name}}, {{sender_name}}, {{sender_email}}. Every email must be concise, professional, and non-threatening. Never make legal claims or threaten legal action. Include invoice number, balance, due date, business name, and payment link when available. Implement: - Preview - Edit before sending - Test email - Approval workflow - Sent/delivered/bounced/failed status - Optional opened/clicked status - Duplicate-send prevention - Rate limiting - Retry for safe failures AI ASSISTANT Add “PayPilot Assistant” to: - Draft reminders - Adjust tone: friendly, neutral, professional, or firm - Recommend the next follow-up date - Classify replies as payment confirmation, payment promise, dispute, extension request, wrong recipient, question, or unclear - Extract promised payment date, amount, dispute reason, and requested action - Suggest next action AI safety: - Label AI-generated content - Require user review before first send - Allow editing - Never give legal advice - Never invent payment history - Never claim a payment occurred without confirmation - Do not send sensitive invoice information to AI unless enabled - If no AI API is configured, use fallback templates INTEGRATIONS MVP priority: 1. CSV import 2. Stripe payment links/status 3. Gmail/SMTP email sending Prepare clean adapters for QuickBooks, Xero, and Outlook, but do not let unavailable integrations block the MVP. For Stripe: - Support account connection if available - Detect successful payments using secure webhooks - Support partial payments - Stop future reminders when paid - Verify webhook signatures - Process webhook events idempotently BILLING Use Stripe subscriptions with: - 14-day free trial, up to 10 active invoices - Starter: $19/month, up to 25 active invoices - Agency: $49/month, up to 150 active invoices - Studio: $99/month, up to 500 active invoices, team members, branding, advanced analytics Include upgrade, downgrade, cancellation, reactivation, payment-failure handling, usage limits, billing history, and Stripe customer portal. SETTINGS Include: - Business profile - Logo/branding - Sender and reply-to email - Currency/timezone - Payment terms - Default campaign - Email settings - AI settings - Team members - Billing - Data export - Delete workspace ACTIVITY LOG Track: - Invoice creation/import/update - Reminder approval/sending/failure - Payment detection - Invoice marked paid - Campaign activation/pause - Team changes - Subscription changes Show timestamp, user, action, related invoice/client, and result. DATABASE Create suitable tables for: users, organizations, organization_members, subscriptions, clients, invoices, payments, reminder_campaigns, reminder_steps, reminder_runs, message_templates, email_messages, email_replies, ai_suggestions, activity_logs, integration_connections, webhook_events, and notifications. Add foreign keys, timestamps, indexes, organization IDs, and secure access rules. DESIGN Use a clean B2B SaaS interface: - White cards - Light background - Dark navy text - Blue/indigo primary buttons - Green for paid - Orange for due soon - Red for overdue - Responsive mobile layout - Accessible contrast - Clear empty states - Helpful validation messages LANDING PAGE Create a landing page with: Headline: “Get overdue invoices paid without awkward follow-up.” Subheadline: “PayPilot automatically sends professional payment reminders for small agencies while keeping you in control.” Sections: how it works, features, reminder timeline, dashboard preview, AI assistant, security, pricing, FAQs, and CTA. Primary CTA: “Start free trial.” Do not claim guaranteed recovery rates. DEMO DATA Add a demo workspace with: - 8 clients - 15 invoices - Paid, due, overdue, and partially paid statuses - Reminder history - Payment events - Sample AI reply classifications SECURITY Implement server-side authorization, tenant isolation, input validation, rate limiting, XSS-safe rendering, encrypted credentials, secure webhook verification, audit logs, data export, workspace deletion, and no secrets in frontend code. TESTING Add tests for: - Invoice status calculations - Reminder scheduling - Duplicate prevention - Tenant isolation - Roles and permissions - Subscription limits - CSV validation - Webhook idempotency - End-to-end flow: signup → import invoice → create campaign → approve reminder → send test email → mark paid → stop future reminders. BUILD PRIORITY 1. Authentication and tenant isolation 2. Clients and invoices 3. CSV import 4. Reminder campaigns 5. Templates and email sending 6. Stripe billing 7. Payment status/webhooks 8. AI features 9. Analytics and polish If an integration is unavailable, provide a clearly labeled demo/mock adapter. Before completion, run tests, fix build errors, verify mobile responsiveness, check all protected routes, seed demo data, and provide README/setup instructions.

LandingInvoicesOverviewClientsTemplatesReminder CampaignsBillingActivity
Landing

Comments (0)

No comments yet. Be the first!

Project Tasks

4
#1

Integrate Razorpay API

To Do

As a Developer, I should integrate the backend with Razorpay Subscriptions API for billing and subscription management. Implementation contract: - Outcome: Razorpay API integrated for billing - Requirement sources: - src-c5bd491329179abf - src-3de94019dc3334ec - src-679c6a02c497c73a - Owned behavior: - Create Razorpay Subscription object - Handle Razorpay webhooks - Interfaces: - Razorpay API - Webhook endpoints - State transitions: - Subscription status updates - Failure and safety behavior: - Webhook signature verification failure - API request failure - Web research: - https://razorpay.com/docs/api/ Acceptance criteria: - Successful subscription creation - Webhook events processed

AI 60%
Human 40%
High Priority
3 days
Backend Developer
#2

Manage Email Templates

To Do

As a Developer, I should implement email template management for reminders and notifications. Implementation contract: - Outcome: Email templates managed for reminders - Requirement sources: - src-ccd79ca468e0c8fc - src-d672acd5efab05e1 - Owned behavior: - Create, edit, and approve email templates - Interfaces: - Template management API - State transitions: - Template status updates - Failure and safety behavior: - Template approval failure Acceptance criteria: - Templates can be created, edited, and approved

AI 50%
Human 50%
Medium Priority
2 days
Backend Developer
#3

Implement Landing page

To Do

As a frontend developer, implement the Landing page sections: Navbar, LandingHero, LandingFeatures, LandingBenefits, and LandingCTA. Ensure the Navbar provides navigation with Sign Up and Log In buttons for unauthenticated visitors, and collapses to a hamburger menu on mobile. The LandingHero should present the headline 'Automate Your Invoice Follow-Ups' with a Sign Up CTA button featuring restrained animation. The LandingFeatures section should display a grid of feature cards with icons and descriptions, adapting responsively. The LandingBenefits section should articulate outcomes for small agencies with a two-column layout on desktop. Finally, the LandingCTA should reinforce the signup with a prominent button and trust signals. Acceptance criteria: The page must render exactly once when accessed by a Visitor. All sections must maintain their design structure and theme. The Sign Up and Log In buttons must navigate to /auth. The responsive design must adapt correctly across breakpoints. No backend integration is required for static content. Implementation contract: - Outcome: observable page/section result - Requirement sources: - src-1996b6a73fa82498 - src-55e5bd010fd2069e - src-e464767a7e2a5bdb - src-cd684073e6ee173f - src-4ce59d04c3e01903 - src-779b146371d01c46 - src-4a9ffe703417b06c - src-4004bacf8c845130 - src-f5c03f372e90ab1c - src-d458cd8ccd3d7279 - src-6108fe367a22eaf3 - Owned behavior: - Responsive navigation and layout - Animated CTA button - Feature card grid display - Static content presentation Acceptance criteria: - Navbar with Sign Up and Log In buttons navigates to /auth - LandingHero displays headline and animated CTA - LandingFeatures grid adapts responsively - LandingBenefits presents outcomes in two-column layout on desktop - LandingCTA reinforces signup with trust signals Page audience: Visitor. Access requirement: public. Audience targeting does not request authentication or RBAC.

AI 90%
Human 10%
High Priority
2 days
Frontend Developer
#4

Implement Landing page Header and Footer

To Do

As a frontend developer, implement the Header and Footer sections for the Landing page. The Header includes navigation links, a brand logo, and authentication links for the landing context. It uses state hooks to manage the menu state and path detection to determine the context. The Footer provides the Turbo-Invoice branding, a product tagline, and copyright information. Both sections must maintain visual consistency with the design tokens specified, including responsive behavior for different screen sizes. Acceptance criteria: The Header and Footer must render exactly once on the Landing page. The Header must display navigation links conditionally based on the context and manage the mobile menu state. The Footer must display the company branding and product context with the specified styling. No backend integration is required for these sections. Implementation contract: - Outcome: observable page/section result - Requirement sources: - src-4e3f632163c74d20 - src-b7d8f1efecc8225d - Owned behavior: - Header navigation and menu state management - Footer branding and context display - State transitions: - Menu open/close state transition Acceptance criteria: - Header and Footer render on the Landing page - Header displays navigation links conditionally - Footer displays company branding and product context - Responsive design is maintained Page audience: Visitor. Access requirement: public. Audience targeting does not request authentication or RBAC.

AI 90%
Human 10%
High Priority
1 day
Frontend Developer
Landing design preview
Process: log in and authenticate as workspace admin
Settings: navigate to workspace/team management
Settings: invite team member and assign role
Settings: Failure: role assignment denied due to authorization failure
Landing design preview
Process: log in and authenticate as workspace admin
Settings: navigate to workspace/team management
Settings: invite team member and assign role
Settings: Failure: role assignment denied due to authorization failure