easy-invoice-pdf/package.json
Vlad Sazonau f86dabee91
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init

* chore: update README and refactor localization messages

- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.

* chore: update README and refactor localization messages

- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.

* chore: change redirect to permanent: false in next.config.mjs

* feat: localize not-found page

* fix: languages

* refactor: update language handling and improve invoice form components

- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.

* chore: update .gitignore and .prettierignore for i18n files

- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.

* fix

* chore: update Playwright configuration and improve invoice form tests

- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.

* feat: enhance localization for About page and add new features

- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.

* feat: implement translation validation and enhance localization structure

- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.

* refactor: enhance button components and improve layout responsiveness

- Refactored button components in the About and App pages to utilize the  prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.

* fix: e2e test

* minor fixes

* feat: add error handling component and enhance localization for error messages

- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.

* feat: enhance localization support and add new languages

- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.

* feat: enhance localization and error handling for About page

- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.

* refactor: improve layout and localization handling in About and App pages

- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.

* feat: enhance localization and add meta tags for About page

- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.

* feat: implement newsletter subscription feature with localization support

- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.

* feat: enhance localization for newsletter subscription messages

- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.

* feat: add robots and sitemap generation for SEO optimization

- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.

* feat: enhance subscription token verification with rate limiting and error handling

- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.

* fix: update email development script directory in package.json

- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.

* feat: enhance locale validation and static rendering in NotFound and layout components

- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.

* feat: enhance invoice form tests and localization messages

* fix: update invoice form test selectors and localization messages

- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.

* feat: refactor NotFound component and introduce locale-specific handling

- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.

* feat: add end-to-end tests for About page and Not Found page

- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.

* refactor: move Not Found page tests to a dedicated file

- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.

* feat: enhance About page tests and localization for newsletter subscription

- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.

* fix(ci): update Playwright report path in e2e workflow

* feat: enhance invoice form with dynamic invoice number handling and localization

- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.

* chore: update .gitignore and refactor PDF test download handling

- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.

* refactor: move default buyer and seller data to constants

- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.

* fix: improve invoice number handling in general information section

- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.

* fix: update invoice number suffix handling in general information section

- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format

* feat: integrate video demo functionality and update UI components

- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.

* fix: update video component and tests for better playback handling

- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.

* fix: enhance About page tests for language navigation

* fix: increase timeout for Playwright expect assertions to improve test reliability

* fix: increase Playwright retries and e2e workflow timeout for improved test stability

* feat: add loading skeleton component and About page loading state

- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.

* fix: update metadata titles and descriptions for localization

- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.

* feat: refactor invoice number handling to support object structure

- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.

* feat: enhance routing and SEO configurations

- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively

* feat: update ESLint rules and refactor navigation imports

- Enhanced ESLint configuration to restrict imports from  and , directing to  for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to  for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.

* fix: improve styles

* feat: add GitHub Actions workflow for E2E test failure notifications

- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.

* chore: remove GitHub Actions workflow for E2E test failure notifications

* chore: update E2E workflow to send email notifications and adjust URL in tests

- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.

* chore: enhance E2E workflow to calculate and report test duration

- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.

* ci improve

* ci improve

* ci improve

* chore: refactor project structure and add utility types

- Removed unused image file .
- Introduced new TypeScript utility types in  for better type handling.
- Updated import paths in  and  to use the new  directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in  and Redis connection in .
- Cleaned up unused utility functions in .

* feat: add FAQ section to About page and update translations

- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.

* feat: integrate react-aria-components for enhanced disclosure functionality

- Added  to the project dependencies for improved accessibility and UI interactions.
- Implemented a new  component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.

* feat: enhance error handling for shared invoice URL

- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.

* feat: update translations for multi-language support and customization options
2025-04-19 19:56:32 +02:00

99 lines
3 KiB
JSON

{
"name": "pdf-invoice-generator",
"version": "0.1.0",
"private": true,
"packageManager": "pnpm@10.6.5",
"engines": {
"node": ">=20.0.0"
},
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"type-check": "tsc --noEmit",
"lint": "pnpm eslint . --cache",
"lint:fix": "pnpm eslint . --fix",
"prettify": "prettier --write --cache '**/*.{ts?(x),json,js,mjs,yml,yaml,md}'",
"knip": "knip",
"update-deps": "pnpm upgrade --interactive --latest",
"e2e": "pnpm exec playwright test",
"e2e:ui": "pnpm exec playwright test --ui",
"dedupe": "pnpm dedupe",
"lint-stage": "npx lint-staged --verbose",
"check-meta": "pnpx check-site-meta",
"dev:email": "email dev --dir src/emails",
"prepare": "husky"
},
"dependencies": {
"@hookform/resolvers": "3.9.0",
"@radix-ui/react-accordion": "1.2.3",
"@radix-ui/react-alert-dialog": "1.1.6",
"@radix-ui/react-dialog": "1.1.6",
"@radix-ui/react-dropdown-menu": "2.1.6",
"@radix-ui/react-label": "2.1.2",
"@radix-ui/react-popover": "1.1.6",
"@radix-ui/react-separator": "1.1.2",
"@radix-ui/react-slot": "1.1.2",
"@radix-ui/react-switch": "1.1.3",
"@radix-ui/react-tabs": "1.1.3",
"@radix-ui/react-tooltip": "1.1.8",
"@react-email/components": "0.0.36",
"@react-email/tailwind": "1.0.4",
"@react-pdf/renderer": "4.3.0",
"@sentry/nextjs": "9.3.0",
"@types/ua-parser-js": "0.7.39",
"@upstash/ratelimit": "2.0.5",
"@upstash/redis": "1.34.6",
"@vercel/speed-insights": "1.2.0",
"class-variance-authority": "0.7.1",
"clsx": "2.1.1",
"cmdk": "1.0.0",
"dayjs": "1.11.13",
"eslint-plugin-react-hooks": "5.2.0",
"file-saver": "2.0.5",
"jiti": "2.4.2",
"jszip": "3.10.1",
"lucide-react": "0.477.0",
"lz-string": "1.5.0",
"n2words": "1.21.0",
"next": "14.2.15",
"next-intl": "4.0.2",
"pdf-parse": "1.1.1",
"react": "18.3.1",
"react-aria-components": "1.8.0",
"react-dom": "18.3.1",
"react-hook-form": "7.53.1",
"react-intersection-observer": "9.16.0",
"resend": "4.2.0",
"sonner": "1.7.4",
"tailwind-merge": "2.6.0",
"tailwindcss-animate": "1.0.7",
"ua-parser-js": "2.0.3",
"use-debounce": "10.0.4",
"zod": "3.24.2"
},
"devDependencies": {
"@eslint/eslintrc": "3.3.1",
"@next/eslint-plugin-next": "15.2.3",
"@playwright/test": "1.51.1",
"@types/file-saver": "2.0.7",
"@types/node": "22.8.1",
"@types/pdf-parse": "1.1.4",
"@types/react": "18.3.12",
"@types/react-dom": "18.3.1",
"autoprefixer": "10.4.21",
"eslint": "9.23.0",
"eslint-config-next": "15.2.3",
"eslint-plugin-playwright": "2.2.0",
"husky": "9.1.7",
"knip": "5.46.0",
"lint-staged": "15.5.0",
"postcss": "^8",
"prettier": "3.5.3",
"prettier-plugin-tailwindcss": "0.6.11",
"react-email": "4.0.4",
"tailwindcss": "3.4.14",
"typescript": "5.8.2",
"typescript-eslint": "8.28.0"
}
}