Free & Open-Source Invoice Generator - No Sign-Up, No Ads, Instant PDF Export, 100% In-Browser, and Fully Customizable Templates.
TypeScript fintechinvoiceinvoice-generatorinvoice-pdfinvoice-templateinvoicesnextjsopen-sourcequotesreactreact-pdf-rendererself-hostedshadcn-uitailwindcsstypescript
feat: welcome popup and improved how it works page (#242)
Vlad Sazonau963043873ead
diff --git a/README.md b/README.mdindex 2b58792..17cb425 100644--- a/README.md+++ b/README.md@@ -16,7 +16,8 @@<strong>⭐ Like the project? <a href="https://github.com/VladSez/easy-invoice-pdf" title="Star EasyInvoicePDF on GitHub - free & open-source invoice generator">Star it on GitHub</a></strong><p>- Built by <a href="https://vladsazon.com?ref=github"><strong>Vlad Sazonau</strong></a>+ <img src="https://ik.imagekit.io/fl2lbswwo/avatar.jpeg?updatedAt=1757456439459" alt="Vlad Sazonau Avatar" width="28" height="28" style="border-radius:50%; vertical-align:middle; margin-right:8px;">+ Made by <a href="https://vladsazon.com"><strong>Vlad Sazonau</strong></a></p></div>diff --git a/e2e/about.test.ts b/e2e/about.test.tsindex a29edc7..a94d48b 100644--- a/e2e/about.test.ts+++ b/e2e/about.test.ts@@ -1,6 +1,11 @@/* eslint-disable playwright/no-conditional-expect *//* eslint-disable playwright/no-conditional-in-test */-import { GITHUB_URL, TWITTER_URL, VIDEO_DEMO_FALLBACK_IMG } from "@/config";+import {+ DISCORD_COMMUNITY_URL,+ GITHUB_URL,+ TWITTER_URL,+ VIDEO_DEMO_FALLBACK_IMG,+} from "@/config";import { expect, test } from "@playwright/test";test.describe("About page", () => {@@ -208,6 +213,15 @@ test.describe("About page", () => {await expect(changelogLink).toHaveAttribute("href", "/changelog");await expect(changelogLink).not.toHaveAttribute("target", "_blank");+ const howItWorksLink = footerLinks.getByRole("link", {+ name: "How it works",+ exact: true,+ });++ await expect(howItWorksLink).toBeVisible();+ await expect(howItWorksLink).toHaveAttribute("href", "/how-it-works");+ await expect(howItWorksLink).not.toHaveAttribute("target", "_blank");+const founderLink = footerLinks.getByRole("link", {name: "Founder",exact: true,@@ -234,7 +248,7 @@ test.describe("About page", () => {await expect(shareFeedbackLink).toBeVisible();await expect(shareFeedbackLink).toHaveAttribute("href",- "https://pdfinvoicegenerator.userjot.com/?cursor=1&order=top&limit=10",+ DISCORD_COMMUNITY_URL,);await expect(shareFeedbackLink).toHaveAttribute("target", "_blank");diff --git a/e2e/how-it-works.test.ts b/e2e/how-it-works.test.tsnew file mode 100644index 0000000..6210844--- /dev/null+++ b/e2e/how-it-works.test.ts@@ -0,0 +1,104 @@+import {+ DISCORD_COMMUNITY_URL,+ REDDIT_COMMUNITY_URL,+ VIDEO_DEMO_YOUTUBE_URL,+ YOUTUBE_VIDEO_HOW_TO_ADD_BUYER,+ YOUTUBE_VIDEO_HOW_TO_ADD_SELLER,+} from "@/config";+import { expect, test } from "@playwright/test";++test.describe("How it works page", () => {+ test("should display page content and video tutorials", async ({ page }) => {+ await page.goto("/how-it-works");++ await expect(page).toHaveURL("/how-it-works");++ const header = page.locator("header");+ await expect(header).toBeVisible();++ const goToAppButton = header.getByRole("link", {+ name: "Open app",+ exact: true,+ });++ await expect(goToAppButton).toBeVisible();+ await expect(goToAppButton).toHaveAttribute("href", "/?template=default");++ await expect(page.getByTestId("how-it-works-page-title")).toBeVisible();+ await expect(+ page.getByRole("heading", {+ level: 1,+ name: "How EasyInvoicePDF Works",+ exact: true,+ }),+ ).toBeVisible();++ await expect(+ page.getByText(+ "Discover how to create, customize, and send professional PDF invoices online with EasyInvoicePDF. Watch step-by-step tutorial videos to learn invoice creation, branding, and customization tips. Start generating invoices instantly in our free online invoice generator.",+ ),+ ).toBeVisible();++ const embed = page.getByTestId("how-it-works-video");++ await expect(embed).toBeVisible();+ await expect(embed).toHaveAttribute("src", VIDEO_DEMO_YOUTUBE_URL);+ await expect(embed).toHaveAttribute("title", "EasyInvoicePDF Demo Video");++ const sellerTab = page.getByTestId("how-it-works-tab-add-seller");++ await sellerTab.click();+ await expect(embed).toHaveAttribute("src", YOUTUBE_VIDEO_HOW_TO_ADD_SELLER);++ await expect(sellerTab).toBeVisible();+ await expect(sellerTab).toHaveAttribute("role", "tab");+ await expect(sellerTab).toHaveAttribute("aria-selected", "true");++ const discordLink = page.getByTestId("how-it-works-discord");+ const redditLink = page.getByTestId("how-it-works-reddit");++ await expect(discordLink).toBeVisible();+ await expect(discordLink).toHaveAttribute("href", DISCORD_COMMUNITY_URL);+ await expect(redditLink).toBeVisible();+ await expect(redditLink).toHaveAttribute("href", REDDIT_COMMUNITY_URL);++ await expect(page.getByTestId("how-it-works-tutorial-index")).toBeVisible();+ await expect(+ page.getByRole("heading", { level: 2, name: "All tutorials" }),+ ).toBeVisible();++ const buttonCta = page.getByRole("link", {+ name: "Start Invoicing",+ exact: true,+ });+ await expect(buttonCta).toBeVisible();+ await expect(buttonCta).toHaveAttribute("href", "/");++ const footer = page.locator("footer");+ await expect(footer).toBeVisible();++ const howItWorksFooterLink = footer.getByRole("link", {+ name: "How it works",+ exact: true,+ });+ await expect(howItWorksFooterLink).toBeVisible();+ await expect(howItWorksFooterLink).toHaveAttribute("href", "/how-it-works");+ });++ test("should support video deep link via query param", async ({ page }) => {+ await page.goto("/how-it-works?video=add-buyer");++ await expect(page).toHaveURL("/how-it-works?video=add-buyer");++ const embed = page.getByTestId("how-it-works-video");++ await expect(embed).toHaveAttribute("src", YOUTUBE_VIDEO_HOW_TO_ADD_BUYER);++ const buyerTab = page.getByTestId("how-it-works-tab-add-buyer");+ await expect(buyerTab).toBeVisible();++ await expect(buyerTab).toHaveAttribute("role", "tab");++ await expect(buyerTab).toHaveAttribute("aria-selected", "true");+ });+});diff --git a/e2e/invoice-form.test.ts b/e2e/invoice-form.test.tsindex c1da9d4..d8ab326 100644--- a/e2e/invoice-form.test.ts+++ b/e2e/invoice-form.test.ts@@ -16,9 +16,12 @@ import dayjs from "dayjs";import { INVOICE_PDF_TRANSLATIONS } from "@/app/(app)/pdf-i18n-translations/pdf-translations";import { INITIAL_INVOICE_DATA } from "../src/app/constants";import {+ DISCORD_COMMUNITY_URL,GITHUB_URL,+ REDDIT_COMMUNITY_URL,STATIC_ASSETS_URL,VIDEO_DEMO_YOUTUBE_URL,+ YOUTUBE_VIDEO_HOW_TO_ADD_SELLER,} from "@/config";test.describe("Invoice Generator Page", () => {@@ -114,9 +117,16 @@ test.describe("Invoice Generator Page", () => {page.getByRole("link", { name: "Download PDF in English" }),).toBeVisible();- await expect(- header.getByRole("link", { name: "Share your feedback" }),- ).toBeVisible();+ const shareFeedbackLink = header.getByRole("link", {+ name: "Share your feedback",+ });+ await expect(shareFeedbackLink).toBeVisible();++ await expect(shareFeedbackLink).toHaveAttribute(+ "href",+ DISCORD_COMMUNITY_URL,+ );+ await expect(shareFeedbackLink).toHaveAttribute("target", "_blank");const howItWorksButton = header.getByRole("button", {name: "How it works",@@ -127,27 +137,49 @@ test.describe("Invoice Generator Page", () => {// open How it works dialogawait howItWorksButton.click();+ // Check that demo embed is displayed in dialog+ const dialog = page.getByRole("dialog");+ await expect(dialog).toBeVisible();++ const dialogContent = dialog.getByTestId(+ "how-it-works-videos-dialog-content",+ );+ await expect(dialogContent).toBeVisible();+await expect(- page.getByRole("heading", { name: "How EasyInvoicePDF Works" }),+ dialogContent.getByRole("heading", {+ name: "How EasyInvoicePDF Works",+ level: 2,+ }),).toBeVisible();await expect(- page.getByText(- "Watch this quick demo to learn how to create and customize your invoices.",+ dialogContent.getByText(+ "Learn how to create and customize your invoices.",),).toBeVisible();- // Check that demo embed is displayed in dialog- const dialog = page.getByRole("dialog");- await expect(dialog).toBeVisible();-- const embed = dialog.getByTestId("how-it-works-video");+ const embed = dialogContent.getByTestId("how-it-works-video");await expect(embed).toBeVisible();await expect(embed).toHaveAttribute("src", VIDEO_DEMO_YOUTUBE_URL);await expect(embed).toHaveAttribute("title", "EasyInvoicePDF Demo Video");+ await dialog.getByTestId("how-it-works-tab-add-seller").click();+ await expect(embed).toHaveAttribute("src", YOUTUBE_VIDEO_HOW_TO_ADD_SELLER);++ await expect(+ dialog.getByRole("heading", { name: "How to add a seller" }),+ ).toBeVisible();++ const discordLink = dialog.getByTestId("how-it-works-discord");+ const redditLink = dialog.getByTestId("how-it-works-reddit");+ await expect(discordLink).toBeVisible();+ await expect(discordLink).toHaveAttribute("href", DISCORD_COMMUNITY_URL);+ await expect(redditLink).toBeVisible();+ await expect(redditLink).toHaveAttribute("href", REDDIT_COMMUNITY_URL);+await dialog.getByRole("button", { name: "Close" }).click();await expect(dialog).toBeHidden();diff --git a/messages/de.json b/messages/de.jsonindex 2ac6c90..21e7fac 100644--- a/messages/de.json+++ b/messages/de.json@@ -56,10 +56,16 @@},"footer": {"description": "Ein kostenloses Open-Source-Tool zur Erstellung professioneller PDF-Rechnungen mit Live-Vorschau.<br></br><br></br>Keine Buchhaltungssoftware. Keine Compliance-Garantien. Durch die Nutzung dieses Tools stimmen Sie den <tosLink>Nutzungsbedingungen</tosLink> zu.",+ "headings": {+ "product": "Produkt",+ "company": "Unternehmen",+ "community": "Community"+ },"links": {"invoiceGenerator": "Rechnungsgenerator","features": "Funktionen","github": "GitHub",+ "howItWorks": "So funktioniert es","changelog": "Änderungen","founder": "Gründer","resources": "Ressourcen",diff --git a/messages/en.json b/messages/en.jsonindex e3efe0f..e25682c 100644--- a/messages/en.json+++ b/messages/en.json@@ -56,10 +56,16 @@},"footer": {"description": "Create professional invoices in seconds with our free & open-source invoice maker. 100% in-browser, no sign-up required. Includes live PDF preview and a Stripe-style template - perfect for freelancers, startups, and small businesses.<br></br><br></br>Not accounting software. No compliance guarantees. By using this tool, you agree to the <tosLink>Terms of Service</tosLink>.",+ "headings": {+ "product": "Product",+ "company": "Company",+ "community": "Community"+ },"links": {"invoiceGenerator": "Invoice Generator","features": "Features","github": "GitHub",+ "howItWorks": "How it works","changelog": "Changelog","founder": "Founder","resources": "Resources",diff --git a/messages/es.json b/messages/es.jsonindex 0b1ef6a..3361267 100644--- a/messages/es.json+++ b/messages/es.json@@ -56,10 +56,16 @@},"footer": {"description": "Una herramienta gratuita de código abierto para crear facturas PDF profesionales con vista previa en tiempo real.<br></br><br></br>No es software de contabilidad. Sin garantías de cumplimiento. Al usar esta herramienta, aceptas los <tosLink>Términos del servicio</tosLink>.",+ "headings": {+ "product": "Producto",+ "company": "Empresa",+ "community": "Comunidad"+ },"links": {"invoiceGenerator": "Generador de facturas","features": "Características","github": "GitHub",+ "howItWorks": "Cómo funciona","changelog": "Novedades","founder": "Fundador","resources": "Recursos",diff --git a/messages/fr.json b/messages/fr.jsonindex b9d46b8..4d90151 100644--- a/messages/fr.json+++ b/messages/fr.json@@ -48,10 +48,16 @@},"footer": {"description": "Un outil gratuit et open-source pour créer des factures PDF professionnelles avec aperçu en temps réel.<br></br><br></br>Pas un logiciel de comptabilité. Aucune garantie de conformité. En utilisant cet outil, vous acceptez les <tosLink>Conditions d'utilisation</tosLink>.",+ "headings": {+ "product": "Produit",+ "company": "Entreprise",+ "community": "Communauté"+ },"links": {"invoiceGenerator": "Générateur de factures","features": "Fonctionnalités","github": "GitHub",+ "howItWorks": "Comment ça marche","changelog": "Nouveautés","founder": "Fondateur","resources": "Ressources",diff --git a/messages/it.json b/messages/it.jsonindex 3264c50..c054253 100644--- a/messages/it.json+++ b/messages/it.json@@ -56,10 +56,16 @@},"footer": {"description": "Uno strumento gratuito e open-source per creare fatture PDF professionali con anteprima in tempo reale.<br></br><br></br>Non è un software di contabilità. Nessuna garanzia di conformità. Utilizzando questo strumento, accetti i <tosLink>Termini di servizio</tosLink>.",+ "headings": {+ "product": "Prodotto",+ "company": "Azienda",+ "community": "Community"+ },"links": {"invoiceGenerator": "Generatore di fatture","features": "Funzionalità","github": "GitHub",+ "howItWorks": "Come funziona","changelog": "Novità","founder": "Fondatore","resources": "Risorse",diff --git a/messages/nl.json b/messages/nl.jsonindex c13e95c..494b040 100644--- a/messages/nl.json+++ b/messages/nl.json@@ -56,10 +56,16 @@},"footer": {"description": "Een gratis, open-source tool voor het maken van professionele PDF-facturen met realtime voorbeeld.<br></br><br></br>Geen boekhoudsoftware. Geen nalevingsgaranties. Door deze tool te gebruiken, gaat u akkoord met de <tosLink>Servicevoorwaarden</tosLink>.",+ "headings": {+ "product": "Product",+ "company": "Bedrijf",+ "community": "Community"+ },"links": {"invoiceGenerator": "Factuurgenerator","features": "Functies","github": "GitHub",+ "howItWorks": "Hoe het werkt","changelog": "Nieuw","founder": "Oprichter","resources": "Bronnen",diff --git a/messages/pl.json b/messages/pl.jsonindex 5e2890b..d03cefa 100644--- a/messages/pl.json+++ b/messages/pl.json@@ -56,10 +56,16 @@},"footer": {"description": "Darmowe narzędzie open-source do tworzenia profesjonalnych faktur PDF z podglądem w czasie rzeczywistym.<br></br><br></br>Nie jest oprogramowaniem księgowym. Brak gwarancji zgodności. Korzystając z tego narzędzia, akceptujesz <tosLink>Regulamin</tosLink>.",+ "headings": {+ "product": "Produkt",+ "company": "Firma",+ "community": "Społeczność"+ },"links": {"invoiceGenerator": "Generator faktur","features": "Funkcje","github": "GitHub",+ "howItWorks": "Jak to działa","changelog": "Dziennik zmian","founder": "Założyciel","resources": "Zasoby",diff --git a/messages/pt.json b/messages/pt.jsonindex 04908f5..0d33e2c 100644--- a/messages/pt.json+++ b/messages/pt.json@@ -56,10 +56,16 @@},"footer": {"description": "Uma ferramenta gratuita de código aberto para criar faturas PDF profissionais com pré-visualização em tempo real.<br></br><br></br>Não é um software de contabilidade. Sem garantias de conformidade. Ao usar esta ferramenta, você concorda com os <tosLink>Termos de serviço</tosLink>.",+ "headings": {+ "product": "Produto",+ "company": "Empresa",+ "community": "Comunidade"+ },"links": {"invoiceGenerator": "Gerador de faturas","features": "Recursos","github": "GitHub",+ "howItWorks": "Como funciona","changelog": "Novidades","founder": "Fundador","resources": "Materiais",diff --git a/messages/ru.json b/messages/ru.jsonindex 06e1118..f26949f 100644--- a/messages/ru.json+++ b/messages/ru.json@@ -56,10 +56,16 @@},"footer": {"description": "Бесплатный инструмент с открытым исходным кодом для создания профессиональных PDF-инвойсов с предпросмотром в реальном времени.<br></br><br></br>Не является бухгалтерским программным обеспечением. Никаких гарантий соответствия. Используя этот инструмент, вы соглашаетесь с <tosLink>Условиями использования</tosLink>.",+ "headings": {+ "product": "Продукт",+ "company": "Компания",+ "community": "Сообщество"+ },"links": {"invoiceGenerator": "Генератор счетов","features": "Возможности","github": "GitHub",+ "howItWorks": "Как это работает","changelog": "Что нового","founder": "Основатель","resources": "Ресурсы",diff --git a/messages/uk.json b/messages/uk.jsonindex 1e6d010..2f69829 100644--- a/messages/uk.json+++ b/messages/uk.json@@ -56,10 +56,16 @@},"footer": {"description": "Створюйте професійні рахунки за секунди за допомогою нашого безкоштовного інструменту з відкритим кодом. 100% у браузері, без реєстрації. Включає попередній перегляд PDF та шаблон у стилі Stripe - ідеально для фрілансерів, стартапів і малого бізнесу.<br></br><br></br>Не є бухгалтерським програмним забезпеченням. Жодних гарантій відповідності. Використовуючи цей інструмент, ви погоджуєтесь з <tosLink>Умовами використання</tosLink>.",+ "headings": {+ "product": "Продукт",+ "company": "Компанія",+ "community": "Спільнота"+ },"links": {"invoiceGenerator": "Генератор рахунків","features": "Можливості","github": "GitHub",+ "howItWorks": "Як це працює","changelog": "Що нового","founder": "Засновник","resources": "Ресурси",diff --git a/public/easyinvoice-mascot-popup-1.png b/public/easyinvoice-mascot-popup-1.pngnew file mode 100644index 0000000..fec940cBinary files /dev/null and b/public/easyinvoice-mascot-popup-1.png differdiff --git a/public/llms.txt b/public/llms.txtindex db7c958..c940908 100644--- a/public/llms.txt+++ b/public/llms.txt@@ -1,3 +1,12 @@+---+type: Reference+title: EasyInvoicePDF+description: Free, open-source invoice generator for creating professional PDF invoices in the browser.+resource: https://easyinvoicepdf.com+tags: [invoice-generator, pdf, open-source, invoicing, client-side, multilingual, vat]+timestamp: 2026-06-14T00:00:00Z+---+# EasyInvoicePDF — free, open-source invoice generator[EasyInvoicePDF](https://easyinvoicepdf.com)@@ -120,6 +129,15 @@ Adds customizable tax and tax number labels, per-language tax label behavior, stLaunches EasyInvoicePDF with live invoice preview, instant PDF download, shareable links, default and Stripe-inspired templates, 10 languages, broad currency support, European VAT support, and privacy-focused browser-side editing.+## How it works (video tutorials)++Step-by-step video guides for using EasyInvoicePDF. Page: [How EasyInvoicePDF Works](https://easyinvoicepdf.com/how-it-works)++- **Overview**: Create and customize professional PDF invoices with live preview+- **Add seller**: Save seller details and reuse them on future invoices+- **Add buyer**: Save buyer details and reuse them on future invoices+- **Weekly invoices**: Generate invoices for a week of work+## Licensing and availability- **Open source**: Source code is licensed under [GNU AGPL-3.0](https://www.gnu.org/licenses/agpl-3.0.html).@@ -141,6 +159,7 @@ Launches EasyInvoicePDF with live invoice preview, instant PDF download, shareab- [Features (on About)](https://easyinvoicepdf.com/en/about#features)- [FAQ (on About)](https://easyinvoicepdf.com/en/about#faq)- [Changelog](https://easyinvoicepdf.com/changelog)+- [How it works (video tutorials)](https://easyinvoicepdf.com/how-it-works)- [Founder](https://easyinvoicepdf.com/founder)- [Terms of Service](https://easyinvoicepdf.com/tos)- [GitHub releases](https://github.com/VladSez/easy-invoice-pdf/releases)diff --git a/src/app/(app)/components/changelog-update-popup.tsx b/src/app/(app)/components/changelog-update-popup.tsxnew file mode 100644index 0000000..0e72128--- /dev/null+++ b/src/app/(app)/components/changelog-update-popup.tsx@@ -0,0 +1,224 @@+"use client";++import type { ChangelogSummary } from "@/app/changelog/utils";+import { Button } from "@/components/ui/button";+import type { AppUpdatePopupVariant } from "@/app/(app)/hooks/use-changelog-update-popup";+import { DISCORD_COMMUNITY_URL, REDDIT_COMMUNITY_URL } from "@/config";+import { markChangelogAsSeen } from "@/app/(app)/utils/changelog-seen-storage";+import { markWelcomePopupSeen } from "@/app/(app)/utils/welcome-popup-seen-storage";+import { umamiTrackEvent } from "@/lib/umami-analytics-track-event";+import { cn } from "@/lib/utils";+import { XIcon } from "lucide-react";+import Link from "next/link";+import { useCallback, useEffect } from "react";++interface ChangelogUpdatePopupProps {+ variant: AppUpdatePopupVariant;+ latestChangelog: ChangelogSummary | null;+ isOpen: boolean;+ onDismiss: () => void;+ onHowItWorksClick?: () => void;+}++function CommunityLinks() {+ return (+ <>+ {" "}+ Join our{" "}+ <a+ onClick={() => {+ umamiTrackEvent("popup-discord-community-link-clicked");+ }}+ href={DISCORD_COMMUNITY_URL}+ target="_blank"+ rel="noopener noreferrer"+ className="font-bold text-slate-800 underline decoration-slate-500 underline-offset-2 transition-colors hover:text-slate-950 hover:decoration-slate-800"+ >+ Discord+ </a>{" "}+ or{" "}+ <a+ onClick={() => {+ umamiTrackEvent("popup-reddit-community-link-clicked");+ }}+ href={REDDIT_COMMUNITY_URL}+ target="_blank"+ rel="noopener noreferrer"+ className="font-bold text-slate-800 underline decoration-slate-500 underline-offset-2 transition-colors hover:text-slate-950 hover:decoration-slate-800"+ >+ </a>{" "}+ community.+ </>+ );+}++const POPUP_CONTENT = {+ welcome: {+ title: "Welcome",+ bodyPrefix: "Create professional PDF invoices in your browser.",+ continueTestId: "welcome-update-continue",+ secondaryTestId: "welcome-update-how-it-works",+ },+ changelog: {+ title: "What's new",+ bodyPrefix: "Check out recent features and improvements.",+ continueTestId: "changelog-update-continue",+ secondaryTestId: "changelog-update-link",+ },+} as const satisfies Record<+ AppUpdatePopupVariant,+ {+ title: string;+ bodyPrefix: string;+ continueTestId: string;+ secondaryTestId: string;+ }+>;++export function ChangelogUpdatePopup({+ variant,+ latestChangelog,+ isOpen,+ onDismiss,+ onHowItWorksClick,+}: ChangelogUpdatePopupProps) {+ const markSeenAndDismiss = useCallback(() => {+ if (variant === "welcome") {+ markWelcomePopupSeen();+ } else if (latestChangelog) {+ markChangelogAsSeen(latestChangelog.slug);+ }++ onDismiss();+ }, [latestChangelog, onDismiss, variant]);++ useEffect(() => {+ if (!isOpen) {+ return;+ }++ const handleKeyDown = (event: KeyboardEvent) => {+ if (event.key === "Escape") {+ markSeenAndDismiss();+ }+ };++ window.addEventListener("keydown", handleKeyDown);++ return () => {+ window.removeEventListener("keydown", handleKeyDown);+ };+ }, [isOpen, markSeenAndDismiss]);++ if (!isOpen) {+ return null;+ }++ const content = POPUP_CONTENT[variant];+ const analyticsPrefix =+ variant === "welcome" ? "welcome-popup" : "changelog-update-popup";++ return (+ <div className="pointer-events-none fixed bottom-20 right-4 z-40 sm:bottom-6 sm:right-6">+ <section+ role="status"+ aria-live="polite"+ aria-atomic="true"+ data-testid="changelog-update-popup"+ className={cn(+ "pointer-events-auto relative w-[min(27rem,calc(100vw-2rem))] overflow-visible rounded-2xl bg-white px-5 py-5 pr-36 text-slate-950 shadow-[0_18px_50px_rgba(0,0,0,0.16)] ring-1 ring-slate-300 sm:pr-40",+ "origin-bottom-right duration-300 ease-out motion-reduce:animate-none",+ "animate-in fade-in zoom-in-95 slide-in-from-bottom-4",+ )}+ >+ <Button+ type="button"+ aria-label="Close"+ data-testid="changelog-update-close"+ onClick={() => {+ umamiTrackEvent(`${analyticsPrefix}-dismissed`);+ markSeenAndDismiss();+ }}+ variant="ghost"+ size="icon"+ className="absolute right-2 top-2 flex size-7 items-center justify-center rounded-md text-slate-500 transition-colors hover:bg-slate-100 hover:text-slate-950"+ >+ <XIcon className="h-4 w-4" aria-hidden="true" />+ </Button>++ <div className="min-w-0">+ <p className="text-[18px] font-semibold leading-tight text-slate-950 sm:text-[19px]">+ {content.title}+ </p>+ <p className="mt-1.5 max-w-[14rem] text-sm leading-snug text-slate-600 sm:max-w-[15.5rem]">+ {content.bodyPrefix}+ <CommunityLinks />+ </p>+ <div className="mt-5 flex items-center gap-2">+ <Button+ type="button"+ size="sm"+ className="h-8 rounded-md px-3 text-sm"+ data-testid={content.continueTestId}+ onClick={() => {+ umamiTrackEvent(`${analyticsPrefix}-continue`);+ markSeenAndDismiss();+ }}+ >+ Continue+ </Button>+ {variant === "welcome" ? (+ <Button+ type="button"+ variant="outline"+ size="sm"+ className="h-8 rounded-md px-2.5 text-sm font-medium text-slate-600 hover:text-slate-950"+ data-testid={content.secondaryTestId}+ onClick={() => {+ umamiTrackEvent(`${analyticsPrefix}-how-it-works`);+ markSeenAndDismiss();+ onHowItWorksClick?.();+ }}+ >+ How it works+ </Button>+ ) : (+ <Button+ variant="outline"+ size="sm"+ className="h-8 rounded-md px-2.5 text-sm font-medium text-slate-600 hover:text-slate-950"+ data-testid={content.secondaryTestId}+ asChild+ >+ <Link+ href="/changelog"+ onClick={() => {+ umamiTrackEvent(`${analyticsPrefix}-link`);+ markSeenAndDismiss();+ }}+ >+ New features+ </Link>+ </Button>+ )}+ </div>+ </div>++ <div+ aria-hidden="true"+ title=""+ className="pointer-events-none absolute bottom-[-1.25rem] flex size-52 shrink-0 items-center justify-center overflow-visible sm:bottom-[-40px] sm:right-[-10px] sm:size-60"+ >+ <img+ alt=""+ src="/easyinvoice-mascot-popup-1.png"+ loading="lazy"+ decoding="async"+ className="relative z-10 h-full w-full object-contain drop-shadow-[0_16px_28px_rgba(0,0,0,0.18)]"+ />+ </div>+ </section>+ </div>+ );+}diff --git a/src/app/(app)/components/cta-toasts/index.tsx b/src/app/(app)/components/cta-toasts/index.tsxindex a33bdf9..fea23b3 100644--- a/src/app/(app)/components/cta-toasts/index.tsx+++ b/src/app/(app)/components/cta-toasts/index.tsx@@ -1,20 +1,11 @@import { Button } from "@/components/ui/button";import { umamiTrackEvent } from "@/lib/umami-analytics-track-event";-import {- GiftIcon,- Heart,- MessageSquare,- Sparkles,- Star,- XIcon,-} from "lucide-react";+import { GiftIcon, Heart, Star, XIcon } from "lucide-react";import { GithubIcon } from "@/components/etc/github-logo";-import { GITHUB_URL } from "@/config";+import { DISCORD_FEEDBACK_URL, GITHUB_URL } from "@/config";import { toast as sonnerToast } from "sonner";-const FEEDBACK_URL = "https://pdfinvoicegenerator.userjot.com/";-interface ToastProps {id: string | number;title: string;@@ -68,14 +59,14 @@ const SonnerCloseButton = () => {return (<button- className="absolute flex h-5 w-5 border border-gray-300 bg-white"+ className="absolute flex size-5 border border-gray-300 bg-white"aria-label="Close toast"type="button"data-disabled="false"data-close-button="true"{...props}>- <XIcon className="h-3.5 w-3.5" />+ <XIcon className="size-3.5" /></button>);};@@ -103,12 +94,12 @@ function PremiumDonationToast(props: ToastProps) {<p className="mb-4 text-xs leading-relaxed text-gray-700">{description}</p>- <div className="flex items-end justify-end gap-2">+ <div className="flex flex-wrap items-end justify-end gap-2"><Buttonsize="sm"variant="default"asChild- className="h-8 max-w-[150px] flex-1 border-gray-300 text-xs transition-all duration-200 hover:scale-105"+ className="h-8 w-[150px] flex-1 border-gray-300 text-xs transition-all duration-200"><ahref={GITHUB_URL}@@ -124,43 +115,34 @@ function PremiumDonationToast(props: ToastProps) {Star on GitHub</a></Button>- <PremiumToastFeedbackButton- onClick={() => {- umamiTrackEvent("feedback_btn_click_download_pdf_toast_premium");+ <Button+ size="sm"+ className="h-8 w-[150px] flex-1 border border-gray-300 bg-gray-100 text-xs text-gray-900 transition-all duration-200 hover:bg-gray-200"+ variant="secondary"+ asChild+ data-testid="toast-cta-btn"+ >+ <a+ href={DISCORD_FEEDBACK_URL}+ target="_blank"+ rel="noopener noreferrer"+ onClick={() => {+ umamiTrackEvent(+ "feedback_btn_click_download_pdf_toast_premium",+ );- sonnerToast.dismiss(id);- }}- />+ sonnerToast.dismiss(id);+ }}+ >+ Share Feedback+ </a>+ </Button></div></div></div>);}-function PremiumToastFeedbackButton(- props: React.AnchorHTMLAttributes<HTMLAnchorElement>,-) {- return (- <Button- size="sm"- className="h-8 max-w-[150px] flex-1 border border-gray-300 bg-gray-100 text-xs text-gray-900 transition-all duration-200 hover:bg-gray-200"- variant="secondary"- asChild- data-testid="toast-cta-btn"- >- <a- href={FEEDBACK_URL}- target="_blank"- rel="noopener noreferrer"- {...props}- >- <MessageSquare className="mr-1 h-3 w-3" />- Share Feedback- </a>- </Button>- );-}-function DefaultDonationToast(props: ToastProps) {const { title, description, id } = props;@@ -177,7 +159,6 @@ function DefaultDonationToast(props: ToastProps) {</div><div className="min-w-0 flex-1"><div className="mb-1 flex items-center gap-2">- <Sparkles className="h-4 w-4 text-yellow-500" /><p className="text-sm font-semibold text-gray-900">{title}</p></div><p className="mb-3 text-xs leading-relaxed text-gray-600">@@ -186,7 +167,7 @@ function DefaultDonationToast(props: ToastProps) {<div className="flex items-end justify-end gap-2"><Buttonsize="sm"- className="group h-8 max-w-[150px] bg-gray-900 px-3 text-xs font-medium text-white transition-all duration-200 hover:scale-105 hover:bg-gray-800"+ className="group h-8 max-w-[150px] bg-gray-900 px-3 text-xs font-medium text-white transition-all duration-200 hover:bg-gray-800"asChild><a@@ -203,43 +184,34 @@ function DefaultDonationToast(props: ToastProps) {Star on GitHub</a></Button>- <DefaultToastFeedbackButton- onClick={() => {- umamiTrackEvent("feedback_btn_click_download_pdf_toast_default");+ <Button+ size="sm"+ className="h-8 max-w-[150px] flex-1 border border-gray-300 bg-gray-100 text-xs text-gray-900 transition-all duration-200 hover:bg-gray-200"+ variant="secondary"+ asChild+ data-testid="toast-cta-btn"+ >+ <a+ href={DISCORD_FEEDBACK_URL}+ target="_blank"+ rel="noopener noreferrer"+ onClick={() => {+ umamiTrackEvent(+ "feedback_btn_click_download_pdf_toast_default",+ );- sonnerToast.dismiss(id);- }}- />+ sonnerToast.dismiss(id);+ }}+ >+ Share Feedback+ </a>+ </Button></div></div></div>);}-function DefaultToastFeedbackButton(- props: React.AnchorHTMLAttributes<HTMLAnchorElement>,-) {- return (- <Button- size="sm"- className="h-8 max-w-[150px] flex-1 border border-gray-300 bg-gray-100 text-xs text-gray-900 transition-all duration-200 hover:bg-gray-200"- variant="secondary"- asChild- data-testid="toast-cta-btn"- >- <a- href={FEEDBACK_URL}- target="_blank"- rel="noopener noreferrer"- {...props}- >- <MessageSquare className="mr-1 h-3 w-3" />- Share Feedback- </a>- </Button>- );-}-const CTA_TOASTS = [{id: "premium-donation-toast-client-page",diff --git a/src/app/(app)/components/how-it-works-video-dialog.tsx b/src/app/(app)/components/how-it-works-video-dialog.tsxnew file mode 100644index 0000000..5a8e3cc--- /dev/null+++ b/src/app/(app)/components/how-it-works-video-dialog.tsx@@ -0,0 +1,58 @@+"use client";++import { HowItWorksVideos } from "@/app/(app)/components/how-it-works-videos";+import {+ Dialog,+ DialogContent,+ DialogDescription,+ DialogHeader,+ DialogTitle,+} from "@/components/ui/dialog";+import { HOW_IT_WORKS_VIDEOS } from "@/config";+import { useEffect, useState } from "react";++interface HowItWorksVideoDialogProps {+ open: boolean;+ onOpenChange: (open: boolean) => void;+}++const DEFAULT_VIDEO_ID = HOW_IT_WORKS_VIDEOS[0].id;++/**+ * Dialog component for displaying "How it works" demo videos by use case.+ */+export function HowItWorksVideoDialog({+ open,+ onOpenChange,+}: HowItWorksVideoDialogProps) {+ const [resetKey, setResetKey] = useState(0);++ // Reset video iframe when dialog opens by incrementing a key.+ // This forces the HowItWorksVideos component to re-mount and reload video.+ // eslint-disable-next-line react-you-might-not-need-an-effect/you-might-not-need-an-effect+ useEffect(() => {+ if (open) {+ setResetKey((key) => key + 1);+ }+ }, [open]);++ const activeVideo = HOW_IT_WORKS_VIDEOS[0];++ return (+ <Dialog open={open} onOpenChange={onOpenChange}>+ <DialogContent className="flex max-h-[calc(100dvh-0.75rem)] w-[calc(100%-0.75rem)] max-w-[calc(100%-0.75rem)] flex-col gap-0 overflow-y-auto overflow-x-hidden p-0 sm:max-h-[calc(100vh-2rem)] sm:w-full sm:max-w-[800px]">+ <DialogHeader className="sr-only">+ <DialogTitle>{activeVideo.title}</DialogTitle>+ <DialogDescription>{activeVideo.description}</DialogDescription>+ </DialogHeader>++ <HowItWorksVideos+ resetKey={resetKey}+ initialVideoId={DEFAULT_VIDEO_ID}+ showIframe={open}+ className="gap-0"+ />+ </DialogContent>+ </Dialog>+ );+}diff --git a/src/app/(app)/components/how-it-works-videos.tsx b/src/app/(app)/components/how-it-works-videos.tsxnew file mode 100644index 0000000..3ba17b0--- /dev/null+++ b/src/app/(app)/components/how-it-works-videos.tsx@@ -0,0 +1,177 @@+"use client";++import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";+import {+ DISCORD_COMMUNITY_URL,+ HOW_IT_WORKS_VIDEOS,+ REDDIT_COMMUNITY_URL,+} from "@/config";+import { umamiTrackEvent } from "@/lib/umami-analytics-track-event";+import { cn } from "@/lib/utils";+import { useSearchParams } from "next/navigation";+import { useEffect, useState } from "react";++type HowItWorksVideoId = (typeof HOW_IT_WORKS_VIDEOS)[number]["id"];++const DEFAULT_VIDEO_ID = HOW_IT_WORKS_VIDEOS[0].id;++const VALID_VIDEO_IDS = new Set(HOW_IT_WORKS_VIDEOS.map((video) => video.id));++function isValidVideoId(value: string | null): value is HowItWorksVideoId {+ return value !== null && VALID_VIDEO_IDS.has(value as HowItWorksVideoId);+}++interface HowItWorksVideosProps {+ initialVideoId?: HowItWorksVideoId;+ resetKey?: string | number;+ showIframe?: boolean;+ className?: string;+ /** Overrides the active video title in the heading. */+ title?: string;+ /** Overrides the active video description in the heading. */+ description?: string;+ titleClassName?: string;+ descriptionClassName?: string;+ onVideoChange?: (videoId: HowItWorksVideoId) => void;+}++/**+ * Tabbed video player for "How it works" tutorials.+ * Shared by the in-app dialog and the dedicated /how-it-works page.+ */+export function HowItWorksVideos({+ initialVideoId,+ resetKey,+ showIframe = true,+ className,+ title,+ description,+ titleClassName,+ descriptionClassName,+ onVideoChange,+}: HowItWorksVideosProps) {+ const searchParams = useSearchParams();+ const videoParam = searchParams.get("video");++ const resolvedInitialId = isValidVideoId(videoParam)+ ? videoParam+ : (initialVideoId ?? DEFAULT_VIDEO_ID);++ const [activeVideoId, setActiveVideoId] =+ useState<HowItWorksVideoId>(resolvedInitialId);++ // Reset activeVideoId when resetKey changes, e.g. after dialog open/close.+ // If initialVideoId provided, use it, otherwise fallback to default.+ // eslint-disable-next-line react-you-might-not-need-an-effect/you-might-not-need-an-effect+ useEffect(() => {+ if (resetKey !== undefined) {+ setActiveVideoId(initialVideoId ?? DEFAULT_VIDEO_ID);+ }+ }, [resetKey, initialVideoId]);++ // Sync active tab with ?video query param in URL.+ // If videoParam is valid, update activeVideoId state.+ useEffect(() => {+ if (isValidVideoId(videoParam)) {+ setActiveVideoId(videoParam);+ }+ }, [videoParam]);++ const activeVideo =+ HOW_IT_WORKS_VIDEOS.find((video) => video.id === activeVideoId) ??+ HOW_IT_WORKS_VIDEOS[0];++ function handleTabChange(value: string) {+ const videoId = value as HowItWorksVideoId;+ setActiveVideoId(videoId);+ umamiTrackEvent(`how-it-works-video-tab-${value}`);+ onVideoChange?.(videoId);+ }++ return (+ <div+ className={cn("flex flex-col", className)}+ data-testid="how-it-works-videos-dialog-content"+ >+ <div className="shrink-0 px-4 pb-3 pt-4 text-center sm:p-6 sm:pb-4 sm:text-left">+ <h2+ className={cn(+ "pr-6 text-center text-xl font-semibold tracking-tight sm:text-2xl",+ titleClassName,+ )}+ >+ {title ?? activeVideo.title}+ </h2>+ <p+ className={cn(+ "mt-1.5 text-center text-sm leading-relaxed text-slate-500 dark:text-slate-400",+ descriptionClassName,+ )}+ >+ {description ?? activeVideo.description}+ </p>+ </div>++ <div className="flex justify-center px-4 pb-3 sm:px-6 sm:pb-4">+ <div className="-mx-4 overflow-x-auto px-4 [scrollbar-width:none] sm:mx-0 sm:overflow-visible sm:px-0 [&::-webkit-scrollbar]:hidden">+ <Tabs value={activeVideoId} onValueChange={handleTabChange}>+ <TabsList className="inline-flex h-auto w-max min-w-full justify-center gap-0.5 sm:min-w-0 sm:gap-1">+ {HOW_IT_WORKS_VIDEOS.map((video) => (+ <TabsTrigger+ key={video.id}+ value={video.id}+ className="shrink-0 whitespace-nowrap px-2.5 py-1 text-xs sm:px-3 sm:py-1.5 sm:text-sm"+ data-testid={`how-it-works-tab-${video.id}`}+ >+ <span className="sm:hidden">{video.tabLabelShort}</span>+ <span className="hidden sm:inline">{video.tabLabel}</span>+ </TabsTrigger>+ ))}+ </TabsList>+ </Tabs>+ </div>+ </div>++ <div className="aspect-video min-h-[300px] w-full shrink-0 overflow-hidden">+ {showIframe ? (+ <iframe+ key={activeVideoId}+ src={activeVideo.embedUrl}+ title={activeVideo.iframeTitle}+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"+ referrerPolicy="strict-origin-when-cross-origin"+ allowFullScreen+ className="h-full w-full border-0"+ data-testid="how-it-works-video"+ />+ ) : null}+ </div>++ <div className="shrink-0 border-t border-slate-200 px-4 py-3 text-center text-xs leading-relaxed text-slate-600 sm:px-6 sm:py-4 sm:text-left sm:text-sm">+ Questions or feedback? Join our{" "}+ <a+ href={DISCORD_COMMUNITY_URL}+ target="_blank"+ rel="noopener noreferrer"+ className="font-semibold text-slate-800 underline decoration-slate-400 underline-offset-2 transition-colors hover:text-slate-950 hover:decoration-slate-500"+ data-testid="how-it-works-discord"+ onClick={() => umamiTrackEvent("how-it-works-discord-click")}+ >+ Discord+ </a>{" "}+ or{" "}+ <a+ href={REDDIT_COMMUNITY_URL}+ target="_blank"+ rel="noopener noreferrer"+ className="font-semibold text-slate-800 underline decoration-slate-400 underline-offset-2 transition-colors hover:text-slate-950 hover:decoration-slate-500"+ data-testid="how-it-works-reddit"+ onClick={() => umamiTrackEvent("how-it-works-reddit-click")}+ >+ </a>{" "}+ community.+ </div>+ </div>+ );+}diff --git a/src/app/(app)/components/invoice-form/sections/general-information.tsx b/src/app/(app)/components/invoice-form/sections/general-information.tsxindex a72c047..aa46578 100644--- a/src/app/(app)/components/invoice-form/sections/general-information.tsx+++ b/src/app/(app)/components/invoice-form/sections/general-information.tsx@@ -387,7 +387,10 @@ export const GeneralInformation = memo(function GeneralInformation({<SelectNative{...field}id={`dateFormat`}- className={cn("block", inputErrorClassName(!!errors.dateFormat))}+ className={cn(+ "block",+ inputErrorClassName(!!errors.dateFormat),+ )}>{SUPPORTED_DATE_FORMATS.map((format) => {const preview = dayjs().locale(language).format(format);diff --git a/src/app/(app)/components/invoice-page-header.tsx b/src/app/(app)/components/invoice-page-header.tsxindex c5900c5..6612309 100644--- a/src/app/(app)/components/invoice-page-header.tsx+++ b/src/app/(app)/components/invoice-page-header.tsx@@ -3,19 +3,13 @@import { type InvoiceData } from "@/app/schema";import { ProjectLogo } from "@/components/etc/project-logo";import { Button } from "@/components/ui/button";-import {- Dialog,- DialogContent,- DialogDescription,- DialogHeader,- DialogTitle,-} from "@/components/ui/dialog";+import { HowItWorksVideoDialog } from "@/app/(app)/components/how-it-works-video-dialog";import { CustomTooltip } from "@/components/ui/tooltip";import { InvoicePDFDownloadLink } from "@/app/(app)/components/invoice-pdf-download-link";import { ProjectLogoDescription } from "@/app/(components)/project-logo-description";import { GithubIcon } from "@/components/etc/github-logo";-import { GITHUB_URL, VIDEO_DEMO_YOUTUBE_URL } from "@/config";+import { DISCORD_COMMUNITY_URL, GITHUB_URL } from "@/config";import { umamiTrackEvent } from "@/lib/umami-analytics-track-event";import { cn } from "@/lib/utils";import { AlertCircleIcon, LinkIcon } from "lucide-react";@@ -192,9 +186,10 @@ function ProjectInfoLinks() {</button><span className="h-3 w-px bg-slate-500" aria-hidden="true" /><a- href="https://dub.sh/easy-invoice-pdf-feedback"- className="inline-flex items-center transition duration-200 hover:text-blue-600 hover:underline active:scale-[0.96]"+ href={DISCORD_COMMUNITY_URL}target="_blank"+ rel="noopener noreferrer"+ className="inline-flex items-center transition duration-200 hover:text-blue-600 hover:underline active:scale-[0.96]">Share your feedback</a>@@ -218,28 +213,10 @@ function ProjectInfoLinks() {</div></div>- <Dialog open={isVideoDialogOpen} onOpenChange={setIsVideoDialogOpen}>- <DialogContent className="max-h-[calc(100vh-2rem)] gap-0 overflow-hidden p-0 sm:max-w-[800px]">- <DialogHeader className="p-6 pb-4">- <DialogTitle>How EasyInvoicePDF Works</DialogTitle>- <DialogDescription>- Watch this quick demo to learn how to create and customize your- invoices.- </DialogDescription>- </DialogHeader>- <div className="aspect-video w-full overflow-hidden">- <iframe- src={VIDEO_DEMO_YOUTUBE_URL}- title="EasyInvoicePDF Demo Video"- allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"- referrerPolicy="strict-origin-when-cross-origin"- allowFullScreen- className="h-full w-full border-0"- data-testid="how-it-works-video"- />- </div>- </DialogContent>- </Dialog>+ <HowItWorksVideoDialog+ open={isVideoDialogOpen}+ onOpenChange={setIsVideoDialogOpen}+ /></>);}diff --git a/src/app/(app)/hooks/use-changelog-update-popup.ts b/src/app/(app)/hooks/use-changelog-update-popup.tsnew file mode 100644index 0000000..01eebaa--- /dev/null+++ b/src/app/(app)/hooks/use-changelog-update-popup.ts@@ -0,0 +1,104 @@+"use client";++import type { ChangelogSummary } from "@/app/changelog/utils";+import { shouldShowChangelogPopup } from "@/app/(app)/utils/changelog-seen-storage";+import { hasSeenWelcomePopup } from "@/app/(app)/utils/welcome-popup-seen-storage";+import { useCallback, useEffect, useState } from "react";++/** Wait before showing so the page can settle first */+const SHOW_DELAY_MS = 1_500;++export type AppUpdatePopupVariant = "welcome" | "changelog";++interface UseChangelogUpdatePopupOptions {+ latestChangelog: ChangelogSummary | null;+ isViewingSharedInvoice: boolean;+ isMobile: boolean;+}++interface UseChangelogUpdatePopupResult {+ isOpen: boolean;+ dismiss: () => void;+ variant: AppUpdatePopupVariant | null;+ latestChangelog: ChangelogSummary | null;+}++function resolvePopupVariant(+ latestChangelog: ChangelogSummary | null,+): AppUpdatePopupVariant | null {+ if (!hasSeenWelcomePopup()) {+ return "welcome";+ }++ if (latestChangelog && shouldShowChangelogPopup(latestChangelog.slug)) {+ return "changelog";+ }++ return null;+}++/**+ * Hook to manage showing welcome or changelog update popup to user.+ *+ * Shows welcome popup on first visit, then changelog popup when a new+ * changelog version is unseen. Never shows in CI, on mobile, or when+ * viewing a shared invoice.+ */+export function useChangelogUpdatePopup({+ latestChangelog,+ isViewingSharedInvoice,+ isMobile,+}: UseChangelogUpdatePopupOptions): UseChangelogUpdatePopupResult {+ const [isOpen, setIsOpen] = useState(false);+ const [variant, setVariant] = useState<AppUpdatePopupVariant | null>(null);+ const [isMounted, setIsMounted] = useState(false);++ const dismiss = useCallback(() => {+ setIsOpen(false);+ }, []);++ useEffect(() => {+ // Never show popup in CI or on mobile, unmount if these become true+ if (process.env.CI || isMobile) {+ setIsMounted(false);+ setIsOpen(false);+ setVariant(null);+ return;+ }++ // Never show popup if viewing a shared invoice+ if (isViewingSharedInvoice) {+ return;+ }++ // Determine which popup (welcome/changelog) to show, if any+ const nextVariant = resolvePopupVariant(latestChangelog);++ // If no popup needed, reset state and exit+ if (!nextVariant) {+ setIsMounted(false);+ setIsOpen(false);+ setVariant(null);+ return;+ }++ // Delay showing the popup for a nicer UX+ const timer = window.setTimeout(() => {+ setVariant(nextVariant);+ setIsMounted(true);+ setIsOpen(true);+ }, SHOW_DELAY_MS);++ // Cleanup timeout if dependencies change/unmount+ return () => {+ window.clearTimeout(timer);+ };+ }, [isMobile, isViewingSharedInvoice, latestChangelog]);++ return {+ isOpen: isOpen && isMounted,+ dismiss,+ variant,+ latestChangelog: variant === "changelog" ? latestChangelog : null,+ };+}diff --git a/src/app/(app)/page.client.tsx b/src/app/(app)/page.client.tsxindex 5394b98..1332b60 100644--- a/src/app/(app)/page.client.tsx+++ b/src/app/(app)/page.client.tsx@@ -37,9 +37,13 @@ import { useCallback, useEffect, useRef, useState } from "react";import { toast } from "sonner";import { z } from "zod";import { InvoiceClientPage } from "./components";+import { ChangelogUpdatePopup } from "./components/changelog-update-popup";+import { HowItWorksVideoDialog } from "./components/how-it-works-video-dialog";import { showRandomCTAToast } from "./components/cta-toasts";import { useCTAToast } from "./contexts/cta-toast-context";+import { useChangelogUpdatePopup } from "./hooks/use-changelog-update-popup";import { useShowRandomCTAToastOnIdle } from "./hooks/use-show-random-cta-toast";+import type { ChangelogSummary } from "@/app/changelog/utils";import { generateQrCodeDataUrl } from "./utils/generate-qr-code-data-url";import { handleInvoiceNumberBreakingChange } from "./utils/invoice-number-breaking-change";@@ -63,8 +67,10 @@ import { handleInvoiceNumberBreakingChange } from "./utils/invoice-number-breaki*/export function AppPageClient({githubStarsCount,+ latestChangelog,}: {githubStarsCount: number;+ latestChangelog: ChangelogSummary | null;}) {const router = useRouter();const searchParams = useSearchParams();@@ -108,6 +114,19 @@ export function AppPageClient({const isViewingSharedInvoice =searchParams.get("data") !== null && !isInvoiceUrlCorrupted;+ const {+ isOpen: isChangelogPopupOpen,+ dismiss: dismissChangelogPopup,+ variant: changelogPopupVariant,+ latestChangelog: changelogForPopup,+ } = useChangelogUpdatePopup({+ latestChangelog,+ isViewingSharedInvoice,+ isMobile,+ });++ const [isHowItWorksDialogOpen, setIsHowItWorksDialogOpen] = useState(false);+const [invoiceFormHasErrors, setInvoiceFormHasErrors] = useState(false);// Refs to track original URL invoice data@@ -729,6 +748,19 @@ export function AppPageClient({</div></div><Footer />+ {changelogPopupVariant ? (+ <ChangelogUpdatePopup+ variant={changelogPopupVariant}+ latestChangelog={changelogForPopup}+ isOpen={isChangelogPopupOpen}+ onDismiss={dismissChangelogPopup}+ onHowItWorksClick={() => setIsHowItWorksDialogOpen(true)}+ />+ ) : null}+ <HowItWorksVideoDialog+ open={isHowItWorksDialogOpen}+ onOpenChange={setIsHowItWorksDialogOpen}+ /><div className="fixed right-1.5 top-1.5 z-50 duration-500 animate-in fade-in slide-in-from-top-4"><GitHubStarCTA githubStarsCount={githubStarsCount} /></div>diff --git a/src/app/(app)/page.tsx b/src/app/(app)/page.tsxindex c403685..5b1ef12 100644--- a/src/app/(app)/page.tsx+++ b/src/app/(app)/page.tsx@@ -2,7 +2,9 @@ import type { Metadata } from "next";import { AppPageClient } from "./page.client";import { APP_URL, STATIC_ASSETS_URL, TWITTER_CREATOR } from "@/config";import { fetchGithubStars } from "@/actions/fetch-github-stars";+import { getLatestChangelogSummary } from "@/app/changelog/utils";import { CTAToastProvider } from "./contexts/cta-toast-context";+import * as Sentry from "@sentry/nextjs";const APP_PAGE_DESCRIPTION ="Create invoices online for free with our PDF invoice generator. Customize templates, download instantly, no signup required.";@@ -155,11 +157,28 @@ export async function generateMetadata({}export default async function AppPage() {- const githubStarsCount = await fetchGithubStars();+ const [githubStarsCount, latestChangelog] = await Promise.all([+ fetchGithubStars(),+ getLatestChangelogSummary().catch((error) => {+ // don't fail the page if we can't load the latest changelog summary+ console.error("[AppPage] Failed to load latest changelog summary", error);++ Sentry.captureException(+ new Error(+ `[AppPage] Failed to load latest changelog summary: ${error}`,+ ),+ );++ return null;+ }),+ ]);return (<CTAToastProvider>- <AppPageClient githubStarsCount={githubStarsCount} />+ <AppPageClient+ githubStarsCount={githubStarsCount}+ latestChangelog={latestChangelog}+ /></CTAToastProvider>);}diff --git a/src/app/(app)/utils/changelog-seen-storage.ts b/src/app/(app)/utils/changelog-seen-storage.tsnew file mode 100644index 0000000..ac0f799--- /dev/null+++ b/src/app/(app)/utils/changelog-seen-storage.ts@@ -0,0 +1,33 @@+"use client";++import { isLocalStorageAvailable } from "@/lib/check-local-storage";++const CHANGELOG_SEEN_STORAGE_KEY = "EASY_INVOICE_LAST_SEEN_CHANGELOG_SLUG";++function getLastSeenChangelogSlug(): string | null {+ if (!isLocalStorageAvailable) {+ return null;+ }++ try {+ return localStorage.getItem(CHANGELOG_SEEN_STORAGE_KEY);+ } catch {+ return null;+ }+}++export function markChangelogAsSeen(slug: string): void {+ if (!isLocalStorageAvailable) {+ return;+ }++ try {+ localStorage.setItem(CHANGELOG_SEEN_STORAGE_KEY, slug);+ } catch {}+}++export function shouldShowChangelogPopup(latestSlug: string): boolean {+ const lastSeenSlug = getLastSeenChangelogSlug();++ return lastSeenSlug !== latestSlug;+}diff --git a/src/app/(app)/utils/welcome-popup-seen-storage.ts b/src/app/(app)/utils/welcome-popup-seen-storage.tsnew file mode 100644index 0000000..981fe8d--- /dev/null+++ b/src/app/(app)/utils/welcome-popup-seen-storage.ts@@ -0,0 +1,35 @@+"use client";++import { isLocalStorageAvailable } from "@/lib/check-local-storage";++const WELCOME_POPUP_SEEN_STORAGE_KEY = "EASY_INVOICE_WELCOME_POPUP_SEEN";++const WELCOME_POPUP_SEEN_VALUE = "v1";++export function hasSeenWelcomePopup() {+ if (!isLocalStorageAvailable) {+ return false;+ }++ try {+ return (+ localStorage.getItem(WELCOME_POPUP_SEEN_STORAGE_KEY) ===+ WELCOME_POPUP_SEEN_VALUE+ );+ } catch {+ return false;+ }+}++export function markWelcomePopupSeen() {+ if (!isLocalStorageAvailable) {+ return;+ }++ try {+ localStorage.setItem(+ WELCOME_POPUP_SEEN_STORAGE_KEY,+ WELCOME_POPUP_SEEN_VALUE,+ );+ } catch {}+}diff --git a/src/app/(components)/footer.tsx b/src/app/(components)/footer.tsxindex 58570de..be4c739 100644--- a/src/app/(components)/footer.tsx+++ b/src/app/(components)/footer.tsx@@ -1,7 +1,13 @@/* eslint-disable @next/next/no-html-link-for-pages */import { SEO_FOOTER_SOLUTION_LINKS } from "@/app/(seo-landings)/seo-landing-footer-links";import { ProjectLogo } from "@/components/etc/project-logo";-import { GITHUB_URL, TWITTER_URL } from "@/config";+import {+ DISCORD_COMMUNITY_URL,+ GITHUB_URL,+ PRODUCT_TWITTER_URL,+ REDDIT_COMMUNITY_URL,+ TWITTER_URL,+} from "@/config";import Link from "next/link";interface FooterProps {@@ -79,8 +85,10 @@ export function Footer({ links, translations }: FooterProps) {</div></div><div className="grid grid-cols-1 gap-10 md:ml-20 md:flex-1 md:grid-cols-2">- <div className="space-y-3" data-testid="footer-solutions-links">- <h3 className="text-sm font-medium text-slate-900">Solutions</h3>+ <div className="space-y-5" data-testid="footer-solutions-links">+ <h3 className="text-base font-semibold text-slate-800">+ Solutions+ </h3><ul className="space-y-2">{SEO_FOOTER_SOLUTION_LINKS.map(({ slug, label }) => (<li key={slug}>@@ -94,8 +102,8 @@ export function Footer({ links, translations }: FooterProps) {))}</ul></div>- <div className="space-y-3" data-testid="footer-social-links">- <h3 className="text-sm font-medium text-slate-900">+ <div className="space-y-5" data-testid="footer-social-links">+ <h3 className="text-base font-semibold text-slate-800">{resources}</h3>{footerLinks}@@ -175,68 +183,79 @@ const DEFAULT_FOOTER_DESCRIPTION = (</>);-function DefaultFooterLinks() {- return (- <ul className="space-y-2">- <li>- <Link href="/" className="text-sm text-slate-500 hover:text-slate-900">- Invoice Generator- </Link>- </li>- <li>- <Link- href="/en/about"- className="text-sm text-slate-500 hover:text-slate-900"- >- About Us- </Link>- </li>+const FOOTER_LINK_CLASSNAME = "text-sm text-slate-500 hover:text-slate-900";++interface FooterLinkItem {+ href: string;+ label: string;+ external?: boolean;+}- <li>- <Link- href={GITHUB_URL}- target="_blank"- rel="noopener noreferrer"- className="text-sm text-slate-500 hover:text-slate-900"- >- GitHub- </Link>- </li>+export function FooterLinkGroup({+ heading,+ links,+}: {+ heading: string;+ links: FooterLinkItem[];+}) {+ return (+ <div className="space-y-2">+ <p className="text-sm font-light uppercase tracking-wide text-slate-900">+ {heading}+ </p>+ <ul className="space-y-2">+ {links.map((link) => (+ <li key={`${heading}-${link.label}`}>+ <Link+ href={link.href}+ className={FOOTER_LINK_CLASSNAME}+ {...(link.external+ ? { target: "_blank", rel: "noopener noreferrer" }+ : {})}+ >+ {link.label}+ </Link>+ </li>+ ))}+ </ul>+ </div>+ );+}- <li>- <Link- href="/tos"- className="text-sm text-slate-500 hover:text-slate-900"- >- Terms of Service- </Link>- </li>- <li>- <Link- href="https://pdfinvoicegenerator.userjot.com/?cursor=1&order=top&limit=10"- target="_blank"- rel="noopener noreferrer"- className="text-sm text-slate-500 hover:text-slate-900"- >- Share feedback- </Link>- </li>- <li>- <Link- href="/founder"- className="text-sm text-slate-500 hover:text-slate-900"- >- Founder- </Link>- </li>- <li>- <Link- href="/llms.txt"- className="text-sm text-slate-500 hover:text-slate-900"- >- llms.txt- </Link>- </li>- </ul>+function DefaultFooterLinks() {+ return (+ <div className="grid grid-cols-1 gap-6 sm:grid-cols-2">+ <FooterLinkGroup+ heading="Product"+ links={[+ { href: "/", label: "Invoice Generator" },+ { href: GITHUB_URL, label: "GitHub", external: true },+ { href: "/how-it-works", label: "How it works" },+ { href: "/changelog", label: "Changelog" },+ { href: "/llms.txt", label: "llms.txt" },+ ]}+ />+ <FooterLinkGroup+ heading="Company"+ links={[+ { href: "/en/about", label: "About Us" },+ { href: "/founder", label: "Founder" },+ { href: "/tos", label: "Terms of Service" },+ ]}+ />+ <FooterLinkGroup+ heading="Community"+ links={[+ {+ href: DISCORD_COMMUNITY_URL,+ label: "Share feedback",+ external: true,+ },+ { href: DISCORD_COMMUNITY_URL, label: "Discord", external: true },+ { href: REDDIT_COMMUNITY_URL, label: "Reddit", external: true },+ { href: PRODUCT_TWITTER_URL, label: "X (Twitter)", external: true },+ ]}+ />+ </div>);}diff --git a/src/app/[locale]/about/page.tsx b/src/app/[locale]/about/page.tsxindex 43969cd..bdaed50 100644--- a/src/app/[locale]/about/page.tsx+++ b/src/app/[locale]/about/page.tsx@@ -1,5 +1,5 @@import { GithubIcon } from "@/components/etc/github-logo";-import { Footer } from "@/app/(components)/footer";+import { Footer, FooterLinkGroup } from "@/app/(components)/footer";import {BlackGoToAppButton,GoToAppButton,@@ -10,8 +10,11 @@ import { FaqAccordion, FaqAccordionItem } from "@/components/ui/faq-accordion";import { TooltipProvider } from "@/components/ui/tooltip";import { AutoPlayVideo, ManualPlayVideo } from "@/components/video";import {+ DISCORD_COMMUNITY_URL,GITHUB_URL,MARKETING_FEATURES_CARDS,+ PRODUCT_TWITTER_URL,+ REDDIT_COMMUNITY_URL,VIDEO_DEMO_FALLBACK_IMG,VIDEO_DEMO_URL,} from "@/config";@@ -96,85 +99,66 @@ export default function AboutPage({ params }: { params: { locale: Locale } }) {resources: t("footer.links.resources"),}}links={- <ul className="space-y-2">- <li>- <Link- href="/?template=default"- className="text-sm text-slate-500 hover:text-slate-900"- >- {t("footer.links.invoiceGenerator")}- </Link>- </li>- <li>- <Link- href={GITHUB_URL}- target="_blank"- rel="noopener noreferrer"- className="text-sm text-slate-500 hover:text-slate-900"- >- {t("footer.links.github")}- </Link>- </li>- <li>- <Link- href="#features"- className="text-sm text-slate-500 hover:text-slate-900"- >- {t("footer.links.features")}- </Link>- </li>- <li>- <Link- href="#faq"- className="text-sm text-slate-500 hover:text-slate-900"- >- FAQ- </Link>- </li>- <li>- <Link- href="/changelog"- className="text-sm text-slate-500 hover:text-slate-900"- >- {t("footer.links.changelog")}- </Link>- </li>-- <li>- <Link- href="/tos"- className="text-sm text-slate-500 hover:text-slate-900"- >- {t("footer.links.termsOfService")}- </Link>- </li>- <li>- <Link- href="https://pdfinvoicegenerator.userjot.com/?cursor=1&order=top&limit=10"- target="_blank"- rel="noopener noreferrer"- className="text-sm text-slate-500 hover:text-slate-900"- >- {t("buttons.shareFeedback")}- </Link>- </li>- <li>- <Link- href="/founder"- className="text-sm text-slate-500 hover:text-slate-900"- >- {t("footer.links.founder")}- </Link>- </li>- <li>- <Link- href="/llms.txt"- className="text-sm text-slate-500 hover:text-slate-900"- >- llms.txt- </Link>- </li>- </ul>+ <div className="grid grid-cols-1 gap-6 sm:grid-cols-2">+ <FooterLinkGroup+ heading={t("footer.headings.product")}+ links={[+ {+ href: "/?template=default",+ label: t("footer.links.invoiceGenerator"),+ },+ {+ href: GITHUB_URL,+ label: t("footer.links.github"),+ external: true,+ },+ { href: "#features", label: t("footer.links.features") },+ { href: "#faq", label: "FAQ" },+ {+ href: "/how-it-works",+ label: t("footer.links.howItWorks"),+ },+ { href: "/changelog", label: t("footer.links.changelog") },+ { href: "/llms.txt", label: "llms.txt" },+ ]}+ />+ <FooterLinkGroup+ heading={t("footer.headings.company")}+ links={[+ {+ href: `/${locale}/about`,+ label: t("buttons.home"),+ },+ { href: "/founder", label: t("footer.links.founder") },+ { href: "/tos", label: t("footer.links.termsOfService") },+ ]}+ />+ <FooterLinkGroup+ heading={t("footer.headings.community")}+ links={[+ {+ href: DISCORD_COMMUNITY_URL,+ label: t("buttons.shareFeedback"),+ external: true,+ },+ {+ href: DISCORD_COMMUNITY_URL,+ label: "Discord",+ external: true,+ },+ {+ href: REDDIT_COMMUNITY_URL,+ label: "Reddit",+ external: true,+ },+ {+ href: PRODUCT_TWITTER_URL,+ label: "X (Twitter)",+ external: true,+ },+ ]}+ />+ </div>}/></div>diff --git a/src/app/changelog/content/easy-invoice-pdf-launch.mdx b/src/app/changelog/content/easy-invoice-pdf-launch.mdxindex 0ca0cb4..b5b6384 100644--- a/src/app/changelog/content/easy-invoice-pdf-launch.mdx+++ b/src/app/changelog/content/easy-invoice-pdf-launch.mdx@@ -80,14 +80,12 @@ Automatically calculate European VAT rates and totals for your invoices. Complia<div className="rounded-lg border-2 border-blue-200 bg-blue-50 px-8 py-4 dark:border-blue-900 dark:bg-blue-950" data-testid="ready-to-start-invoicing-cta"><h2 className="!mt-4">Ready to start invoicing?</h2>-Create professional invoices instantly with our free, open-source PDF-generator. Add QR codes, custom logos, and accept payments in multiple-currencies - no sign-up required. Start creating your first invoice now.+Make invoices fast with EasyInvoicePDF, free open-source PDF tool. No sign-up needed. Create your invoice now.<div className="mt-6"><ahref="https://easyinvoicepdf.com?ref=changelog"- className="inline-flex h-12 w-full items-center justify-center rounded-lg bg-slate-900 px-8 text-lg font-medium no-underline transition-colors hover:bg-slate-800"+ className="inline-flex h-12 w-full items-center justify-center rounded-lg bg-slate-900 px-8 text-lg font-medium no-underline transition-all hover:bg-slate-800 active:scale-[0.98]"><span className="text-white">Start Invoicing</span></a>diff --git a/src/app/changelog/content/qr-codes-and-improvements.mdx b/src/app/changelog/content/qr-codes-and-improvements.mdxindex 70de331..006a4b3 100644--- a/src/app/changelog/content/qr-codes-and-improvements.mdx+++ b/src/app/changelog/content/qr-codes-and-improvements.mdx@@ -43,14 +43,12 @@ export const metadata = {<div className="rounded-lg border-2 border-blue-200 bg-blue-50 px-8 py-4 dark:border-blue-900 dark:bg-blue-950" data-testid="ready-to-start-invoicing-cta"><h2 className="!mt-4">Ready to start invoicing?</h2>-Create professional invoices instantly with our free, open-source PDF-generator. Add QR codes, custom logos, and accept payments in multiple-currencies - no sign-up required. Start creating your first invoice now.+Make invoices fast with EasyInvoicePDF, free open-source PDF tool. No sign-up needed. Create your invoice now.<div className="mt-6"><ahref="https://easyinvoicepdf.com?ref=changelog"- className="inline-flex h-12 w-full items-center justify-center rounded-lg bg-slate-900 px-8 text-lg font-medium no-underline transition-colors hover:bg-slate-800"+ className="inline-flex h-12 w-full items-center justify-center rounded-lg bg-slate-900 px-8 text-lg font-medium no-underline transition-all hover:bg-slate-800 active:scale-[0.98]"><span className="text-white">Start Invoicing</span></a>diff --git a/src/app/changelog/content/seller-buyer-improvements.mdx b/src/app/changelog/content/seller-buyer-improvements.mdxindex 3aca747..fae5cc3 100644--- a/src/app/changelog/content/seller-buyer-improvements.mdx+++ b/src/app/changelog/content/seller-buyer-improvements.mdx@@ -10,8 +10,8 @@ export const metadata = {## ✨ Highlights-- **Seller & Buyer Email visibility toggle** — control whether the email address appears in the generated PDF-- **`ConfirmDiscardDialog`** component to warn users about unsaved changes when closing the buyer/seller dialogs+- **Seller & Buyer Email visibility toggle** - control whether the email address appears in the generated PDF+- **ConfirmDiscardDialog** component warns before discarding unsaved changes in buyer/seller dialogs- **Reworked seller and buyer information form sections** with improved layout, locked-state banners, and cleaner field grouping- **Auto-scroll the invoice form on mobile** when switching between tabs (UX improvement)- **Out-of-Date dates helper** shows outdated fields and provides a button to update all dates at once@@ -44,14 +44,12 @@ export const metadata = {<div className="rounded-lg border-2 border-blue-200 bg-blue-50 px-8 py-4 dark:border-blue-900 dark:bg-blue-950" data-testid="ready-to-start-invoicing-cta"><h2 className="!mt-4">Ready to start invoicing?</h2>-Create professional invoices instantly with our free, open-source PDF-generator. Add QR codes, custom logos, and accept payments in multiple-currencies - no sign-up required. Start creating your first invoice now.+Make invoices fast with EasyInvoicePDF, free open-source PDF tool. No sign-up needed. Create your invoice now.<div className="mt-6"><ahref="https://easyinvoicepdf.com?ref=changelog"- className="inline-flex h-12 w-full items-center justify-center rounded-lg bg-slate-900 px-8 text-lg font-medium no-underline transition-colors hover:bg-slate-800"+ className="inline-flex h-12 w-full items-center justify-center rounded-lg bg-slate-900 px-8 text-lg font-medium no-underline transition-all hover:bg-slate-800 active:scale-[0.98]"><span className="text-white">Start Invoicing</span></a>diff --git a/src/app/changelog/content/stripe-pdf-template.mdx b/src/app/changelog/content/stripe-pdf-template.mdxindex ac3307f..3b0bc4b 100644--- a/src/app/changelog/content/stripe-pdf-template.mdx+++ b/src/app/changelog/content/stripe-pdf-template.mdx@@ -54,14 +54,12 @@ export const metadata = {<div className="rounded-lg border-2 border-blue-200 bg-blue-50 px-8 py-4 dark:border-blue-900 dark:bg-blue-950" data-testid="ready-to-start-invoicing-cta"><h2 className="!mt-4">Ready to start invoicing?</h2>-Create professional invoices instantly with our free, open-source PDF-generator. Add QR codes, custom logos, and accept payments in multiple-currencies - no sign-up required. Start creating your first invoice now.+Make invoices fast with EasyInvoicePDF, free open-source PDF tool. No sign-up needed. Create your invoice now.<div className="mt-6"><ahref="https://easyinvoicepdf.com?ref=changelog"- className="inline-flex h-12 w-full items-center justify-center rounded-lg bg-slate-900 px-8 text-lg font-medium no-underline transition-colors hover:bg-slate-800"+ className="inline-flex h-12 w-full items-center justify-center rounded-lg bg-slate-900 px-8 text-lg font-medium no-underline transition-all hover:bg-slate-800 active:scale-[0.98]"><span className="text-white">Start Invoicing</span></a>diff --git a/src/app/changelog/utils.ts b/src/app/changelog/utils.tsindex 2019a8a..5539303 100644--- a/src/app/changelog/utils.ts+++ b/src/app/changelog/utils.ts@@ -3,6 +3,14 @@ import { readdir } from "fs/promises";import { join } from "path";import { z } from "zod";+export interface ChangelogSummary {+ slug: string;+ title: string;+ description: string;+ version?: string;+ date: string;+}+/** Maps metadata `version` (e.g. "1.0.1") to the GitHub release tag name. */const changelogVersionToReleaseTag: Record<string, string> = {"1.0.0": "EasyInvoicePDF-v1.0.0",@@ -48,6 +56,27 @@ const changelogEntryMetadataSchema = z.object({type: z.enum(["major", "minor", "patch"]).optional(),});+/**+ * Returns the newest changelog entry metadata without the MDX component.+ */+export async function getLatestChangelogSummary(): Promise<ChangelogSummary | null> {+ const [latest] = await getChangelogEntries();++ if (!latest) {+ return null;+ }++ const { slug, metadata } = latest;++ return {+ slug,+ title: metadata.title,+ description: metadata.description,+ version: metadata.version,+ date: metadata.date,+ };+}+/*** Gets all MDX files from the content/changelog directory*/diff --git a/src/app/constants/seo.ts b/src/app/constants/seo.tsindex bf1521a..7509b6a 100644--- a/src/app/constants/seo.ts+++ b/src/app/constants/seo.ts@@ -116,6 +116,13 @@ export const SITE_NAVIGATION_JSONLD = {description: "Latest updates and improvements to the application",url: "https://easyinvoicepdf.com/changelog",},+ {+ "@type": "SiteNavigationElement",+ name: "How it works",+ description:+ "Video tutorials for creating invoices, saving seller and buyer details, and weekly invoicing",+ url: "https://easyinvoicepdf.com/how-it-works",+ },],} as const satisfies WithContext<SiteNavigationElement>;diff --git a/src/app/how-it-works/build-how-it-works-json-ld.ts b/src/app/how-it-works/build-how-it-works-json-ld.tsnew file mode 100644index 0000000..d7891e2--- /dev/null+++ b/src/app/how-it-works/build-how-it-works-json-ld.ts@@ -0,0 +1,44 @@+import { APP_URL, HOW_IT_WORKS_VIDEOS } from "@/config";+import type { Graph } from "schema-dts";++export function buildHowItWorksJsonLd(baseUrl = APP_URL): Graph {+ const pageUrl = `${baseUrl}/how-it-works` as const;++ const videoItems = HOW_IT_WORKS_VIDEOS.map((video, index) => ({+ "@type": "ListItem" as const,+ position: index + 1,+ item: {+ "@type": "VideoObject" as const,+ name: video.title,+ description: video.description,+ embedUrl: video.embedUrl,+ contentUrl: video.watchUrl,+ url: `${pageUrl}#${video.id}`,+ publisher: {+ "@type": "Organization" as const,+ name: "EasyInvoicePDF",+ url: baseUrl,+ },+ },+ }));++ return {+ "@context": "https://schema.org",+ "@graph": [+ {+ "@type": "WebPage",+ "@id": pageUrl,+ url: pageUrl,+ name: "How EasyInvoicePDF Works | Video Tutorials",+ description:+ "Watch step-by-step video tutorials on creating invoices, saving seller and buyer details, and generating weekly invoices with EasyInvoicePDF.",+ mainEntity: {+ "@type": "ItemList",+ "@id": `${pageUrl}#tutorials`,+ name: "EasyInvoicePDF video tutorials",+ itemListElement: videoItems,+ },+ },+ ],+ };+}diff --git a/src/app/how-it-works/how-it-works-json-ld.tsx b/src/app/how-it-works/how-it-works-json-ld.tsxnew file mode 100644index 0000000..419a0bc--- /dev/null+++ b/src/app/how-it-works/how-it-works-json-ld.tsx@@ -0,0 +1,13 @@+import { buildHowItWorksJsonLd } from "./build-how-it-works-json-ld";++export function HowItWorksJsonLd() {+ const graph = buildHowItWorksJsonLd();++ return (+ <script+ id="json-ld-how-it-works"+ type="application/ld+json"+ dangerouslySetInnerHTML={{ __html: JSON.stringify(graph) }}+ />+ );+}diff --git a/src/app/how-it-works/layout.tsx b/src/app/how-it-works/layout.tsxnew file mode 100644index 0000000..f3fcfab--- /dev/null+++ b/src/app/how-it-works/layout.tsx@@ -0,0 +1,97 @@+import { Footer } from "@/app/(components)/footer";+import { Header } from "@/app/(components)/header";+import {+ PERSONAL_WEBSITE_URL,+ STATIC_ASSETS_URL,+ TWITTER_CREATOR,+} from "@/config";+import type { Metadata } from "next";+import { HowItWorksJsonLd } from "./how-it-works-json-ld";++export const dynamic = "force-static";++const HOW_IT_WORKS_PAGE_URL = "https://easyinvoicepdf.com/how-it-works";++const PAGE_TITLE = "How EasyInvoicePDF Works | Video Tutorials";++const PAGE_DESCRIPTION =+ "Watch step-by-step video tutorials on creating invoices, saving seller and buyer details, and generating weekly invoices with EasyInvoicePDF.";++export const metadata: Metadata = {+ title: PAGE_TITLE,+ description: PAGE_DESCRIPTION,+ keywords: [+ "how easyinvoicepdf works",+ "invoice generator tutorial",+ "create invoice video",+ "add seller invoice",+ "add buyer invoice",+ "weekly invoices",+ "easyinvoicepdf demo",+ "pdf invoice generator guide",+ ],+ authors: [{ name: "Uladzislau Sazonau", url: PERSONAL_WEBSITE_URL }],+ creator: "Uladzislau Sazonau",+ publisher: "Uladzislau Sazonau",+ alternates: {+ canonical: HOW_IT_WORKS_PAGE_URL,+ },+ robots: {+ index: true,+ follow: true,+ googleBot: {+ index: true,+ follow: true,+ "max-video-preview": -1,+ "max-image-preview": "large",+ "max-snippet": -1,+ },+ },+ openGraph: {+ title: PAGE_TITLE,+ description: PAGE_DESCRIPTION,+ siteName: "EasyInvoicePDF.com | Free Invoice PDF Generator",+ type: "website",+ locale: "en_US",+ url: HOW_IT_WORKS_PAGE_URL,+ images: [+ {+ url: `${STATIC_ASSETS_URL}/easy-invoice-opengraph-image.png?v=1755773879597`,+ type: "image/png",+ width: 1200,+ height: 630,+ alt: "EasyInvoicePDF.com - Free Invoice PDF Generator",+ },+ ],+ },+ twitter: {+ card: "summary_large_image",+ title: PAGE_TITLE,+ description: PAGE_DESCRIPTION,+ creator: TWITTER_CREATOR,+ images: [+ {+ url: `${STATIC_ASSETS_URL}/easy-invoice-opengraph-image.png?v=1755773879597`,+ type: "image/png",+ width: 1200,+ height: 630,+ alt: "EasyInvoicePDF.com - Free Invoice PDF Generator",+ },+ ],+ },+};++interface HowItWorksLayoutProps {+ children: React.ReactNode;+}++export default function HowItWorksLayout({ children }: HowItWorksLayoutProps) {+ return (+ <>+ <HowItWorksJsonLd />+ <Header />+ {children}+ <Footer />+ </>+ );+}diff --git a/src/app/how-it-works/page.tsx b/src/app/how-it-works/page.tsxnew file mode 100644index 0000000..51e52f0--- /dev/null+++ b/src/app/how-it-works/page.tsx@@ -0,0 +1,116 @@+import { HowItWorksVideos } from "@/app/(app)/components/how-it-works-videos";+import { HOW_IT_WORKS_VIDEOS } from "@/config";+import { cn } from "@/lib/utils";+import { ArrowRightIcon } from "lucide-react";+import Link from "next/link";+import { Suspense } from "react";++export const dynamic = "force-static";++const linkClassName =+ "font-medium text-slate-950 underline decoration-slate-400 underline-offset-2 transition-colors hover:text-slate-950/90 hover:decoration-slate-500";++function VideoPlayerSkeleton() {+ return (+ <div className="mx-auto max-w-3xl animate-pulse rounded-lg border border-slate-200 bg-white">+ <div className="h-16 border-b border-slate-200 px-6 py-4" />+ <div className="aspect-video bg-slate-100" />+ <div className="h-14 border-t border-slate-200" />+ </div>+ );+}++export default function HowItWorksPage() {+ return (+ <div className="min-h-screen bg-white">+ <div+ data-info="blur-transition-overlay"+ className="pointer-events-none absolute left-0 right-0 top-[25px] h-24 bg-gradient-to-b from-slate-100 to-slate-50 blur-2xl"+ />+ <div className="relative z-0">+ <div className="relative mb-8 pt-16 text-center sm:mb-12">+ <div className="absolute bottom-0 h-full w-full bg-[radial-gradient(#e5e7eb_1px,transparent_1px)] [background-size:16px_16px] [mask-image:radial-gradient(ellipse_50%_50%_at_50%_50%,#000_70%,transparent_100%)] sm:bottom-auto" />+ <div className="mx-4 sm:mx-0">+ <h1+ className="relative z-10 text-balance text-3xl font-bold tracking-tight text-gray-900 sm:text-5xl"+ data-testid="how-it-works-page-title"+ >+ How EasyInvoicePDF Works+ </h1>+ <p className="relative z-10 mx-auto mt-6 max-w-2xl text-pretty text-sm text-gray-600 md:text-lg">+ Discover how to create, customize, and send professional PDF+ invoices online with EasyInvoicePDF. Watch step-by-step tutorial+ videos to learn invoice creation, branding, and customization+ tips. Start generating invoices instantly in our{" "}+ <Link href="/" className={cn(linkClassName)}>+ free online invoice generator+ </Link>+ .+ </p>+ </div>+ </div>++ <div className="mx-auto max-w-3xl overflow-hidden border-b border-t border-slate-200 bg-white sm:rounded-lg sm:border sm:shadow-sm">+ <Suspense fallback={<VideoPlayerSkeleton />}>+ <HowItWorksVideos title="Tutorial videos" />+ </Suspense>+ </div>++ <section+ id="tutorials"+ className="mx-auto mt-12 max-w-3xl px-4 pb-16 sm:px-0"+ data-testid="how-it-works-tutorial-index"+ >+ <h2 className="text-2xl font-semibold tracking-tight text-gray-900">+ All tutorials+ </h2>+ <ul className="mt-6 space-y-8">+ {HOW_IT_WORKS_VIDEOS.map((video) => (+ <li key={video.id}>+ <section id={video.id}>+ <h3 className="text-xl font-semibold text-gray-900">+ {video.title}+ </h3>+ <p className="mt-2 text-gray-600">{video.description}</p>+ <p className="mt-3">+ <Link+ href={`/how-it-works?video=${video.id}`}+ className={cn(linkClassName)}+ >+ Watch tutorial+ </Link>+ {" · "}+ <a+ href={video.watchUrl}+ target="_blank"+ rel="noopener noreferrer"+ className={cn(linkClassName)}+ >+ Watch on YouTube+ </a>+ </p>+ </section>+ </li>+ ))}+ </ul>+ </section>++ <div className="border-t border-slate-200 bg-slate-50 px-4 py-14 text-center">+ <p className="text-balance text-lg font-medium text-gray-800">+ Ready to create your first invoice?+ </p>++ <div className="mx-auto mt-6 w-full max-w-xl px-3 sm:px-0">+ <Link+ href="/"+ className="group inline-flex h-12 w-full items-center justify-center rounded-lg bg-slate-900 px-8 text-lg font-medium transition-all hover:bg-slate-900/95 active:scale-[0.98]"+ >+ <ArrowRightIcon className="mr-2 size-5 animate-pulse-arrow text-white transition-transform group-hover:scale-110" />+ <span className="text-white">Start Invoicing</span>+ </Link>+ </div>+ </div>+ </div>+ </div>+ );+}diff --git a/src/app/robots.ts b/src/app/robots.tsindex a4b5b5f..29c3a0f 100644--- a/src/app/robots.ts+++ b/src/app/robots.ts@@ -17,6 +17,8 @@ export default function robots(): MetadataRoute.Robots {// Allow changelog pages"/changelog","/changelog/*",+ // Allow how it works page+ "/how-it-works",// Allow terms of service page"/tos",// Allow founder pagediff --git a/src/app/schema/i18n-schema.ts b/src/app/schema/i18n-schema.tsindex 71d0078..52d1807 100644--- a/src/app/schema/i18n-schema.ts+++ b/src/app/schema/i18n-schema.ts@@ -60,11 +60,19 @@ const aboutSchema = zfooter: z.object({description: z.string(),+ headings: z+ .object({+ product: z.string(),+ company: z.string(),+ community: z.string(),+ })+ .strict(),links: z.object({invoiceGenerator: z.string(),features: z.string(),github: z.string(),+ howItWorks: z.string(),changelog: z.string(),founder: z.string(),resources: z.string(),diff --git a/src/app/schema/index.ts b/src/app/schema/index.tsindex 2caa97b..26f7e9b 100644--- a/src/app/schema/index.ts+++ b/src/app/schema/index.ts@@ -1230,11 +1230,14 @@ export const invoiceObjectSchema = z.object({export const invoiceSchema = invoiceObjectSchema.transform((data) => ({...data,+ // Ensure dateOfServiceStart is trimmed and defaults to first day of+ // month containing dateOfService if not setdateOfServiceStart:data.dateOfServiceStart?.trim() ||dayjs(data.dateOfService).startOf("month").format("YYYY-MM-DD"),})).superRefine((data, ctx) => {+ // Custom validation: dateOfServiceStart must not be after dateOfServiceif (dayjs(data.dateOfServiceStart).isAfter(dayjs(data.dateOfService), "day")) {diff --git a/src/app/sitemap.ts b/src/app/sitemap.tsindex 388e09c..b6047e2 100644--- a/src/app/sitemap.ts+++ b/src/app/sitemap.ts@@ -31,6 +31,13 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {changeFrequency: "weekly",priority: 0.7,},+ // How it works page+ {+ url: `${APP_URL}/how-it-works`,+ lastModified,+ changeFrequency: "monthly",+ priority: 0.7,+ },// Changelog entries...changelogEntries.map((entry) => {const lastModified = new Date(entry.metadata.date);diff --git a/src/config.ts b/src/config.tsindex 5a2712c..cb7dcd2 100644--- a/src/config.ts+++ b/src/config.ts@@ -25,7 +25,69 @@ export const VIDEO_DEMO_FALLBACK_IMG = `${STATIC_ASSETS_URL}/demo-videos/easy-inexport const VIDEO_DEMO_YOUTUBE_URL ="https://www.youtube.com/embed/iAROeCIcZ40?si=EyJKCsUr43Z8zY1f";-// const DONATION_URL = "https://dub.sh/easyinvoice-donate";+export const YOUTUBE_VIDEO_HOW_TO_ADD_SELLER =+ "https://www.youtube.com/embed/xfSF35c0vfU";++export const YOUTUBE_VIDEO_HOW_TO_ADD_BUYER =+ "https://www.youtube.com/embed/XxAY0YGgXIk";++const YOUTUBE_VIDEO_HOW_TO_ADD_INVOICE_FOR_ONE_WEEK =+ "https://www.youtube.com/embed/6KzDBBiAJmg";++/**+ * Video catalog for the "How it works" dialog+ */+export const HOW_IT_WORKS_VIDEOS = [+ {+ id: "overview",+ tabLabel: "Overview",+ tabLabelShort: "Overview",+ title: "How EasyInvoicePDF Works",+ description: "Learn how to create and customize your invoices.",+ embedUrl: VIDEO_DEMO_YOUTUBE_URL,+ watchUrl: "https://www.youtube.com/watch?v=iAROeCIcZ40",+ iframeTitle: "EasyInvoicePDF Demo Video",+ },+ {+ id: "add-seller",+ tabLabel: "Add seller",+ tabLabelShort: "Seller",+ title: "How to add a seller",+ description: "Save seller details and reuse them on future invoices.",+ embedUrl: YOUTUBE_VIDEO_HOW_TO_ADD_SELLER,+ watchUrl: "https://www.youtube.com/watch?v=xfSF35c0vfU",+ iframeTitle: "How to add a seller - EasyInvoicePDF",+ },+ {+ id: "add-buyer",+ tabLabel: "Add buyer",+ tabLabelShort: "Buyer",+ title: "How to add a buyer",+ description: "Save buyer details and reuse them on future invoices.",+ embedUrl: YOUTUBE_VIDEO_HOW_TO_ADD_BUYER,+ watchUrl: "https://www.youtube.com/watch?v=XxAY0YGgXIk",+ iframeTitle: "How to add a buyer - EasyInvoicePDF",+ },+ {+ id: "weekly-invoices",+ tabLabel: "Weekly invoices",+ tabLabelShort: "Weekly",+ title: "How to create invoices for one week",+ description: "Learn how to generate invoices for a week of work.",+ embedUrl: YOUTUBE_VIDEO_HOW_TO_ADD_INVOICE_FOR_ONE_WEEK,+ watchUrl: "https://www.youtube.com/watch?v=6KzDBBiAJmg",+ iframeTitle: "How to create weekly invoices - EasyInvoicePDF",+ },+] as const satisfies {+ id: string;+ tabLabel: string;+ tabLabelShort: string;+ title: string;+ description: string;+ embedUrl: string;+ watchUrl: string;+ iframeTitle: string;+}[];export const PROD_WEBSITE_URL = "https://easyinvoicepdf.com";@@ -37,6 +99,12 @@ export const LINKEDIN_URL =export const TWITTER_URL = "https://x.com/vladsazonau";export const TWITTER_CREATOR = "@vlad_sazonau";+export const PRODUCT_TWITTER_URL = "https://x.com/EasyInvoicePDF";++export const REDDIT_COMMUNITY_URL = "https://www.reddit.com/r/EasyInvoicePDF/";+export const DISCORD_COMMUNITY_URL = "https://discord.gg/gAr3HteWta";+export const DISCORD_FEEDBACK_URL = "https://discord.gg/kxTCK2Q7";+export const PERSONAL_WEBSITE_URL = "https://vladsazon.com";export const BUG_REPORT_URL =