311 Commits

Author SHA1 Message Date
Felipe Cardoso
372af25aaa Refactor Markdown rendering and code blocks styling
- Enhanced Markdown heading hierarchy with subtle anchors and improved spacing.
- Improved styling for links, blockquotes, tables, and horizontal rules using reusable components (`Alert`, `Badge`, `Table`, `Separator`).
- Standardized code block background, button transitions, and copy-to-clipboard feedback.
- Refined readability and visual hierarchy of text elements across Markdown content.
2025-11-24 18:58:01 +01:00
Felipe Cardoso
d0b717a128 Enhance demo mode credential validation and refine MSW configuration
- Updated demo credential logic to accept any password ≥8 characters for improved UX.
- Improved MSW configuration to ignore non-API requests and warn only for unhandled API calls.
- Adjusted `DemoModeBanner` to reflect updated password requirements for demo credentials.
2025-11-24 18:54:05 +01:00
Felipe Cardoso
9d40aece30 Refactor chart components for improved formatting and import optimization
- Consolidated `recharts` imports for `BarChart`, `AreaChart`, and `LineChart` components.
- Reformatted inline styles for tooltips and axis elements to enhance readability and maintain consistency.
- Applied minor cleanups for improved project code styling.
2025-11-24 18:42:13 +01:00
Felipe Cardoso
487c8a3863 Add demo mode support with MSW integration and documentation
- Integrated Mock Service Worker (MSW) for frontend-only demo mode, allowing API call interception without requiring a backend.
- Added `DemoModeBanner` component to indicate active demo mode and display demo credentials.
- Enhanced configuration with `DEMO_MODE` flag and demo credentials for user and admin access.
- Updated ESLint configuration to exclude MSW-related files from linting and coverage.
- Created comprehensive `DEMO_MODE.md` documentation for setup and usage guidelines, including deployment instructions and troubleshooting.
- Updated package dependencies to include MSW and related libraries.
2025-11-24 18:42:05 +01:00
Felipe Cardoso
8659e884e9 Refactor code formatting and suppress security warnings
- Reformatted dicts, loops, and logger calls for improved readability and consistency.
- Suppressed `bandit` warnings (`# noqa: S311`) for non-critical random number generation in demo data.
2025-11-24 17:58:26 +01:00
Felipe Cardoso
a05def5906 Add registration_activity chart and enhance admin statistics
- Introduced `RegistrationActivityChart` to display user registration trends over 14 days.
- Enhanced `AdminStatsResponse` with `registration_activity`, providing improved insights for admin users.
- Updated demo data to include realistic registration activity and organization details.
- Refactored admin page to use updated statistics data model and improved query handling.
- Fixed inconsistent timezone handling in statistical analytics and demo user timestamps.
2025-11-24 17:42:43 +01:00
Felipe Cardoso
9f655913b1 Add adminGetStats API and extend statistics types for admin dashboard
- Introduced `adminGetStats` API endpoint for fetching aggregated admin dashboard statistics.
- Expanded `AdminStatsResponse` to include `registration_activity` and new type definitions for `UserGrowthData`, `OrgDistributionData`, and `UserStatusData`.
- Added `AdminGetStatsData` and `AdminGetStatsResponses` types to improve API integration consistency.
- Updated client generation and type annotations to support the new endpoint structure.
2025-11-24 16:28:59 +01:00
Felipe Cardoso
13abd159fa Remove deprecated middleware and update component tests for branding and auth enhancements
- Deleted `middleware.disabled.ts` as it is no longer needed.
- Refactored `HeroSection` and `HomePage` tests to align with updated branding and messaging.
- Modified `DemoCredentialsModal` to support auto-filled demo credentials in login links.
- Mocked `ThemeToggle`, `LocaleSwitcher`, and `DemoCredentialsModal` in relevant tests.
- Updated admin tests to use `QueryClientProvider` and refactored API mocks for `AdminPage`.
- Replaced test assertions for stats section and badges with new branding content.
2025-11-24 15:04:49 +01:00
Felipe Cardoso
acfe59c8b3 Refactor admin stats API and charts data models for consistency
- Updated `AdminStatsResponse` with streamlined type annotations and added `AdminStatsData` type definition.
- Renamed chart data model fields (`totalUsers` → `total_users`, `activeUsers` → `active_users`, `members` → `value`, etc.) for alignment with backend naming conventions.
- Adjusted related test files to reflect updated data model structure.
- Improved readability of `AdminPage` component by reformatting destructuring in `useQuery`.
2025-11-24 12:44:45 +01:00
Felipe Cardoso
2e4700ae9b Refactor user growth chart data model and enhance demo user creation
- Renamed `totalUsers` and `activeUsers` to `total_users` and `active_users` across frontend and backend for consistency.
- Enhanced demo user creation by randomizing `created_at` dates for realistic charts.
- Expanded demo data to include `is_active` for demo users, improving user status representation.
- Refined admin dashboard statistics to support updated user growth data model.
2025-11-21 14:15:05 +01:00
Felipe Cardoso
8c83e2a699 Add comprehensive demo data loading logic and .env.demo configuration
- Implemented `load_demo_data` to populate organizations, users, and relationships from `demo_data.json`.
- Refactored database initialization to handle demo-specific passwords and multi-entity creation in demo mode.
- Added `demo_data.json` with sample organizations and users for better demo showcase.
- Introduced `.env.demo` to simplify environment setup for demo scenarios.
- Updated `.gitignore` to include `.env.demo` while keeping other `.env` files excluded.
2025-11-21 08:39:07 +01:00
Felipe Cardoso
9b6356b0db Add comprehensive demo data loading logic and .env.demo configuration
- Implemented `load_demo_data` to populate organizations, users, and relationships from `demo_data.json`.
- Refactored database initialization to handle demo-specific passwords and multi-entity creation in demo mode.
- Added `demo_data.json` with sample organizations and users for better demo showcase.
- Introduced `.env.demo` to simplify environment setup for demo scenarios.
- Updated `.gitignore` to include `.env.demo` while keeping other `.env` files excluded.
2025-11-21 08:23:18 +01:00
Felipe Cardoso
a410586cfb Enable demo mode features, auto-fill demo credentials, and enhance branding integration
- Added `DEMO_MODE` to backend configuration with relaxed security support for specific demo accounts.
- Updated password validators to allow predefined weak passwords in demo mode.
- Auto-fill login forms with demo credentials via query parameters for improved demo accessibility.
- Introduced demo user creation logic during database initialization if `DEMO_MODE` is enabled.
- Replaced `img` tags with `next/image` for consistent and optimized visuals in branding elements.
- Refined footer, header, and layout components to incorporate improved logo handling.
2025-11-21 07:42:40 +01:00
Felipe Cardoso
0e34cab921 Add logs and logs-dev targets to Makefile for streamlined log access 2025-11-21 07:32:11 +01:00
Felipe Cardoso
3cf3858fca Update Makefile to refine clean-slate target with explicit dev compose file and orphan removal 2025-11-21 07:25:22 +01:00
Felipe Cardoso
db0c555041 Add ThemeToggle to Header component
- Integrated `ThemeToggle` for light/dark mode functionality in both desktop and mobile views.
- Adjusted layout styles to accommodate new control next to `LocaleSwitcher` with consistent spacing.
2025-11-20 15:16:49 +01:00
Felipe Cardoso
51ad80071a Ensure virtualenv binaries are on PATH in entrypoint script for consistent command execution 2025-11-20 15:16:30 +01:00
Felipe Cardoso
d730ab7526 Update .dockerignore, alembic revision, and entrypoint script for consistency and reliability
- Expanded `.dockerignore` to exclude Python and packaging-related artifacts for cleaner Docker builds.
- Updated Alembic `down_revision` in migration script to reflect correct dependency chain.
- Modified entrypoint script to use `uv` with `--no-project` flag, preventing permission issues in bind-mounted volumes.
2025-11-20 15:12:55 +01:00
Felipe Cardoso
b218be9318 Add logo icon to components and update branding assets
- Integrated `logo-icon.svg` into headers, footer, and development layout for consistent branding.
- Updated `logo.svg` and `logo-icon.svg` with improved gradient and filter naming for clarity.
- Enhanced `README.md` and branding documentation with logo visuals and descriptions.
- Refined visual identity details in docs to emphasize the branding hierarchy and usage.
2025-11-20 14:55:24 +01:00
Felipe Cardoso
e6813c87c3 Add new SVG assets for logo and logo icon
- Introduced `logo.svg` to serve as the primary logo asset with layered design and gradient styling.
- Added `logo-icon.svg` for compact use cases with gradient consistency and simplified structure.
2025-11-20 13:38:42 +01:00
Felipe Cardoso
210204eb7a Revise home page content to align with "PragmaStack" branding
- Updated headers, descriptions, and key messaging across sections for clarity and consistency.
- Replaced outdated stats with branding-focused data, emphasizing open-source, type safety, and documentation quality.
- Refined tone to highlight pragmatic, reliable values over technical metrics.
- Adjusted GitHub icon SVG for accessibility and inline clarity.
2025-11-20 13:16:18 +01:00
Felipe Cardoso
6ad4cda3f4 Refine backend README to align with "PragmaStack" branding and enhance messaging for clarity and engagement. 2025-11-20 13:07:28 +01:00
Felipe Cardoso
54ceaa6f5d Rebrand README to emphasize "PragmaStack" identity and refine messaging for clarity and consistency. 2025-11-20 13:01:11 +01:00
Felipe Cardoso
34e7f69465 Replace "FastNext" references with "PragmaStack" in migration script and configuration settings 2025-11-20 13:01:05 +01:00
Felipe Cardoso
8fdbc2b359 Improve code consistency and documentation readability
- Standardized Markdown formatting across documentation files.
- Fixed inconsistent usage of inline code blocks and improved syntax clarity.
- Updated tests and JSX for cleaner formatting and better readability.
- Adjusted E2E test navigation handlers for multiline code consistency.
- Simplified TypeScript configuration and organized JSON structure for better maintainability.
2025-11-20 12:58:46 +01:00
Felipe Cardoso
28b1cc6e48 Replace "FastNext" branding with "PragmaStack" across the project
- Updated all references, metadata, and templates to reflect the new branding, including layout files, components, and documentation.
- Replaced hardcoded color tokens like `green-600` with semantic tokens (`success`, `warning`, etc.) for improved design consistency.
- Enhanced `globals.css` with new color tokens for success, warning, and destructive states using the OKLCH color model.
- Added comprehensive branding guidelines and updated the design system documentation to align with the new identity.
- Updated tests and mocks to reflect the branding changes and ensured all visual/verbal references match "PragmaStack".
- Added new `branding/README.md` and `branding` docs for mission, values, and visual identity definition.
2025-11-20 12:55:30 +01:00
Felipe Cardoso
5a21847382 Update to Next.js 16 and enhance ESLint configuration
- Migrated from Next.js 15 to Next.js 16, updating all related dependencies and configurations.
- Enhanced ESLint setup with stricter rules, expanded plugin support, and improved type-aware linting options.
- Archived middleware by renaming it to `middleware.disabled.ts` for potential future use.
2025-11-20 12:49:45 +01:00
Felipe Cardoso
444d495f83 Refactor metadata handling for improved maintainability and localization support
- Extracted server-only metadata generation logic into separate files, reducing inline logic in page components.
- Added `/* istanbul ignore file */` annotations for E2E-covered framework-level metadata.
- Standardized `generateMetadata` export patterns across auth, admin, and error pages for consistency.
- Enhanced maintainability and readability by centralizing metadata definitions for each route.
2025-11-20 10:07:15 +01:00
Felipe Cardoso
a943f79ce7 Refactor i18n routing tests with jest mocks and enhance coverage
- Replaced i18n routing tests with new mocked implementations for `next-intl/routing` and `next-intl/navigation`.
- Improved test coverage by introducing component-based tests for navigation hooks and link behavior.
- Updated assertions for clarity and consistency in locale configuration and navigation logic.
2025-11-20 09:45:29 +01:00
Felipe Cardoso
f54905abd0 Update README and documentation with i18n, feature enhancements, and SEO improvements
- Added comprehensive details for internationalization (i18n) support via `next-intl`, including locale-based routing and type-safe translations.
- Highlighted new UX features: animated marketing landing page, toasts, charts, markdown rendering, and session tracking.
- Enhanced SEO capabilities with dynamic sitemaps, robots.txt, and locale-aware metadata.
- Updated `/dev` portal information with live component playground details.
- Documented newly integrated libraries, utilities, and testing updates for better developer insight.
2025-11-20 09:45:03 +01:00
Felipe Cardoso
0105e765b3 Add tests for auth storage logic and i18n routing configuration
- Added comprehensive unit tests for `auth/storage` to handle SSR, E2E paths, storage method selection, and error handling.
- Introduced tests for `i18n/routing` to validate locale configuration, navigation hooks, and link preservation.
- Updated Jest coverage exclusions to include `
2025-11-20 09:24:15 +01:00
Felipe Cardoso
bb06b450fd Delete outdated E2E documentation and performance optimization guides.
- Removed `E2E_COVERAGE_GUIDE.md` and `E2E_PERFORMANCE_OPTIMIZATION.md` from `frontend/docs` due to redundancy and irrelevance to recent workflows.
- Cleared unused scripts (`convert-v8-to-istanbul.ts` and `merge-coverage.ts`) from `frontend/scripts`.
2025-11-19 14:56:24 +01:00
Felipe Cardoso
c1d6a04276 Document AI assistant guidance and improve developer workflows
- Added and updated `CLAUDE.md` to provide comprehensive guidance for integrating Claude Code into project workflows.
- Created `AGENTS.md` for general AI assistant context, including architecture, workflows, and tooling specifics.
- Updated `README.md` with references to AI-focused documentation for better discoverability.
- Simplified instructions and refined file organization to enhance usability for developers and AI assistants.
2025-11-19 14:45:29 +01:00
Felipe Cardoso
d7b333385d Add test cases for session revocation and update test coverage annotations
- Introduced unit tests for individual and bulk session revocation in `SessionsManager` with success callback assertions.
- Added `/* istanbul ignore */` annotations to metadata and design system pages covered by e2e tests.
2025-11-19 14:38:46 +01:00
Felipe Cardoso
f02320e57c Add tests for LocaleSwitcher component and update metadata generation
- Introduced unit tests for `LocaleSwitcher` to cover rendering, UX, accessibility, and locale switching logic.
- Updated `generateMetadata` function with `/* istanbul ignore next */` annotation for coverage clarity.
2025-11-19 14:27:03 +01:00
Felipe Cardoso
3ec589293c Add tests for i18n metadata utilities and improve locale-based metadata generation
- Introduced comprehensive unit tests for `generateLocalizedMetadata` and `generatePageMetadata` utilities.
- Enhanced `siteConfig` validation assertions for structure and localization support.
- Updated metadata generation to handle empty paths, canonical URLs, language alternates, and Open Graph data consistently.
- Annotated server-side middleware with istanbul ignore for coverage clarity.
2025-11-19 14:23:06 +01:00
Felipe Cardoso
7b1bea2966 Refactor i18n integration and update tests for improved localization
- Updated test components (`PasswordResetConfirmForm`, `PasswordChangeForm`) to use i18n keys directly, ensuring accurate validation messages.
- Refined translations in `it.json` to standardize format and content.
- Replaced text-based labels with localized strings in `PasswordResetRequestForm` and `RegisterForm`.
- Introduced `generateLocalizedMetadata` utility and updated layout metadata generation for locale-aware SEO.
- Enhanced e2e tests with locale-prefixed routes and updated assertions for consistency.
- Added comprehensive i18n documentation (`I18N.md`) for usage, architecture, and testing.
2025-11-19 14:07:13 +01:00
Felipe Cardoso
da7b6b5bfa Implement extensive localization improvements across forms and components
- Refactored `it.json` translations with added keys for authentication, admin panel, and settings.
- Updated authentication forms (`LoginForm`, `RegisterForm`, `PasswordResetConfirmForm`) to use localized strings via `next-intl`.
- Enhanced password validation schemas with dynamic translations and refined error messages.
- Adjusted `Header` and related components to include localized navigation and status elements.
- Improved placeholder hints, button labels, and inline validation messages for seamless localization.
2025-11-19 03:02:59 +01:00
Felipe Cardoso
7aa63d79df Implement extensive localization improvements across forms and components
- Refactored `it.json` translations with added keys for authentication, admin panel, and settings.
- Updated authentication forms (`LoginForm`, `RegisterForm`, `PasswordResetConfirmForm`) to use localized strings via `next-intl`.
- Enhanced password validation schemas with dynamic translations and refined error messages.
- Adjusted `Header` and related components to include localized navigation and status elements.
- Improved placeholder hints, button labels, and inline validation messages for seamless localization.
2025-11-19 03:02:13 +01:00
Felipe Cardoso
333c9c40af Add locale switcher component and integrate internationalization improvements
- Introduced `LocaleSwitcher` component for language selection with support for locale-aware dropdown and ARIA accessibility.
- Updated layouts (`Header`, `Breadcrumbs`, `Home`) to include the new locale switcher.
- Expanded localization files (`en.json`, `it.json`) with new keys for language switching.
- Adjusted i18n configuration to enhance routing and message imports.
- Updated Jest module mappings to mock new i18n components and utilities.
2025-11-19 01:31:51 +01:00
Felipe Cardoso
0b192ce030 Update e2e tests and mocks for locale-based routing
- Adjusted assertions and navigation tests to include `/en` locale prefix for consistency.
- Updated next-intl and components-i18n mocks to support locale handling in tests.
- Renamed "Components" link and related references to "Design System" in homepage tests.
- Disabled typing delay in debounce test for improved test reliability.
2025-11-19 01:31:35 +01:00
Felipe Cardoso
da021d0640 Update tests and e2e files to support locale-based routing
- Replaced static paths with dynamic locale subpaths (`/[locale]/*`) in imports, URLs, and assertions across tests.
- Updated `next-intl` mocks for improved compatibility with `locale`-aware components.
- Standardized `page.goto` and navigation tests with `/en` as the base locale for consistency.
2025-11-18 23:26:10 +01:00
Felipe Cardoso
d1b47006f4 Remove all obsolete authentication, settings, admin, and demo-related components and pages
- Eliminated redundant components, pages, and layouts related to authentication (`login`, `register`, `password-reset`, etc.), user settings, admin, and demos.
- Simplified the frontend structure by removing unused dynamic imports, forms, and test code.
- Refactored configurations and metadata imports to exclude references to removed features.
- Streamlined the project for future development and improved maintainability by discarding legacy and unused code.
2025-11-18 12:41:57 +01:00
Felipe Cardoso
a73d3c7d3e Refactor multiline formatting, link definitions, and code consistency across components and tests
- Improved readability by updating multiline statements and object definitions.
- Applied consistent link and button wrapping in `DemoSection` and other components.
- Enhanced test assertions and helper functions with uniform formatting and parentheses usage.
2025-11-18 07:25:23 +01:00
Felipe Cardoso
55ae92c460 Refactor i18n setup and improve structure for maintainability
- Relocated `i18n` configuration files to `src/lib/i18n` for better organization.
- Removed obsolete `request.ts` and `routing.ts` files, simplifying `i18n` setup within the project.
- Added extensive tests for `i18n/utils` to validate locale-related utilities, including locale name, native name, and flag retrieval.
- Introduced a detailed `I18N_IMPLEMENTATION_PLAN.md` to document implementation phases, decisions, and recommendations for future extensions.
- Enhanced TypeScript definitions and modularity across i18n utilities for improved developer experience.
2025-11-18 07:23:54 +01:00
Felipe Cardoso
fe6a98c379 Add internationalization (i18n) with next-intl and Italian translations
- Integrated `next-intl` for server-side and client-side i18n support.
- Added English (`en.json`) and Italian (`it.json`) localization files.
- Configured routing with locale-based subdirectories (`/[locale]/path`) using `next-intl`.
- Introduced type-safe i18n utilities and TypeScript definitions for translation keys.
- Updated middleware to handle locale detection and routing.
- Implemented dynamic translation loading to reduce bundle size.
- Enhanced developer experience with auto-complete and compile-time validation for i18n keys.
2025-11-17 20:27:09 +01:00
Felipe Cardoso
b7c1191335 Refactor locale validation and update style consistency across schemas, tests, and migrations
- Replaced `SUPPORTED_LOCALES` with `supported_locales` for naming consistency.
- Applied formatting improvements to multiline statements for better readability.
- Cleaned up redundant comments and streamlined test assertions.
2025-11-17 20:04:03 +01:00
Felipe Cardoso
68e04a911a Add user locale preference support and locale detection logic
- Introduced `locale` field in user model and schemas with BCP 47 format validation.
- Created Alembic migration to add `locale` column to the `users` table with indexing for better query performance.
- Implemented `get_locale` dependency to detect locale using user preference, `Accept-Language` header, or default to English.
- Added extensive tests for locale validation, dependency logic, and fallback handling.
- Enhanced documentation and comments detailing the locale detection workflow and SUPPORTED_LOCALES configuration.
2025-11-17 19:47:50 +01:00
Felipe Cardoso
3001484948 Update Makefile with dev-full target and frontend scaling option
- Added new `dev-full` target to start all development services, including the frontend.
- Modified `dev` target to exclude the frontend and provide instructions for running it locally.
- Updated `.PHONY` to include the new `dev-full` target.
2025-11-16 20:02:15 +01:00
Felipe Cardoso
c9f4772196 Add and enhance tests for mobile navigation, demo modal, and forbidden page metadata
- Added new test cases for mobile navigation links and buttons in `Header` component.
- Enhanced `Home` tests to verify demo modal behavior (open/close functionality).
- Added metadata validation test for the forbidden page.
- Introduced comprehensive test suite for the DemoTour page, covering structure, navigation, categories, accessibility, and CTAs.
2025-11-16 19:38:46 +01:00