Invoicely is a simple and easy to use invoice generator where you can create beautiful and professional invoices in minutes. ~ Proudly OSS
See the codeModern, open-source invoice generation platform built with Next.js, tRPC, and TypeScript.
For Cloudflare Workers hosting with OpenNext, follow the deployment guide, including staging validation and domain cutover.
[!CAUTION] We do not allow vibe coding. Your PR will be rejected if the code quality is poor and vibe coded.
packageManager field)Clone the repository
git clone https://github.com/legions-developer/invoicely.git
cd invoicely
Install dependencies
yarn install
Set up environment variables
# Create environment file in root directory
cp .env.example .env
# Create symlinks for environment variables across apps
yarn sys-link
Set up the database
# Generate database schema
yarn db:generate
# Run database migrations
yarn db:migrate
Start development server
yarn dev
Run yarn test:security to check dependency compatibility and the local patches. Run yarn npm audit --all --recursive --no-deprecations to check published vulnerability advisories across all workspaces.
The Yarn patch in .yarn/patches/braces-npm-3.0.3-security.patch mitigates GHSA-vfj7-8cjw-p6xm by rejecting brace/parenthesis and AST nesting beyond 100 levels. No upstream patched release is available as of October 5, 2026, so version-based scanners can still flag [email protected]. Yarn's audit returns no advisories for this patched tree; that result must be paired with the patch regression tests. Keep the upstream warning visible and replace the patch with a fixed release when available.
The node-gyp resolution removes the vulnerable make-fetch-happen β http-cache-semantics dependency chain. Retain Node.js 22.9.0 or newer for this build tool.
The Sentry resolution pins @sentry/[email protected] to .yarn/patches/sentry-nextjs-npm-10.76.0-runtime.patch. Its server entry imports a build helper that eagerly calls createRequire(__filename); OpenNext's Worker bundle supplies an empty filename, causing instrumentation startup and auth requests to fail. The patch defers that call until the build helper is used. Remove the patch, resolution, and sentryRuntimePatch cache dependency in apps/web/next.config.ts when an upstream fix passes yarn test:security and auth requests against the built Worker, including /api/auth/ok and an unauthenticated /api/auth/get-session.
Open Dashboard in the sidebar to view local invoices and, when signed in, your saved server invoices. Select a currency to see collected, outstanding, and overdue totals, six- or twelve-month trends, and the top five clients by all-time billed amount. Currencies are never combined or converted.
success. Monthly collections use the recorded payment date; paid invoices without one remain in all-time totals.pending, error, and expired invoices. Overdue is the subset past its due date or marked expired; an invoice due today is not overdue.The dashboard uses existing invoice fields and requires no new database migration, environment variable, or dependency.
invoicely/
βββ apps/
β βββ web/ # Next.js web application
β βββ src/
β β βββ app/ # App Router pages
β β βββ components/ # Reusable UI components
β β βββ constants/ # Application constants
β β βββ hooks/ # Custom React hooks
β β βββ lib/ # Utility libraries
β β βββ providers/ # Context providers
β β βββ trpc/ # tRPC configuration
β β βββ types/ # TypeScript type definitions
β β βββ zod-schemas/ # Zod validation schemas
β βββ public/ # Static assets
β βββ package.json # App dependencies
β
βββ packages/
β βββ db/ # Database package
β β βββ src/
β β β βββ schema/ # Drizzle database schemas
β β β βββ index.ts # Database exports
β β βββ migrations/ # Database migration files
β β
β βββ utilities/ # Shared utilities
β β βββ src/
β β βββ env/ # Environment configuration
β β
β βββ eslint-config/ # Shared ESLint configuration
β βββ typescript-config/ # Shared TypeScript configuration
β
βββ env-links.sh # Environment symlink script
βββ turbo.json # Turbo configuration
βββ package.json # Root package configuration
βββ yarn.lock # Dependency lock file
Create a .env file in the root directory with the following variables:
# Database
DATABASE_URL="postgresql://username:password@localhost:5432/invoicely"
# Authentication
BETTER_AUTH_SECRET="your-secret-key"
BETTER_AUTH_URL="http://localhost:3000"
GOOGLE_CLIENT_ID="your-google-client-id"
GOOGLE_CLIENT_SECRET="your-google-client-secret"
# Cloudflare R2 Storage
CF_R2_ENDPOINT="your-r2-endpoint"
CF_R2_ACCESS_KEY_ID="your-access-key"
CF_R2_SECRET_ACCESS_KEY="your-secret-key"
CF_R2_BUCKET_NAME="your-bucket-name"
CF_R2_PUBLIC_DOMAIN="your-public-domain"
# Analytics
NEXT_PUBLIC_POSTHOG_HOST="your-posthog-host"
NEXT_PUBLIC_POSTHOG_KEY="your-posthog-key"
# Public URLs
NEXT_PUBLIC_BASE_URL="http://localhost:3000"
NEXT_PUBLIC_TRPC_BASE_URL="http://localhost:3000/api/trpc"
The project uses a symlink-based approach for environment management:
yarn sys-link to create symlinks from the root .env file to all apps@t3-oss/env-nextjs and Zodyarn dev # Start development servers for all apps
yarn build # Build all apps for production
yarn start # Start production servers
yarn lint # Lint all packages
yarn lint:fix # Fix linting issues
yarn format # Format code with Prettier
yarn check-types # Type check all packages
# Database Operations
yarn db:generate # Generate database schema
yarn db:migrate # Run database migrations
yarn db:push # Push schema changes to database
yarn db:studio # Open Drizzle Studio
# Utility Scripts
yarn sys-link # Create environment symlinks
yarn reset-repo # Clean all build artifacts
yarn dev # Start Next.js development server
yarn build # Build for production
yarn start # Start production server
yarn lint # Lint the web app
components/auth-wizard)UserProfile.tsx).client.tsx suffix for components using "use client"formatCurrency.ts)userName, isLoading, hasError)R2_PUBLIC_URL, TOAST_OPTIONS)createInvoice, validateEmail)isLoading, hasPermission, canEdit)UserProfile, InvoiceData)ZodInvoiceSchema, ZodUserSchema)function keyword for pure functionsWe welcome contributions to Invoicely! Please follow these guidelines:
profilename/featurenamejohn/add-dark-mode, sarah/fix-invoice-validationtype: description
feature: add invoice templatesfix: resolve authentication redirect issuechore: update dependenciesThis project is licensed under the MIT License - see the LICENSE file for details.
1,992 followers Β· starred Sep 2025
1,178 followers Β· starred Oct 2025
191 followers Β· starred Jul 2025
114 followers Β· starred Aug 2025
Invoicely is a simple and easy to use invoice generator where you can create beautiful and professional invoices in minutes. ~ Proudly OSS
See the codeModern, open-source invoice generation platform built with Next.js, tRPC, and TypeScript.
For Cloudflare Workers hosting with OpenNext, follow the deployment guide, including staging validation and domain cutover.
[!CAUTION] We do not allow vibe coding. Your PR will be rejected if the code quality is poor and vibe coded.
packageManager field)Clone the repository
git clone https://github.com/legions-developer/invoicely.git
cd invoicely
Install dependencies
yarn install
Set up environment variables
# Create environment file in root directory
cp .env.example .env
# Create symlinks for environment variables across apps
yarn sys-link
Set up the database
# Generate database schema
yarn db:generate
# Run database migrations
yarn db:migrate
Start development server
yarn dev
Run yarn test:security to check dependency compatibility and the local patches. Run yarn npm audit --all --recursive --no-deprecations to check published vulnerability advisories across all workspaces.
The Yarn patch in .yarn/patches/braces-npm-3.0.3-security.patch mitigates GHSA-vfj7-8cjw-p6xm by rejecting brace/parenthesis and AST nesting beyond 100 levels. No upstream patched release is available as of October 5, 2026, so version-based scanners can still flag [email protected]. Yarn's audit returns no advisories for this patched tree; that result must be paired with the patch regression tests. Keep the upstream warning visible and replace the patch with a fixed release when available.
The node-gyp resolution removes the vulnerable make-fetch-happen β http-cache-semantics dependency chain. Retain Node.js 22.9.0 or newer for this build tool.
The Sentry resolution pins @sentry/[email protected] to .yarn/patches/sentry-nextjs-npm-10.76.0-runtime.patch. Its server entry imports a build helper that eagerly calls createRequire(__filename); OpenNext's Worker bundle supplies an empty filename, causing instrumentation startup and auth requests to fail. The patch defers that call until the build helper is used. Remove the patch, resolution, and sentryRuntimePatch cache dependency in apps/web/next.config.ts when an upstream fix passes yarn test:security and auth requests against the built Worker, including /api/auth/ok and an unauthenticated /api/auth/get-session.
Open Dashboard in the sidebar to view local invoices and, when signed in, your saved server invoices. Select a currency to see collected, outstanding, and overdue totals, six- or twelve-month trends, and the top five clients by all-time billed amount. Currencies are never combined or converted.
success. Monthly collections use the recorded payment date; paid invoices without one remain in all-time totals.pending, error, and expired invoices. Overdue is the subset past its due date or marked expired; an invoice due today is not overdue.The dashboard uses existing invoice fields and requires no new database migration, environment variable, or dependency.
invoicely/
βββ apps/
β βββ web/ # Next.js web application
β βββ src/
β β βββ app/ # App Router pages
β β βββ components/ # Reusable UI components
β β βββ constants/ # Application constants
β β βββ hooks/ # Custom React hooks
β β βββ lib/ # Utility libraries
β β βββ providers/ # Context providers
β β βββ trpc/ # tRPC configuration
β β βββ types/ # TypeScript type definitions
β β βββ zod-schemas/ # Zod validation schemas
β βββ public/ # Static assets
β βββ package.json # App dependencies
β
βββ packages/
β βββ db/ # Database package
β β βββ src/
β β β βββ schema/ # Drizzle database schemas
β β β βββ index.ts # Database exports
β β βββ migrations/ # Database migration files
β β
β βββ utilities/ # Shared utilities
β β βββ src/
β β βββ env/ # Environment configuration
β β
β βββ eslint-config/ # Shared ESLint configuration
β βββ typescript-config/ # Shared TypeScript configuration
β
βββ env-links.sh # Environment symlink script
βββ turbo.json # Turbo configuration
βββ package.json # Root package configuration
βββ yarn.lock # Dependency lock file
Create a .env file in the root directory with the following variables:
# Database
DATABASE_URL="postgresql://username:password@localhost:5432/invoicely"
# Authentication
BETTER_AUTH_SECRET="your-secret-key"
BETTER_AUTH_URL="http://localhost:3000"
GOOGLE_CLIENT_ID="your-google-client-id"
GOOGLE_CLIENT_SECRET="your-google-client-secret"
# Cloudflare R2 Storage
CF_R2_ENDPOINT="your-r2-endpoint"
CF_R2_ACCESS_KEY_ID="your-access-key"
CF_R2_SECRET_ACCESS_KEY="your-secret-key"
CF_R2_BUCKET_NAME="your-bucket-name"
CF_R2_PUBLIC_DOMAIN="your-public-domain"
# Analytics
NEXT_PUBLIC_POSTHOG_HOST="your-posthog-host"
NEXT_PUBLIC_POSTHOG_KEY="your-posthog-key"
# Public URLs
NEXT_PUBLIC_BASE_URL="http://localhost:3000"
NEXT_PUBLIC_TRPC_BASE_URL="http://localhost:3000/api/trpc"
The project uses a symlink-based approach for environment management:
yarn sys-link to create symlinks from the root .env file to all apps@t3-oss/env-nextjs and Zodyarn dev # Start development servers for all apps
yarn build # Build all apps for production
yarn start # Start production servers
yarn lint # Lint all packages
yarn lint:fix # Fix linting issues
yarn format # Format code with Prettier
yarn check-types # Type check all packages
# Database Operations
yarn db:generate # Generate database schema
yarn db:migrate # Run database migrations
yarn db:push # Push schema changes to database
yarn db:studio # Open Drizzle Studio
# Utility Scripts
yarn sys-link # Create environment symlinks
yarn reset-repo # Clean all build artifacts
yarn dev # Start Next.js development server
yarn build # Build for production
yarn start # Start production server
yarn lint # Lint the web app
components/auth-wizard)UserProfile.tsx).client.tsx suffix for components using "use client"formatCurrency.ts)userName, isLoading, hasError)R2_PUBLIC_URL, TOAST_OPTIONS)createInvoice, validateEmail)isLoading, hasPermission, canEdit)UserProfile, InvoiceData)ZodInvoiceSchema, ZodUserSchema)function keyword for pure functionsWe welcome contributions to Invoicely! Please follow these guidelines:
profilename/featurenamejohn/add-dark-mode, sarah/fix-invoice-validationtype: description
feature: add invoice templatesfix: resolve authentication redirect issuechore: update dependenciesThis project is licensed under the MIT License - see the LICENSE file for details.
1,992 followers Β· starred Sep 2025
1,178 followers Β· starred Oct 2025
191 followers Β· starred Jul 2025
114 followers Β· starred Aug 2025