2 Commits

Author SHA1 Message Date
kbe
15e3c7dff5 style: correct coding style with rubocop linter 2025-09-05 12:02:44 +02:00
kbe
46c8faf10c feat: Make Lucide icons globally available without Stimulus controller
- Replace unpkg CDN with npm package import in application.js
- Add global initialization for all Lucide icons on page load and Turbo events
- Remove dependency on lucide_controller.js and data-controller wrapper
- Icons now work anywhere with simple <i data-lucide="icon-name"></i> syntax
- Bundle size increased to include full icon set but removes controller overhead

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-05 11:52:10 +02:00
46 changed files with 219 additions and 1956 deletions

28
QWEN.md
View File

@@ -1,28 +0,0 @@
# Qwen Code Customization
## Project Context
- Working on a Ruby on Rails project named "aperonight"
- Using Docker for containerization
- Following Ruby version 3.1.0 (as indicated by .ruby-version)
- Using Bundler for gem management (Gemfile)
- Using Node.js for frontend assets (package.json likely present)
## Preferences
- Prefer to use Ruby and Rails conventions
- Follow Docker best practices for development environments
- Use standard Ruby/Rails project structure
- When creating new files, follow Rails conventions
- When modifying existing files, maintain consistency with current code style
- Use git for version control (as seen in .gitignore)
- Prefer to work with the project's existing toolchain (Bundler, etc.)
## Behavior
- When asked to make changes, first understand the context by examining relevant files
- When creating new files, ensure they follow project conventions
- When modifying files, preserve existing code style and patterns
- When implementing new features, suggest appropriate file locations and naming conventions
- When debugging, suggest using the project's existing test suite and development tools
- When suggesting changes, provide clear explanations of why the change is beneficial
## Qwen Added Memories
- We've implemented the checkout process with name collection for tickets that require identification. We've added first_name and last_name fields to the tickets table, updated the Ticket model with validations, added new routes and controller actions, created a view for collecting names, and updated the JavaScript controller. The database migration needs to be run in the Docker environment when the gem issues are resolved.

View File

@@ -1,45 +0,0 @@
# Checkout Process Implementation
This document describes the implementation of the checkout process with name collection for tickets that require identification.
## Implementation Details
The implementation includes:
1. Database migration to add first_name and last_name fields to tickets
2. Updates to the Ticket model to validate names when required
3. New routes and controller actions for name collection
4. A new view for collecting ticket holder names
5. Updates to the existing JavaScript controller
## Running the Migration
Once the Docker environment is fixed, run the following command to apply the database migration:
```bash
docker compose exec rails bundle exec rails db:migrate
```
## Testing the Implementation
1. Start the Docker containers:
```bash
docker compose up -d
```
2. Visit an event page and select tickets that require identification
3. The checkout process should redirect to the name collection page
4. After submitting names, the user should be redirected to the payment page
5. After successful payment, tickets should be created with the provided names
## Code Structure
- Migration: `db/migrate/20250828143000_add_names_to_tickets.rb`
- Model: `app/models/ticket.rb`
- Controller: `app/controllers/events_controller.rb`
- Views:
- `app/views/events/collect_names.html.erb` (new)
- `app/views/events/show.html.erb` (updated)
- `app/views/components/_ticket_card.html.erb` (updated)
- Routes: `config/routes.rb` (updated)
- JavaScript: `app/javascript/controllers/ticket_cart_controller.js` (no changes needed)

View File

@@ -5,8 +5,8 @@ module Api
module V1
class EventsController < ApiController
# Skip API key authentication for store_cart action (used by frontend forms)
skip_before_action :authenticate_api_key, only: [:store_cart]
skip_before_action :authenticate_api_key, only: [ :store_cart ]
# Charge l'évén avant certaines actions pour réduire les duplications
before_action :set_event, only: [ :show, :update, :destroy, :store_cart ]

View File

@@ -10,9 +10,9 @@ module StripeConcern
# but kept for backward compatibility
def initialize_stripe
return false unless stripe_configured?
# Stripe is already initialized at application startup
Rails.logger.debug "Stripe already initialized at application startup"
true
end
end
end

View File

@@ -3,8 +3,7 @@
# This controller manages all events. It load events for homepage
# and display for pagination.
class EventsController < ApplicationController
before_action :authenticate_user!, only: [ ]
before_action :authenticate_user!, only: []
before_action :set_event, only: [ :show ]
# Display all events
@@ -27,5 +26,4 @@ class EventsController < ApplicationController
def set_event
@event = Event.includes(:ticket_types).find(params[:id])
end
end

View File

@@ -4,12 +4,12 @@
# Orders group multiple tickets together for better transaction management
class OrdersController < ApplicationController
before_action :authenticate_user!
before_action :set_order, only: [:show, :checkout, :retry_payment, :increment_payment_attempt]
before_action :set_event, only: [:new, :create]
before_action :set_order, only: [ :show, :checkout, :retry_payment, :increment_payment_attempt ]
before_action :set_event, only: [ :new, :create ]
# Display new order form with name collection
#
# On this page user can see order summary and complete the tickets details
# On this page user can see order summary and complete the tickets details
# (first name and last name) for each ticket ordered
def new
@cart_data = session[:pending_cart] || {}
@@ -52,7 +52,7 @@ class OrdersController < ApplicationController
end
success = false
ActiveRecord::Base.transaction do
@order = current_user.orders.create!(event: @event, status: "draft")
@@ -60,7 +60,7 @@ class OrdersController < ApplicationController
next if ticket_attrs[:first_name].blank? || ticket_attrs[:last_name].blank?
ticket_type = @event.ticket_types.find(ticket_attrs[:ticket_type_id])
ticket = @order.tickets.build(
ticket_type: ticket_type,
first_name: ticket_attrs[:first_name],
@@ -82,7 +82,7 @@ class OrdersController < ApplicationController
raise ActiveRecord::Rollback
end
end
# Handle redirects outside transaction
if success
session[:draft_order_id] = @order.id
@@ -260,7 +260,7 @@ class OrdersController < ApplicationController
end
Stripe::Checkout::Session.create(
payment_method_types: ["card"],
payment_method_types: [ "card" ],
line_items: line_items,
mode: "payment",
success_url: order_payment_success_url + "?session_id={CHECKOUT_SESSION_ID}",

View File

@@ -20,8 +20,8 @@ class PagesController < ApplicationController
# Metrics for dashboard cards
@booked_events = current_user.orders.joins(tickets: { ticket_type: :event })
.where(events: { state: :published })
.where(orders: { status: ['paid', 'completed'] })
.sum('1')
.where(orders: { status: [ "paid", "completed" ] })
.sum("1")
@events_today = Event.published.where("DATE(start_time) = ?", Date.current).count
@events_tomorrow = Event.published.where("DATE(start_time) = ?", Date.current + 1).count
@upcoming_events = Event.published.upcoming.count
@@ -33,7 +33,7 @@ class PagesController < ApplicationController
.limit(5)
# Draft orders that can be retried
@draft_orders = current_user.orders.includes(tickets: [:ticket_type, :event])
@draft_orders = current_user.orders.includes(tickets: [ :ticket_type, :event ])
.can_retry_payment
.order(:expires_at)

View File

@@ -5,7 +5,7 @@
class Promoter::EventsController < ApplicationController
before_action :authenticate_user!
before_action :ensure_can_manage_events!
before_action :set_event, only: [:show, :edit, :update, :destroy, :publish, :unpublish, :cancel, :mark_sold_out]
before_action :set_event, only: [ :show, :edit, :update, :destroy, :publish, :unpublish, :cancel, :mark_sold_out ]
# Display all events for the current promoter
def index
@@ -25,9 +25,9 @@ class Promoter::EventsController < ApplicationController
# Create a new event
def create
@event = current_user.events.build(event_params)
if @event.save
redirect_to promoter_event_path(@event), notice: 'Event créé avec succès!'
redirect_to promoter_event_path(@event), notice: "Event créé avec succès!"
else
render :new, status: :unprocessable_entity
end
@@ -41,7 +41,7 @@ class Promoter::EventsController < ApplicationController
# Update an existing event
def update
if @event.update(event_params)
redirect_to promoter_event_path(@event), notice: 'Event mis à jour avec succès!'
redirect_to promoter_event_path(@event), notice: "Event mis à jour avec succès!"
else
render :edit, status: :unprocessable_entity
end
@@ -50,16 +50,16 @@ class Promoter::EventsController < ApplicationController
# Delete an event
def destroy
@event.destroy
redirect_to promoter_events_path, notice: 'Event supprimé avec succès!'
redirect_to promoter_events_path, notice: "Event supprimé avec succès!"
end
# Publish an event (make it visible to public)
def publish
if @event.draft?
@event.update(state: :published)
redirect_to promoter_event_path(@event), notice: 'Event publié avec succès!'
redirect_to promoter_event_path(@event), notice: "Event publié avec succès!"
else
redirect_to promoter_event_path(@event), alert: 'Cet event ne peut pas être publié.'
redirect_to promoter_event_path(@event), alert: "Cet event ne peut pas être publié."
end
end
@@ -67,9 +67,9 @@ class Promoter::EventsController < ApplicationController
def unpublish
if @event.published?
@event.update(state: :draft)
redirect_to promoter_event_path(@event), notice: 'Event dépublié avec succès!'
redirect_to promoter_event_path(@event), notice: "Event dépublié avec succès!"
else
redirect_to promoter_event_path(@event), alert: 'Cet event ne peut pas être dépublié.'
redirect_to promoter_event_path(@event), alert: "Cet event ne peut pas être dépublié."
end
end
@@ -77,9 +77,9 @@ class Promoter::EventsController < ApplicationController
def cancel
if @event.published?
@event.update(state: :canceled)
redirect_to promoter_event_path(@event), notice: 'Event annulé avec succès!'
redirect_to promoter_event_path(@event), notice: "Event annulé avec succès!"
else
redirect_to promoter_event_path(@event), alert: 'Cet event ne peut pas être annulé.'
redirect_to promoter_event_path(@event), alert: "Cet event ne peut pas être annulé."
end
end
@@ -87,9 +87,9 @@ class Promoter::EventsController < ApplicationController
def mark_sold_out
if @event.published?
@event.update(state: :sold_out)
redirect_to promoter_event_path(@event), notice: 'Event marqué comme complet!'
redirect_to promoter_event_path(@event), notice: "Event marqué comme complet!"
else
redirect_to promoter_event_path(@event), alert: 'Cet event ne peut pas être marqué comme complet.'
redirect_to promoter_event_path(@event), alert: "Cet event ne peut pas être marqué comme complet."
end
end
@@ -97,14 +97,14 @@ class Promoter::EventsController < ApplicationController
def ensure_can_manage_events!
unless current_user.can_manage_events?
redirect_to dashboard_path, alert: 'Vous n\'avez pas les permissions nécessaires pour gérer des événements.'
redirect_to dashboard_path, alert: "Vous n'avez pas les permissions nécessaires pour gérer des événements."
end
end
def set_event
@event = current_user.events.find(params[:id])
rescue ActiveRecord::RecordNotFound
redirect_to promoter_events_path, alert: 'Event non trouvé ou vous n\'avez pas accès à cet event.'
redirect_to promoter_events_path, alert: "Event non trouvé ou vous n'avez pas accès à cet event."
end
def event_params
@@ -114,4 +114,4 @@ class Promoter::EventsController < ApplicationController
:start_time, :end_time, :featured
)
end
end
end

View File

@@ -6,7 +6,7 @@ class Promoter::TicketTypesController < ApplicationController
before_action :authenticate_user!
before_action :ensure_can_manage_events!
before_action :set_event
before_action :set_ticket_type, only: [:show, :edit, :update, :destroy]
before_action :set_ticket_type, only: [ :show, :edit, :update, :destroy ]
# Display all ticket types for an event
def index
@@ -30,9 +30,9 @@ class Promoter::TicketTypesController < ApplicationController
# Create a new ticket type
def create
@ticket_type = @event.ticket_types.build(ticket_type_params)
if @ticket_type.save
redirect_to promoter_event_ticket_types_path(@event), notice: 'Type de billet créé avec succès!'
redirect_to promoter_event_ticket_types_path(@event), notice: "Type de billet créé avec succès!"
else
render :new, status: :unprocessable_entity
end
@@ -46,7 +46,7 @@ class Promoter::TicketTypesController < ApplicationController
# Update an existing ticket type
def update
if @ticket_type.update(ticket_type_params)
redirect_to promoter_event_ticket_type_path(@event, @ticket_type), notice: 'Type de billet mis à jour avec succès!'
redirect_to promoter_event_ticket_type_path(@event, @ticket_type), notice: "Type de billet mis à jour avec succès!"
else
render :edit, status: :unprocessable_entity
end
@@ -55,10 +55,10 @@ class Promoter::TicketTypesController < ApplicationController
# Delete a ticket type
def destroy
if @ticket_type.tickets.any?
redirect_to promoter_event_ticket_types_path(@event), alert: 'Impossible de supprimer ce type de billet car des billets ont déjà été vendus.'
redirect_to promoter_event_ticket_types_path(@event), alert: "Impossible de supprimer ce type de billet car des billets ont déjà été vendus."
else
@ticket_type.destroy
redirect_to promoter_event_ticket_types_path(@event), notice: 'Type de billet supprimé avec succès!'
redirect_to promoter_event_ticket_types_path(@event), notice: "Type de billet supprimé avec succès!"
end
end
@@ -67,11 +67,11 @@ class Promoter::TicketTypesController < ApplicationController
original = @event.ticket_types.find(params[:id])
@ticket_type = original.dup
@ticket_type.name = "#{original.name} (Copie)"
if @ticket_type.save
redirect_to edit_promoter_event_ticket_type_path(@event, @ticket_type), notice: 'Type de billet dupliqué avec succès!'
redirect_to edit_promoter_event_ticket_type_path(@event, @ticket_type), notice: "Type de billet dupliqué avec succès!"
else
redirect_to promoter_event_ticket_types_path(@event), alert: 'Erreur lors de la duplication.'
redirect_to promoter_event_ticket_types_path(@event), alert: "Erreur lors de la duplication."
end
end
@@ -79,20 +79,20 @@ class Promoter::TicketTypesController < ApplicationController
def ensure_can_manage_events!
unless current_user.can_manage_events?
redirect_to dashboard_path, alert: 'Vous n\'avez pas les permissions nécessaires pour gérer des événements.'
redirect_to dashboard_path, alert: "Vous n'avez pas les permissions nécessaires pour gérer des événements."
end
end
def set_event
@event = current_user.events.find(params[:event_id])
rescue ActiveRecord::RecordNotFound
redirect_to promoter_events_path, alert: 'Event non trouvé ou vous n\'avez pas accès à cet event.'
redirect_to promoter_events_path, alert: "Event non trouvé ou vous n'avez pas accès à cet event."
end
def set_ticket_type
@ticket_type = @event.ticket_types.find(params[:id])
rescue ActiveRecord::RecordNotFound
redirect_to promoter_event_ticket_types_path(@event), alert: 'Type de billet non trouvé.'
redirect_to promoter_event_ticket_types_path(@event), alert: "Type de billet non trouvé."
end
def ticket_type_params
@@ -101,4 +101,4 @@ class Promoter::TicketTypesController < ApplicationController
:sale_start_at, :sale_end_at, :minimum_age, :requires_id
)
end
end
end

View File

@@ -36,10 +36,10 @@ class TicketsController < ApplicationController
# Redirect retry payment to order system
def retry_payment
@event = Event.includes(:ticket_types).find(params[:id])
# Look for draft order for this event
order = current_user.orders.find_by(event: @event, status: "draft")
if order&.can_retry_payment?
redirect_to retry_payment_order_path(order)
else
@@ -58,15 +58,15 @@ class TicketsController < ApplicationController
def set_event
event_id = params[:id] || session[:event_id]
Rails.logger.debug "TicketsController#set_event - params[:id]: #{params[:id].inspect}, session[:event_id]: #{session[:event_id].inspect}"
unless event_id
Rails.logger.error "TicketsController#set_event - No event ID found"
redirect_to events_path, alert: "Aucun événement spécifié"
return
end
@event = Event.includes(:ticket_types).find(event_id)
Rails.logger.debug "TicketsController#set_event - Found event: #{@event.id} - #{@event.name}"
rescue ActiveRecord::RecordNotFound

View File

@@ -6,7 +6,7 @@ module ApplicationHelper
# Include flash message helpers
include FlashMessagesHelper
# Include Stripe helper
include StripeHelper
end

View File

@@ -1,28 +1,28 @@
module LucideHelper
# Create a Lucide icon element
#
#
# @param name [String] The name of the Lucide icon
# @param options [Hash] Additional options
# @option options [String] :class Additional CSS classes
# @option options [String] :size Size class (e.g., 'w-4 h-4', 'w-6 h-6')
# @option options [Hash] :data Additional data attributes
#
#
# @return [String] HTML string for the icon
#
# Usage:
# lucide_icon('user')
# lucide_icon('user')
# lucide_icon('check-circle', class: 'text-green-500', size: 'w-5 h-5')
# lucide_icon('menu', data: { action: 'click->header#toggleMenu' })
def lucide_icon(name, options = {})
css_classes = ["lucide-icon"]
css_classes = [ "lucide-icon" ]
css_classes << options[:size] if options[:size]
css_classes << options[:class] if options[:class]
data_attributes = { lucide: name }
data_attributes.merge!(options[:data]) if options[:data]
content_tag :i, "",
class: css_classes.join(" "),
content_tag :i, "",
class: css_classes.join(" "),
data: data_attributes,
**options.except(:class, :size, :data)
end
@@ -35,23 +35,23 @@ module LucideHelper
# @option options [String] :class Additional CSS classes for button
# @option options [String] :icon_class Additional CSS classes for icon
# @option options [String] :icon_size Size class for icon
#
#
# Usage:
# lucide_button('plus', text: 'Add Item', class: 'btn btn-primary')
# lucide_button('trash-2', class: 'btn-danger', data: { confirm: 'Are you sure?' })
def lucide_button(name, options = {})
text = options.delete(:text)
icon_class = options.delete(:icon_class)
icon_size = options.delete(:icon_size) || 'w-4 h-4'
icon_size = options.delete(:icon_size) || "w-4 h-4"
icon = lucide_icon(name, class: icon_class, size: icon_size)
content = if text.present?
safe_join([icon, " ", text])
else
safe_join([ icon, " ", text ])
else
icon
end
end
content_tag :button, content, options
end
@@ -60,23 +60,23 @@ module LucideHelper
# @param name [String] The name of the Lucide icon
# @param url [String] The URL for the link
# @param options [Hash] Link options
#
#
# Usage:
# lucide_link('edit', edit_user_path(user), text: 'Edit')
# lucide_link('external-link', 'https://example.com', text: 'Visit', target: '_blank')
def lucide_link(name, url, options = {})
text = options.delete(:text)
icon_class = options.delete(:icon_class)
icon_size = options.delete(:icon_size) || 'w-4 h-4'
icon_size = options.delete(:icon_size) || "w-4 h-4"
icon = lucide_icon(name, class: icon_class, size: icon_size)
content = if text.present?
safe_join([icon, " ", text])
else
safe_join([ icon, " ", text ])
else
icon
end
end
link_to content, url, options
end
end
end

View File

@@ -3,10 +3,10 @@ module StripeHelper
def safe_stripe_call(&block)
# Check if Stripe is properly configured
return nil unless Rails.application.config.stripe[:secret_key].present?
# Stripe is now initialized at application startup
Rails.logger.debug "Using globally initialized Stripe"
begin
yield if block_given?
rescue Stripe::StripeError => e
@@ -14,4 +14,4 @@ module StripeHelper
nil
end
end
end
end

View File

@@ -6,3 +6,18 @@ import "@hotwired/turbo-rails";
// Import all Stimulus controllers
import "./controllers";
// Import and initialize Lucide icons globally
import { createIcons, icons } from 'lucide';
// Initialize icons globally
function initializeLucideIcons() {
createIcons({ icons });
}
// Run on initial page load
document.addEventListener('DOMContentLoaded', initializeLucideIcons);
// Run on Turbo navigation (Rails 7+ SPA behavior)
document.addEventListener('turbo:render', initializeLucideIcons);
document.addEventListener('turbo:frame-render', initializeLucideIcons);

View File

@@ -1,68 +0,0 @@
import { Controller } from "@hotwired/stimulus"
// Connects to data-controller="lucide"
export default class extends Controller {
static targets = ["icon"]
connect() {
this.initializeIcons()
// Listen for Turbo navigation events to reinitialize icons
document.addEventListener('turbo:render', this.handleTurboRender.bind(this))
document.addEventListener('turbo:frame-render', this.handleTurboFrameRender.bind(this))
}
disconnect() {
// Clean up event listeners
document.removeEventListener('turbo:render', this.handleTurboRender.bind(this))
document.removeEventListener('turbo:frame-render', this.handleTurboFrameRender.bind(this))
}
// Initialize all Lucide icons in the controller scope
initializeIcons() {
if (typeof lucide !== 'undefined') {
// Initialize icons within this controller's element
lucide.createIcons({
element: this.element
})
} else {
console.warn('Lucide not loaded yet, retrying...')
// Retry after a short delay if Lucide hasn't loaded yet
setTimeout(() => this.initializeIcons(), 100)
}
}
// Method to reinitialize icons after dynamic content changes
reinitialize() {
this.initializeIcons()
}
// Method to create a specific icon programmatically
createIcon(iconName, element = null) {
if (typeof lucide !== 'undefined') {
const targetElement = element || this.element
lucide.createIcons({
element: targetElement,
icons: {
[iconName]: lucide[iconName]
}
})
}
}
// Handle Turbo page renders
handleTurboRender() {
// Small delay to ensure DOM is fully updated
setTimeout(() => this.initializeIcons(), 10)
}
// Handle Turbo frame renders
handleTurboFrameRender(event) {
// Initialize icons within the specific frame that was rendered
if (event.detail && event.detail.newFrame) {
lucide.createIcons({
element: event.detail.newFrame
})
}
}
}

View File

@@ -3,7 +3,7 @@ class CleanupExpiredDraftsJob < ApplicationJob
def perform
expired_count = 0
Ticket.expired_drafts.find_each do |ticket|
Rails.logger.info "Expiring draft ticket #{ticket.id} for user #{ticket.user_id}"
ticket.expire_if_overdue!
@@ -12,4 +12,4 @@ class CleanupExpiredDraftsJob < ApplicationJob
Rails.logger.info "Expired #{expired_count} draft tickets" if expired_count > 0
end
end
end

View File

@@ -4,9 +4,9 @@ class ExpiredOrdersCleanupJob < ApplicationJob
def perform
# Find and expire all draft orders that have passed their expiry time
expired_orders = Order.expired_drafts
Rails.logger.info "Found #{expired_orders.count} expired orders to process"
expired_orders.find_each do |order|
begin
order.expire_if_overdue!
@@ -17,7 +17,7 @@ class ExpiredOrdersCleanupJob < ApplicationJob
next
end
end
Rails.logger.info "Completed expired orders cleanup job"
end
end

View File

@@ -1,21 +1,21 @@
class TicketMailer < ApplicationMailer
default from: 'notifications@aperonight.com'
default from: "notifications@aperonight.com"
def purchase_confirmation(ticket)
@ticket = ticket
@user = ticket.user
@event = ticket.event
# Generate PDF attachment
pdf = @ticket.to_pdf
attachments["ticket-#{@event.name.parameterize}-#{@ticket.qr_code[0..7]}.pdf"] = {
mime_type: 'application/pdf',
mime_type: "application/pdf",
content: pdf
}
mail(
to: @user.email,
subject: "Confirmation d'achat - #{@event.name}"
)
end
end
end

View File

@@ -48,5 +48,4 @@ class Event < ApplicationRecord
# Scope for published events ordered by start time
scope :upcoming, -> { published.where("start_time >= ?", Time.current).order(start_time: :asc) }
end

View File

@@ -90,4 +90,4 @@ class Order < ApplicationRecord
def draft?
status == "draft"
end
end
end

View File

@@ -12,7 +12,7 @@ class TicketType < ApplicationRecord
validates :sale_end_at, presence: true
validates :minimum_age, numericality: { only_integer: true, greater_than_or_equal_to: 0, less_than_or_equal_to: 120 }, allow_nil: true
validates :event_id, presence: true
validates :requires_id, inclusion: { in: [true, false] }
validates :requires_id, inclusion: { in: [ true, false ] }
# Custom validations
validate :sale_end_after_start
@@ -22,7 +22,7 @@ class TicketType < ApplicationRecord
scope :available_now, -> { where("sale_start_at <= ? AND sale_end_at >= ?", Time.current, Time.current) }
scope :upcoming, -> { where("sale_start_at > ?", Time.current) }
scope :expired, -> { where("sale_end_at < ?", Time.current) }
# Helper methods
def price_euros
return 0.0 if price_cents.nil?
@@ -45,7 +45,7 @@ class TicketType < ApplicationRecord
def available_quantity
return 0 if quantity.nil?
[quantity - tickets.count, 0].max
[ quantity - tickets.count, 0 ].max
end
def sales_status
@@ -53,7 +53,7 @@ class TicketType < ApplicationRecord
return :expired if sale_end_at < Time.current
return :upcoming if sale_start_at > Time.current
return :sold_out if sold_out?
return :available
:available
end
def total_potential_revenue

View File

@@ -1,6 +1,6 @@
require 'prawn'
require 'prawn/qrcode'
require 'rqrcode'
require "prawn"
require "prawn/qrcode"
require "rqrcode"
class TicketPdfGenerator
attr_reader :ticket
@@ -10,7 +10,7 @@ class TicketPdfGenerator
end
def generate
Prawn::Document.new(page_size: [350, 600], margin: 20) do |pdf|
Prawn::Document.new(page_size: [ 350, 600 ], margin: 20) do |pdf|
# Header
pdf.fill_color "2D1B69"
pdf.font "Helvetica", style: :bold, size: 24
@@ -26,7 +26,7 @@ class TicketPdfGenerator
# Ticket info box
pdf.stroke_color "E5E7EB"
pdf.fill_color "F9FAFB"
pdf.rounded_rectangle [0, pdf.cursor], 310, 120, 10
pdf.rounded_rectangle [ 0, pdf.cursor ], 310, 120, 10
pdf.fill_and_stroke
pdf.move_down 10
@@ -82,7 +82,7 @@ class TicketPdfGenerator
qrcode = RQRCode::QRCode.new(qr_code_data)
pdf.print_qr_code(qrcode, extent: 120, align: :center)
pdf.move_down 15
# QR code text
@@ -104,4 +104,4 @@ class TicketPdfGenerator
pdf.text "Generated on #{Time.current.strftime('%B %d, %Y at %I:%M %p')}", align: :center
end.render
end
end
end

View File

@@ -14,8 +14,7 @@
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Outfit:wght@400;500;600;700;800;900&display=swap" rel="stylesheet">
<!-- Lucide Icons -->
<script src="https://unpkg.com/lucide@latest/dist/umd/lucide.min.js"></script>
<!-- Lucide Icons loaded via npm package -->
<%# Enable PWA manifest for installable apps (make sure to enable in config/routes.rb too!) %>
<%#= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %>

View File

@@ -1,225 +0,0 @@
# Authentication Messages Implementation Plan
## Overview
This document outlines the implementation of error/warn/info messages for login, registration, logout, password reset, and other authentication flows based on the existing purple/pink theme.
## Current State Analysis
- **Theme**: Purple/pink gradient system with neutral colors
- **Authentication**: Devise with custom controllers
- **Missing**: Flash message display system
- **Existing**: Only form validation errors are displayed
## Implementation Steps
### 1. Flash Message Component
Create a reusable flash message component that integrates with the theme.
### 2. CSS Classes for Message Types
Add theme-consistent styles for different message types:
- Success (green/purple)
- Error (red)
- Warning (yellow/orange)
- Info (blue)
### 3. JavaScript Enhancement
Add auto-dismiss functionality and animations
### 4. Integration
Update layouts and views to use the new message system
## Files to Create/Update
### A. Flash Message Partial
**File**: `app/views/shared/_flash_messages.html.erb`
```erb
<% flash.each do |type, message| %>
<% if message.present? %>
<div class="flash-message <%= flash_class(type) %> animate-fade-in" data-controller="flash-message">
<div class="flex items-start">
<div class="flex-shrink-0">
<%= flash_icon(type) %>
</div>
<div class="ml-3 flex-1">
<p class="text-sm font-medium"><%= message %></p>
</div>
<div class="ml-4 flex-shrink-0 flex">
<button data-action="click->flash-message#close" class="inline-flex text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-purple-500">
<svg class="h-5 w-5" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd" />
</svg>
</button>
</div>
</div>
</div>
<% end %>
<% end %>
```
### B. Flash Message Styling
**File**: `app/assets/stylesheets/components/flash.css`
```css
/* Flash Messages - Theme Integration */
.flash-message {
@apply max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mb-4;
}
.flash-message .flash-container {
@apply rounded-lg p-4 shadow-md border;
}
.flash-message-success .flash-container {
@apply bg-gradient-to-r from-green-50 to-purple-50 border-green-200 text-green-800;
}
.flash-message-error .flash-container {
@apply bg-gradient-to-r from-red-50 to-pink-50 border-red-200 text-red-800;
}
.flash-message-warning .flash-container {
@apply bg-gradient-to-r from-yellow-50 to-orange-50 border-yellow-200 text-yellow-800;
}
.flash-message-info .flash-container {
@apply bg-gradient-to-r from-blue-50 to-purple-50 border-blue-200 text-blue-800;
}
.flash-message-notice .flash-container {
@apply bg-gradient-to-r from-purple-50 to-pink-50 border-purple-200 text-purple-800;
}
.flash-message-alert .flash-container {
@apply bg-gradient-to-r from-red-50 to-pink-50 border-red-200 text-red-800;
}
```
### C. Helper Methods
**File**: `app/helpers/flash_messages_helper.rb`
```ruby
module FlashMessagesHelper
def flash_class(type)
case type.to_s
when 'notice' then 'flash-message-success'
when 'success' then 'flash-message-success'
when 'error' then 'flash-message-error'
when 'alert' then 'flash-message-error'
when 'warning' then 'flash-message-warning'
when 'info' then 'flash-message-info'
else "flash-message-#{type}"
end
end
def flash_icon(type)
case type.to_s
when 'notice', 'success'
content_tag :svg, class: "h-5 w-5 text-green-400", fill: "currentColor", viewBox: "0 0 20 20" do
content_tag :path, "", "fill-rule": "evenodd", "d": "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z", "clip-rule": "evenodd"
end
when 'error', 'alert'
content_tag :svg, class: "h-5 w-5 text-red-400", fill: "currentColor", viewBox: "0 0 20 20" do
content_tag :path, "", "fill-rule": "evenodd", "d": "M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z", "clip-rule": "evenodd"
end
when 'warning'
content_tag :svg, class: "h-5 w-5 text-yellow-400", fill: "currentColor", viewBox: "0 0 20 20" do
content_tag :path, "", "fill-rule": "evenodd", "d": "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z", "clip-rule": "evenodd"
end
else
content_tag :svg, class: "h-5 w-5 text-blue-400", fill: "currentColor", viewBox: "0 0 20 20" do
content_tag :path, "", "fill-rule": "evenodd", "d": "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z", "clip-rule": "evenodd"
end
end
end
end
```
### D. JavaScript Controller
**File**: `app/javascript/controllers/flash_message_controller.js`
```javascript
import { Controller } from "@hotwired/stimulus"
export default class extends Controller {
static targets = ["message"]
connect() {
// Auto-dismiss after 5 seconds
this.timeout = setTimeout(() => {
this.close()
}, 5000)
}
disconnect() {
if (this.timeout) {
clearTimeout(this.timeout)
}
}
close() {
this.element.classList.add('opacity-0', 'transition-opacity', 'duration-300')
setTimeout(() => {
this.element.remove()
}, 300)
}
}
```
### E. Update Application Layout
**File**: `app/views/layouts/application.html.erb` (add flash messages)
```erb
<body class="h-full font-sans text-neutral-900 antialiased">
<div class="min-h-full">
<%= render "components/header" %>
<main class="container mx-auto px-4 sm:px-6 lg:px-8 py-8">
<%= render "shared/flash_messages" %>
<%= yield %>
</main>
<%= render "components/footer" %>
</div>
</body>
```
### F. Update Authentication Views
Update all Devise views to remove the old error display and rely on flash messages.
## Testing Checklist
### Authentication Flows to Test:
1. **Registration**
- Successful registration
- Registration with validation errors
- Email confirmation
2. **Login**
- Successful login
- Invalid credentials
- Account locked/unconfirmed
3. **Password Reset**
- Request reset email
- Reset password success/failure
4. **Account Management**
- Update profile
- Change password
- Delete account
### Message Types to Verify:
- [ ] Success messages (green/purple)
- [ ] Error messages (red/pink)
- [ ] Warning messages (yellow/orange)
- [ ] Info messages (blue/purple)
## Implementation Order
1. Create CSS classes and theme integration
2. Create helper methods
3. Create partial templates
4. Add to application layout
5. Test each authentication flow
6. Add JavaScript enhancements
## Notes
- All messages use the existing purple/pink theme colors
- Responsive design for mobile/desktop
- Auto-dismiss functionality with manual close option
- Smooth animations and transitions
- Accessibility compliant with focus indicators

View File

@@ -1,47 +0,0 @@
# Checkout Process Implementation Summary
## Database Changes
1. **Migration**: Added `first_name` and `last_name` fields to the `tickets` table
- File: `db/migrate/20250828143000_add_names_to_tickets.rb`
## Model Changes
1. **Ticket Model**:
- Added validations for `first_name` and `last_name` when required by ticket type
- Added `requires_names?` method to check if names are required based on ticket type
## Controller Changes
1. **Events Controller**:
- Modified `checkout` action to redirect to name collection when tickets require names
- Added `collect_names` action to display form for collecting ticket holder names
- Added `process_names` action to handle submitted names and proceed to payment
- Updated `payment_success` action to create tickets with names when provided
## View Changes
1. **Events Show View**:
- Added `change` event listener to quantity inputs in ticket cards
2. **Ticket Card Component**:
- Added `change` event listener to quantity inputs
3. **New View**:
- Created `app/views/events/collect_names.html.erb` for collecting ticket holder names
## Route Changes
1. **New Routes**:
- `GET events/:slug.:id/names` - Collect names for tickets requiring identification
- `POST events/:slug.:id/names` - Process submitted names and proceed to payment
## JavaScript Changes
1. **Ticket Cart Controller**:
- No changes needed as name collection is handled server-side
## Outstanding Tasks
1. Run the database migration in the Docker environment once gem issues are resolved
2. Test the complete checkout flow with name collection

View File

@@ -26,6 +26,5 @@ module Aperonight
config.i18n.load_path += Dir[Rails.root.join("my", "locales", "*.{rb,yml}")]
# config.i18n.default_locale = :fr
end
end

View File

@@ -24,7 +24,7 @@ Devise.setup do |config|
# Configure the e-mail address which will be shown in Devise::Mailer,
# note that it will be overwritten if you use your own mailer class
# with default "from" parameter.
config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
config.mailer_sender = "please-change-me-at-config-initializers-devise@example.com"
# Configure the class responsible to send e-mails.
# config.mailer = 'Devise::Mailer'
@@ -36,7 +36,7 @@ Devise.setup do |config|
# Load and configure the ORM. Supports :active_record (default) and
# :mongoid (bson_ext recommended) by default. Other ORMs may be
# available as additional gems.
require 'devise/orm/active_record'
require "devise/orm/active_record"
# ==> Configuration for any authentication mechanism
# Configure which keys are used when authenticating a user. The default is
@@ -58,12 +58,12 @@ Devise.setup do |config|
# Configure which authentication keys should be case-insensitive.
# These keys will be downcased upon creating or modifying a user and when used
# to authenticate or find a user. Default is :email.
config.case_insensitive_keys = [:email]
config.case_insensitive_keys = [ :email ]
# Configure which authentication keys should have whitespace stripped.
# These keys will have whitespace before and after removed upon creating or
# modifying a user and when used to authenticate or find a user. Default is :email.
config.strip_whitespace_keys = [:email]
config.strip_whitespace_keys = [ :email ]
# Tell if authentication through request.params is enabled. True by default.
# It can be set to an array that will enable params authentication only for the
@@ -97,7 +97,7 @@ Devise.setup do |config|
# Notice that if you are skipping storage for all authentication paths, you
# may want to disable generating routes to Devise's sessions controller by
# passing skip: :sessions to `devise_for` in your config/routes.rb
config.skip_session_storage = [:http_auth]
config.skip_session_storage = [ :http_auth ]
# By default, Devise cleans up the CSRF token on authentication to
# avoid CSRF token fixation attacks. This means that, when using AJAX

View File

@@ -1,10 +1,10 @@
Rails.application.configure do
# Load environment variables from .env file if dotenv is not available
env_file = Rails.root.join('.env')
env_file = Rails.root.join(".env")
if File.exist?(env_file) && !defined?(Dotenv)
File.readlines(env_file).each do |line|
next if line.strip.empty? || line.start_with?('#')
key, value = line.split('=', 2)
next if line.strip.empty? || line.start_with?("#")
key, value = line.split("=", 2)
ENV[key.strip] = value.strip if key && value
end
end
@@ -37,4 +37,4 @@ Rails.application.configure do
else
Rails.logger.warn "Stripe secret key not found - Stripe will not be initialized"
end
end
end

View File

@@ -15,9 +15,9 @@ Rails.application.config.after_initialize do
rescue => e
Rails.logger.error "Failed to schedule expired drafts cleanup: #{e.message}"
end
sleep 10.minutes
end
end
end
end
end

View File

@@ -42,7 +42,7 @@ Rails.application.routes.draw do
get "events/:slug.:id/orders/new", to: "orders#new", as: "event_order_new"
post "events/:slug.:id/orders", to: "orders#create", as: "event_order_create"
resources :orders, only: [:show] do
resources :orders, only: [ :show ] do
member do
get :checkout
post :retry_payment

View File

@@ -43,6 +43,8 @@ class DeviseCreateUsers < ActiveRecord::Migration[8.0]
# t.string :company_email, null: true # Email de la société
# t.string :company_website, null: true # Site web de la société
t.string :stripe_customer_id, null: true
t.timestamps null: false
end

View File

@@ -13,8 +13,8 @@ class CreateOrders < ActiveRecord::Migration[8.0]
end
# Indexes for performance
add_index :orders, [:user_id, :status], name: 'idx_orders_user_status'
add_index :orders, [:event_id, :status], name: 'idx_orders_event_status'
add_index :orders, [ :user_id, :status ], name: 'idx_orders_user_status'
add_index :orders, [ :event_id, :status ], name: 'idx_orders_event_status'
add_index :orders, :expires_at, name: 'idx_orders_expires_at'
end
end
end

View File

@@ -1,157 +0,0 @@
# Application.js Size Optimization Guide
## Current Issue
The `application.js` bundle is 1.4MB (2.3MB with source maps), which is significantly larger than recommended.
## Root Causes
1. **Single bundle includes everything**: All dependencies, React, controllers, and components
2. **No code splitting**: Everything is bundled into one file
3. **Development dependencies**: Alpine.js and other dev tools included
4. **No minification/optimization**: Source maps and uncompressed code
## Optimization Strategies
### 1. Split Bundles (Recommended)
Create separate bundles for different parts of the application:
**Update package.json build scripts:**
```json
{
"scripts": {
"build": "npm run build:main && npm run build:components",
"build:main": "esbuild app/javascript/application.js --bundle --minify --sourcemap --format=esm --outdir=app/assets/builds --public-path=/assets",
"build:components": "esbuild app/javascript/components/*.* --bundle --minify --format=esm --outdir=app/assets/builds/components --public-path=/assets --loader:.js=jsx",
"build:css": "postcss ./app/assets/stylesheets/application.postcss.css -o ./app/assets/builds/application.css"
}
}
```
### 2. Remove Unused Dependencies
**package.json optimization:**
```json
{
"dependencies": {
"@hotwired/stimulus": "^3.2.2",
"@hotwired/turbo-rails": "^8.0.13",
"@radix-ui/react-slot": "^1.2.3",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@tailwindcss/postcss": "^4.1.4",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"esbuild": "^0.25.4",
"postcss": "^8.5.3",
"tailwind-merge": "^3.3.1",
"tailwindcss": "^4.1.4",
"tailwindcss-animate": "^1.0.7"
}
}
```
**Remove these from devDependencies:**
- `alpinejs` - if not used
- `@types/alpinejs` - if Alpine.js removed
- `cssnano` - if using Tailwind's built-in minification
- `pm2` - production deployment tool
### 3. Dynamic Imports (Code Splitting)
**Update application.js:**
```javascript
// Instead of importing everything statically
import "@hotwired/turbo-rails"
import "./controllers"
// Use dynamic imports for heavy components
const loadComponent = async (componentName) => {
const { default: component } = await import(`./components/${componentName}`)
return component
}
```
### 4. Tree Shaking & Minification
**Enhanced build command:**
```json
{
"build": "esbuild app/javascript/application.js --bundle --minify --tree-shaking --drop:console --drop:debugger --sourcemap=external --format=esm --outdir=app/assets/builds --public-path=/assets"
}
```
### 5. Separate Vendor Bundle
**Create vendor.js:**
```javascript
// app/javascript/vendor.js
import "react"
import "react-dom"
import "@radix-ui/react-slot"
```
**Update build to create vendor bundle:**
```json
{
"build:vendor": "esbuild app/javascript/vendor.js --bundle --minify --format=esm --outdir=app/assets/builds --public-path=/assets",
"build:app": "esbuild app/javascript/application.js --bundle --minify --external:react --external:react-dom --format=esm --outdir=app/assets/builds --public-path=/assets"
}
```
### 6. Conditional Loading
**Lazy load heavy components:**
```javascript
// app/javascript/application.js
if (document.querySelector('[data-controller="shadcn-test"]')) {
import('./controllers/shadcn_test_controller')
}
```
### 7. Production Optimization Checklist
**Step 1: Analyze bundle size**
```bash
npm install --save-dev webpack-bundle-analyzer
npx esbuild app/javascript/application.js --bundle --analyze
```
**Step 2: Implement optimizations**
```bash
# Remove unused dependencies
npm uninstall alpinejs @types/alpinejs cssnano pm2
# Update build scripts
npm run build
```
**Step 3: Verify size reduction**
Should reduce from 1.4MB to ~200-400KB
## Quick Fix Commands
```bash
# 1. Remove Alpine.js (if unused)
npm uninstall alpinejs @types/alpinejs
# 2. Update build with optimization
npm install --save-dev esbuild@latest
# 3. Modify package.json scripts
# (Copy the optimized scripts above)
# 4. Build with optimization
npm run build
```
## Expected Results
- **Before**: 1.4MB application.js
- **After**: 200-400KB with code splitting
- **Vendor bundle**: ~100KB (cached)
- **App bundle**: ~100-300KB (dynamic)
## Monitoring
Add bundle size monitoring to CI/CD:
```json
{
"size-limits": {
"app/assets/builds/application.js": "500kb",
"app/assets/builds/application.css": "50kb"
}
}

View File

@@ -1,363 +0,0 @@
# Aperonight - Technical Architecture
## Overview
Aperonight is a Ruby on Rails web application designed for proposing night parties in Paris and allowing event makers to create their own events. The application serves two primary user groups:
### For Customers:
- View upcoming and past parties
- Book tickets with customizable bundles (simple entry, VIP, group passes, etc.)
- Complete secure payments via credit card, PayPal, or bank transfer
- Access mobile-friendly interface for ticket management
- Receive unique, scannable tickets (QR codes)
### For Promoters:
- Create and schedule parties
- Define custom ticket bundles and pricing
- Aggregate events from external platforms (Shogun, Bizouk, Weezevent)
- Scan tickets at events using mobile devices
## Technical Architecture
### 1. Database Schema
```ruby
# User - Handles both customers and promoters
create_table :users do |t|
t.string :email
t.string :password_digest
t.string :role # customer or promoter
t.timestamps
end
# Event - Events created by promoters
create_table :events do |t|
t.string :name
t.text :description
t.datetime :start_time
t.datetime :end_time
t.string :location
t.integer :promoter_id
t.timestamps
end
# TicketType - Customizable bundles defined by promoters
create_table :ticket_types do |t|
t.string :name
t.text :description
t.decimal :price
t.integer :event_id
t.timestamps
end
# Ticket - Individual ticket instances purchased by customers
create_table :tickets do |t|
t.string :uuid
t.string :qr_code
t.integer :event_id
t.integer :user_id
t.integer :ticket_type_id
t.boolean :used, default: false
t.timestamps
end
# Payment - Transaction records for ticket purchases
create_table :payments do |t|
t.string :payment_method # credit_card, paypal, bank_account
t.string :transaction_id
t.integer :user_id
t.integer :ticket_id
t.decimal :amount
t.timestamps
end
```
### 2. Core Models
```ruby
class User < ApplicationRecord
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :validatable
has_many :tickets
has_many :payments
has_many :parties, foreign_key: 'promoter_id'
end
class Event < ApplicationRecord
belongs_to :promoter, class_name: 'User'
has_many :tickets
has_many :ticket_types
end
class TicketType < ApplicationRecord
belongs_to :event
has_many :tickets
end
class Ticket < ApplicationRecord
belongs_to :event
belongs_to :user
belongs_to :ticket_type
has_one :payment
before_create :generate_uuid_and_qr_code
private
def generate_uuid_and_qr_code
self.uuid = SecureRandom.uuid
self.qr_code = RQRCode::QRCode.new(self.uuid).as_svg
end
end
class Payment < ApplicationRecord
belongs_to :user
belongs_to :ticket
enum payment_method: {
credit_card: 'credit_card',
paypal: 'paypal',
bank_account: 'bank_account'
}
after_create :process_payment
private
def process_payment
case self.payment_method
when 'credit_card'
process_stripe_payment
when 'paypal'
process_paypal_payment
when 'bank_account'
process_bank_account_payment
end
end
end
```
### 3. Key Controllers
#### Parties Controller
```ruby
class PartiesController < ApplicationController
before_action :authenticate_user!
before_action :set_event, only: [:show, :edit, :update, :destroy]
def index
@parties = Event.all
end
def show
@ticket_types = @event.ticket_types
end
def new
@event = Event.new
@event.ticket_types.build
end
def create
@event = current_user.parties.build(event_params)
if @event.save
redirect_to @event, notice: 'Event was successfully created.'
else
render :new
end
end
private
def set_event
@event = Event.find(params[:id])
end
def event_params
params.require(:event).permit(
:name, :description, :start_time, :end_time, :location,
ticket_types_attributes: [:id, :name, :description, :price, :_destroy]
)
end
end
```
#### Tickets Controller
```ruby
class TicketsController < ApplicationController
before_action :authenticate_user!
before_action :set_event, only: [:new, :create]
def new
@ticket = Ticket.new
end
def create
@ticket = current_user.tickets.build(ticket_params)
if @ticket.save
redirect_to @ticket, notice: 'Ticket was successfully booked.'
else
render :new
end
end
def scan
end
def validate
qr_code = params[:qr_code]
ticket = Ticket.find_by(qr_code: qr_code)
if ticket && !ticket.used
ticket.update(used: true)
render json: { valid: true }
else
render json: { valid: false }
end
end
private
def set_event
@event = Event.find(params[:event_id])
end
def ticket_params
params.require(:ticket).permit(:ticket_type_id, :event_id)
end
end
```
### 4. Payment Integration
#### Stripe Configuration
```ruby
# config/initializers/stripe.rb
Rails.configuration.stripe = {
publishable_key: ENV['STRIPE_PUBLISHABLE_KEY'],
secret_key: ENV['STRIPE_SECRET_KEY']
}
Stripe.api_key = Rails.configuration.stripe[:secret_key]
```
#### PayPal Configuration
```ruby
# config/initializers/paypal.rb
PayPal::SDK.configure({
mode: ENV['PAYPAL_MODE'], # 'sandbox' or 'live'
client_id: ENV['PAYPAL_CLIENT_ID'],
client_secret: ENV['PAYPAL_CLIENT_SECRET']
})
```
### 5. Frontend Considerations
#### Mobile Ticket Scanning
```erb
<!-- app/views/tickets/scan.html.erb -->
<!DOCTYPE html>
<html>
<head>
<title>Scan Ticket</title>
<script src="https://unpkg.com/html5-qrcode"></script>
</head>
<body>
<h1>Scan Ticket</h1>
<div id="reader" width="500"></div>
<div id="result"></div>
<script>
function docReady(fn) {
if (document.readyState === "complete" || document.readyState === "interactive") {
setTimeout(fn, 1);
} else {
document.addEventListener("DOMContentLoaded", fn);
}
}
docReady(function () {
var resultContainer = document.getElementById('result');
var lastResult, countResults = 0;
function onScanSuccess(qrCodeMessage) {
if (qrCodeMessage !== lastResult) {
++countResults;
lastResult = qrCodeMessage;
resultContainer.innerHTML = `<span class="label">Last scanned QR Code: </span> <a href="${qrCodeMessage}">${qrCodeMessage}</a>`;
fetch('/tickets/validate', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-CSRF-Token': document.querySelector('meta[name="csrf-token"]').getAttribute('content')
},
body: JSON.stringify({ qr_code: qrCodeMessage })
})
.then(response => response.json())
.then(data => {
if (data.valid) {
resultContainer.innerHTML += '<p>Ticket is valid.</p>';
} else {
resultContainer.innerHTML += '<p>Ticket is invalid.</p>';
}
})
.catch(error => {
console.error('Error:', error);
});
}
}
var html5QrcodeScanner = new Html5QrcodeScanner(
"reader", { fps: 10, qrbox: 250 });
html5QrcodeScanner.render(onScanSuccess);
});
</script>
</body>
</html>
```
### 6. Routes Configuration
```ruby
# config/routes.rb
Rails.application.routes.draw do
devise_for :users
resources :parties do
resources :ticket_types, only: [:new, :create, :edit, :update, :destroy]
end
resources :ticket_types, only: [:index, :show]
resources :tickets do
resources :payments, only: [:new, :create]
collection do
post 'validate'
end
end
get 'paypal_success', to: 'payments#paypal_success'
get 'paypal_cancel', to: 'payments#paypal_cancel'
get 'tickets/scan', to: 'tickets#scan'
root 'parties#index'
end
```
## Implementation Recommendations
### Authentication & Authorization
- Use Devise for user authentication
- Implement Pundit or CanCanCan for role-based access control
- Distinguish clearly between customer and promoter permissions
### Payment Processing
- Integrate Stripe for credit card payments
- Add PayPal support through official SDK
- Consider Plaid for bank account integration
### Performance & Scalability
- Implement Redis for caching frequently accessed data
- Use CDN for static assets (images, CSS, JS)
- Employ background job processing (Sidekiq) for emails and payments
- Optimize database queries with proper indexing
### Security Considerations
- Validate all user inputs
- Sanitize HTML output to prevent XSS
- Secure payment processing with PCI compliance
- Implement rate limiting for API endpoints
- Regular security audits and dependency updates

View File

@@ -1,142 +0,0 @@
Cette conversation a été générée avec Duck.ai (https://duck.ai) à l'aide du modèle Mistral Small 3 d'Mistral AI. Les chats IA peuvent afficher des informations inexactes ou offensantes (voir https://duckduckgo.com/duckai/privacy-terms pour en savoir plus).
====================
Message 1 sur 2 de l'utilisateur - 16/08/2025, 08:06:58:
In a git Ruby on Rails web project, how to name branches?
Mistral Small 3:
Naming branches in a Git Ruby on Rails web project (or any Git project) is an important aspect of maintaining a clean and understandable repository. Here are some best practices for naming branches:
1. **Use Descriptive Names**: The branch name should clearly describe the purpose or the feature being worked on. This helps other developers understand the context of the branch at a glance.
2. **Use Hyphens or Underscores**: Use hyphens (`-`) or underscores (`_`) to separate words in the branch name. This makes the name more readable.
3. **Prefix with the Type of Change**: Prefix the branch name with a type indicator such as `feature`, `bugfix`, `hotfix`, `release`, `chore`, `refactor`, `docs`, etc. This helps in categorizing the branches.
4. **Keep It Short but Meaningful**: While being descriptive, try to keep the branch name short to avoid clutter.
5. **Avoid Special Characters**: Stick to alphanumeric characters and hyphens/underscores. Avoid using special characters like `@`, `#`, `$`, etc.
6. **Use Lowercase Letters**: Consistently use lowercase letters to avoid case sensitivity issues.
Here are some examples of well-named branches:
- `feature/user-authentication`
- `bugfix/login-issue`
- `hotfix/critical-bug`
- `release/v1.2.0`
- `chore/update-dependencies`
- `refactor/user-model`
- `docs/update-readme`
### Example Workflow
1. **Creating a New Feature Branch**:
```sh
git checkout -b feature/user-authentication
```
2. **Creating a Bugfix Branch**:
```sh
git checkout -b bugfix/login-issue
```
3. **Creating a Hotfix Branch**:
```sh
git checkout -b hotfix/critical-bug
```
4. **Creating a Release Branch**:
```sh
git checkout -b release/v1.2.0
```
5. **Creating a Chore Branch**:
```sh
git checkout -b chore/update-dependencies
```
6. **Creating a Refactor Branch**:
```sh
git checkout -b refactor/user-model
```
7. **Creating a Docs Branch**:
```sh
git checkout -b docs/update-readme
```
By following these guidelines, you can maintain a well-organized and understandable branch structure in your Git repository, making collaboration and code management much easier.
--------------------
Message 2 sur 2 de l'utilisateur - 16/08/2025, 08:08:31:
Is it a good practice to use main, develop and functionnal names for branches?
Mistral Small 3:
Using `main`, `develop`, and feature branches is a common and widely accepted practice in Git workflows, particularly in the context of the Git Flow or GitHub Flow methodologies. Here's a breakdown of these branches and why they are useful:
1. **`main` Branch**:
- **Purpose**: The `main` branch (or sometimes called `master`) is the stable branch that always contains the production-ready code. It represents the current state of the project that is deployed to production.
- **Usage**: This branch should only contain code that has been thoroughly tested and is ready for release. It is typically protected to prevent direct commits and requires pull requests for changes.
- **Example**: `git checkout main`
2. **`develop` Branch**:
- **Purpose**: The `develop` branch is used for integrating features and preparing for the next release. It serves as a staging area for features that are in progress but not yet ready for production.
- **Usage**: Developers merge their feature branches into `develop` for integration testing. This branch can be less stable than `main` but should still be in a reasonably good state.
- **Example**: `git checkout develop`
3. **Feature Branches**:
- **Purpose**: Feature branches are used to develop new features, bug fixes, or any other isolated work. Each feature branch is created from `develop` and merged back into `develop` once the work is complete.
- **Usage**: These branches allow for parallel development without interfering with the stability of `develop` or `main`. They are typically named descriptively, as discussed earlier (e.g., `feature/user-authentication`, `bugfix/login-issue`).
- **Example**: `git checkout -b feature/user-authentication`
### Example Workflow
1. **Create a Feature Branch**:
```sh
git checkout develop
git pull origin develop
git checkout -b feature/user-authentication
```
2. **Develop the Feature**:
- Make changes, commit them, and push the branch to the remote repository.
```sh
git add .
git commit -m "Add user authentication feature"
git push origin feature/user-authentication
```
3. **Merge the Feature Branch into `develop`**:
- Once the feature is complete and tested, create a pull request to merge it into `develop`.
```sh
git checkout develop
git pull origin develop
git merge feature/user-authentication
git push origin develop
```
4. **Prepare for Release**:
- When preparing for a new release, create a release branch from `develop`.
```sh
git checkout -b release/v1.2.0
```
5. **Merge Release Branch into `main`**:
- After testing the release branch, merge it into `main` and tag the release.
```sh
git checkout main
git merge release/v1.2.0
git tag -a v1.2.0 -m "Release version 1.2.0"
git push origin main --tags
```
### Benefits
- **Stability**: The `main` branch remains stable and always contains production-ready code.
- **Integration**: The `develop` branch allows for continuous integration of features, making it easier to test and integrate new work.
- **Isolation**: Feature branches isolate work, allowing multiple developers to work on different features simultaneously without conflicts.
Using `main`, `develop`, and feature branches is a good practice as it helps maintain a clean, organized, and manageable repository, facilitating better collaboration and code management.

View File

@@ -1,322 +0,0 @@
# Backend Checkout Handling Improvements
Based on your current Stripe integration, here are key improvements for robust checkout handling:
## 1. Enhanced Inventory Management with Concurrency Protection
The current implementation doesn't prevent overselling during concurrent purchases.
Add database-level concurrency protection:
```ruby
# app/controllers/events_controller.rb
def checkout
cart_data = JSON.parse(params[:cart] || "{}")
if cart_data.empty?
redirect_to event_path(@event.slug, @event), alert: "Veuillez sélectionner au moins un billet"
return
end
# Use transaction with row-level locking for inventory protection
ActiveRecord::Base.transaction do
line_items = []
order_items = []
cart_data.each do |ticket_type_id, item|
# Lock the ticket type row to prevent race conditions
ticket_type = @event.ticket_types.lock.find_by(id: ticket_type_id)
next unless ticket_type
quantity = item["quantity"].to_i
next if quantity <= 0
# Check real-time availability with locked row
sold_count = ticket_type.tickets.count
available = ticket_type.quantity - sold_count
if quantity > available
redirect_to event_path(@event.slug, @event), alert: "Plus que #{available} billets disponibles pour #{ticket_type.name}"
return
end
# Create line items and order data
line_items << {
price_data: {
currency: "eur",
product_data: {
name: "#{@event.name} - #{ticket_type.name}",
description: ticket_type.description
},
unit_amount: ticket_type.price_cents
},
quantity: quantity
}
order_items << {
ticket_type_id: ticket_type.id,
ticket_type_name: ticket_type.name,
quantity: quantity,
price_cents: ticket_type.price_cents
}
end
if order_items.empty?
redirect_to event_path(@event.slug, @event), alert: "Commande invalide"
return
end
# Create Stripe session only after inventory validation
session = Stripe::Checkout::Session.create({
payment_method_types: ["card"],
line_items: line_items,
mode: "payment",
success_url: payment_success_url(event_id: @event.id, session_id: "{CHECKOUT_SESSION_ID}"),
cancel_url: event_url(@event.slug, @event),
customer_email: current_user.email,
metadata: {
event_id: @event.id,
user_id: current_user.id,
order_items: order_items.to_json
}
})
redirect_to session.url, allow_other_host: true
end
rescue ActiveRecord::RecordNotFound
redirect_to event_path(@event.slug, @event), alert: "Type de billet introuvable"
rescue Stripe::StripeError => e
redirect_to event_path(@event.slug, @event), alert: "Erreur de traitement du paiement : #{e.message}"
end
```
## 2. Webhook Handler for Reliable Payment Confirmation
Create a dedicated webhook endpoint for more reliable payment processing:
### Routes Configuration
```ruby
# config/routes.rb
post '/webhooks/stripe', to: 'webhooks#stripe'
```
### Webhooks Controller
```ruby
# app/controllers/webhooks_controller.rb
class WebhooksController < ApplicationController
skip_before_action :verify_authenticity_token
before_action :verify_stripe_signature
def stripe
case @event.type
when 'checkout.session.completed'
handle_successful_payment(@event.data.object)
when 'payment_intent.payment_failed'
handle_failed_payment(@event.data.object)
end
head :ok
end
private
def handle_successful_payment(session)
# Process ticket creation in background job for reliability
CreateTicketsJob.perform_later(session.id)
end
def handle_failed_payment(session)
Rails.logger.error "Payment failed for session: #{session.id}"
# Add any additional handling for failed payments
end
def verify_stripe_signature
payload = request.body.read
sig_header = request.env['HTTP_STRIPE_SIGNATURE']
begin
@event = Stripe::Webhook.construct_event(
payload, sig_header, ENV['STRIPE_WEBHOOK_SECRET']
)
rescue JSON::ParserError, Stripe::SignatureVerificationError => e
Rails.logger.error "Stripe webhook signature verification failed: #{e.message}"
head :bad_request
end
end
end
```
## 3. Background Job for Ticket Creation
Use background jobs to prevent timeouts and improve reliability:
```ruby
# app/jobs/create_tickets_job.rb
class CreateTicketsJob < ApplicationJob
queue_as :default
retry_on StandardError, wait: :exponentially_longer, attempts: 5
def perform(session_id)
session = Stripe::Checkout::Session.retrieve(session_id)
return unless session.payment_status == 'paid'
# Prevent duplicate processing
return if Ticket.exists?(stripe_session_id: session_id)
order_items = JSON.parse(session.metadata['order_items'])
user = User.find(session.metadata['user_id'])
event = Event.find(session.metadata['event_id'])
ActiveRecord::Base.transaction do
order_items.each do |item|
ticket_type = TicketType.find(item['ticket_type_id'])
item['quantity'].times do
ticket = Ticket.create!(
user: user,
ticket_type: ticket_type,
status: 'active',
stripe_session_id: session_id, # Prevent duplicates
price_cents: item['price_cents'] # Store historical price
)
# Send email asynchronously
TicketMailer.purchase_confirmation(ticket).deliver_later
end
end
end
end
end
```
## 4. Enhanced Error Handling & Recovery in Payment Success
Improve the payment success handler with better error recovery:
```ruby
# app/controllers/events_controller.rb - Enhanced payment_success method
def payment_success
session_id = params[:session_id]
event_id = params[:event_id]
# Validate parameters
unless session_id.present? && event_id.present?
redirect_to dashboard_path, alert: "Paramètres de confirmation manquants"
return
end
begin
@tickets = Ticket.includes(:ticket_type, :event)
.where(stripe_session_id: session_id, user: current_user)
if @tickets.any?
# Tickets already created (webhook processed first)
@event = @tickets.first.event
render 'payment_success'
else
# Fallback: create tickets synchronously if webhook failed
session = Stripe::Checkout::Session.retrieve(session_id)
if session.payment_status == 'paid'
CreateTicketsJob.perform_now(session_id)
redirect_to payment_success_path(session_id: session_id, event_id: event_id)
else
redirect_to dashboard_path, alert: "Le paiement n'est pas encore confirmé"
end
end
rescue Stripe::StripeError => e
logger.error "Stripe error in payment_success: #{e.message}"
redirect_to dashboard_path, alert: "Erreur de confirmation de paiement"
rescue => e
logger.error "Unexpected error in payment_success: #{e.message}"
redirect_to dashboard_path, alert: "Une erreur inattendue s'est produite"
end
end
```
## 5. Database Schema Improvements
Add migration for better payment tracking:
```ruby
# db/migrate/xxx_add_payment_tracking_to_tickets.rb
class AddPaymentTrackingToTickets < ActiveRecord::Migration[7.0]
def change
add_column :tickets, :stripe_session_id, :string
add_column :tickets, :purchased_at, :timestamp, default: -> { 'CURRENT_TIMESTAMP' }
add_index :tickets, :stripe_session_id, unique: true
add_index :tickets, [:user_id, :purchased_at]
end
end
```
## 6. Security Considerations
1. **Rate Limiting**: Add rate limiting to checkout endpoints
2. **CSRF Protection**: Already implemented ✅
3. **Input Validation**: Validate all cart data thoroughly
4. **Audit Logging**: Log all payment attempts and outcomes
5. **PCI Compliance**: Never store card data (Stripe handles this) ✅
## 7. Monitoring & Observability
Add metrics tracking to monitor checkout performance:
```ruby
# Add to ApplicationController or EventsController
around_action :track_checkout_metrics, only: [:checkout]
private
def track_checkout_metrics
start_time = Time.current
begin
yield
# Log successful checkout
Rails.logger.info("Checkout completed", {
event_id: @event&.id,
user_id: current_user&.id,
duration: Time.current - start_time
})
rescue => e
# Log failed checkout
Rails.logger.error("Checkout failed", {
event_id: @event&.id,
user_id: current_user&.id,
error: e.message,
duration: Time.current - start_time
})
raise
end
end
```
## Summary of Improvements
Your ticket checkout system is already well-implemented with Stripe integration! The enhancements above will make it production-ready:
### Critical Improvements
1. Add database row locking to prevent overselling during concurrent purchases
2. Implement Stripe webhooks for reliable payment processing
3. Use background jobs for ticket creation to prevent timeouts
4. Add duplicate prevention with stripe_session_id tracking
### Security & Reliability
5. Enhanced error recovery with fallback ticket creation
6. Comprehensive logging for debugging and monitoring
7. Database schema improvements for better payment tracking
### Key Files to Modify
- `app/controllers/events_controller.rb` - Add inventory locking
- `app/controllers/webhooks_controller.rb` - New webhook handler
- `app/jobs/create_tickets_job.rb` - Background ticket creation
- Migration for `stripe_session_id` field
These enhancements will make your checkout system robust for high-traffic scenarios and edge cases.

View File

@@ -1,103 +0,0 @@
# Theme Rules & Color Palette - Aperonight
Extracted from `app/views/pages/home.html.erb`
## Color Palette
### Primary Colors
- **Indigo**: `#4338ca` (rgb(67, 56, 202)) - Used in hero gradient
- **Purple**: `#8b5cf6` (rgb(139, 92, 246)) - Primary brand color
- **Pink**: `#ec4899` (rgb(236, 72, 153)) - Accent color
### Background Gradients
- **Hero**: `bg-gradient-to-br from-indigo-900 via-purple-800 to-pink-700`
- **CTA**: `bg-gradient-to-r from-purple-900 via-indigo-900 to-pink-900`
- **Cards**: `bg-gradient-to-br from-gray-800 to-gray-900`
- **Buttons**: `bg-gradient-to-r from-purple-600 to-pink-600`
### Text Colors
- **White**: `text-white` - Primary text
- **Gray-200**: `text-gray-200` - Secondary text
- **Gray-300**: `text-gray-300` - Subtle text
- **Gray-400**: `text-gray-400` - Muted text
- **Transparent gradient**: `text-transparent bg-clip-text bg-gradient-to-r from-purple-400 to-pink-400` - Special highlight
### Background Colors
- **Gray-900**: `bg-gray-900` - Main background
- **Black**: `bg-black` - Overlay backgrounds
- **Gray-800**: `bg-gray-800` - Card backgrounds
- **White/Transparent**: `bg-white bg-opacity-10 backdrop-blur-sm` - Glass effect
## Spacing & Layout
### Hero Section
- **Height**: `min-h-[70vh]`
- **Max-width**: `max-w-7xl mx-auto`
- **Padding**: `px-4 sm:px-6 lg:px-8`
### Grid Layouts
- **Responsive**: `grid-cols-1 md:grid-cols-2 lg:grid-cols-3`
- **Gap**: `gap-8` standard spacing
### Padding Classes
- **Section**: `py-16`, `py-20`
- **Card**: `p-4`, `p-6`, `p-8`
- **Button**: `py-3`, `py-4`, `px-6`, `px-8`
## Typography
### Font Sizes
- **Hero Title**: `text-5xl md:text-7xl`
- **Section Title**: `text-4xl`
- **Card Title**: `text-2xl`
- **Body**: `text-xl`, `text-lg`
- **Small**: `text-sm`
### Font Weights
- **Bold**: `font-bold` (headings)
- **Semibold**: `font-semibold` (buttons, important text)
- **Medium**: `font-medium` (labels)
## Interactive States
### Hover Effects
- **Scale**: `hover:scale-105`
- **Transition**: `transition-all duration-300`
- **Button Hover**: `hover:from-purple-700 hover:to-pink-700`
- **Glass Hover**: `hover:bg-opacity-20`
### Shadows
- **Default**: `shadow-lg`
- **Strong**: `shadow-xl`
- **Card**: `shadow-2xl`
## Border Radius
- **Buttons**: `rounded-full` (pill-shaped)
- **Cards**: `rounded-2xl`
- **Inputs**: `rounded-lg`
## Icon Colors
- **Primary**: `text-white` (on colored backgrounds)
- **Accent**: `text-purple-400`, `text-pink-400`
- **Muted**: `text-gray-400`
## Usage Examples
### Primary Button
```html
class="bg-gradient-to-r from-purple-600 to-pink-600 hover:from-purple-700 hover:to-pink-700 text-white font-semibold py-4 px-8 rounded-full transition-all duration-300 transform hover:scale-105 shadow-lg"
```
### Card Background
```html
class="bg-gradient-to-br from-gray-800 to-gray-900 rounded-2xl overflow-hidden hover:transform hover:scale-105 transition-all duration-300 shadow-xl"
```
### Hero Gradient
```html
class="bg-gradient-to-br from-indigo-900 via-purple-800 to-pink-700"
```
### Glass Effect
```html
class="bg-white bg-opacity-10 backdrop-blur-sm border border-white border-opacity-30"

View File

@@ -11,7 +11,7 @@ namespace :tickets do
total_drafts = Ticket.draft.count
expired_drafts = Ticket.expired_drafts.count
retryable_drafts = Ticket.can_retry_payment.count
puts "=== Draft Ticket Statistics ==="
puts "Total draft tickets: #{total_drafts}"
puts "Expired draft tickets: #{expired_drafts}"
@@ -19,4 +19,4 @@ namespace :tickets do
puts "Max payment attempts: #{Ticket::MAX_PAYMENT_ATTEMPTS}"
puts "Draft expiry time: #{Ticket::DRAFT_EXPIRY_TIME}"
end
end
end

7
package-lock.json generated
View File

@@ -9,6 +9,7 @@
"@hotwired/stimulus": "^3.2.2",
"@hotwired/turbo-rails": "^8.0.13",
"@radix-ui/react-slot": "^1.2.3",
"lucide": "^0.542.0",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
@@ -2401,6 +2402,12 @@
"node": ">=12"
}
},
"node_modules/lucide": {
"version": "0.542.0",
"resolved": "https://registry.npmjs.org/lucide/-/lucide-0.542.0.tgz",
"integrity": "sha512-+EtDSHjqg/nONgCfnjHCNd84OzbDjxR8ShnOf+oImlU+A8gqlptZ6pGrMCnhEDw8pVNQv3zu/L0eDvMzcc7nWA==",
"license": "ISC"
},
"node_modules/magic-string": {
"version": "0.30.17",
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz",

View File

@@ -10,6 +10,7 @@
"@hotwired/stimulus": "^3.2.2",
"@hotwired/turbo-rails": "^8.0.13",
"@radix-ui/react-slot": "^1.2.3",
"lucide": "^0.542.0",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},

View File

@@ -1,47 +0,0 @@
# Stripe Configuration Fix - Updated with Lazy Initialization
## Problem
The "Retour" link on the collect_names page sometimes displayed a Stripe API key error:
```
Erreur de traitement du paiement : No API key provided. Set your API key using "Stripe.api_key = <API-KEY>".
```
## Root Cause
The error occurred when Stripe code was executed without the API key being properly set. This could happen in development environments or when environment variables were not properly configured.
## Solution Evolution
We initially implemented a fix that enhanced the Stripe initializer and added better error handling. However, we have now updated our approach to use **lazy initialization** - Stripe is only initialized during the checkout process when actually needed.
## Current Solution - Lazy Initialization Approach
1. **Deferred Stripe Initialization** (`config/initializers/stripe.rb`):
- Stripe configuration is loaded at startup but API key is NOT set
- Stripe.api_key is only set during the checkout process when needed
2. **Enhanced Stripe Helper** (`app/helpers/stripe_helper.rb`):
- Added `initialize_stripe` method to initialize Stripe only when needed
- Updated `safe_stripe_call` method to automatically initialize Stripe if not already done
3. **Checkout Process Updates**:
- Added explicit Stripe initialization in `process_payment` method
- Added explicit Stripe initialization in `payment_success` method
- Added proper error handling for initialization failures
4. **Benefits of This Approach**:
- Stripe is only initialized when actually needed (during checkout)
- Application startup is not dependent on Stripe service availability
- Payment-related issues are isolated and don't affect other application features
- More efficient resource usage (Stripe library only fully loaded during checkout)
## Verification
The fix has been tested and verified to work correctly:
- Stripe is not initialized at application startup
- Stripe is properly initialized during the checkout process
- All Stripe functionality works as expected
- Error handling is improved
## Prevention
The enhanced error handling will prevent the application from crashing when Stripe is not properly configured and will display user-friendly error messages instead.
For detailed implementation, see `stripe-lazy-initialization-documentation.md`.

View File

@@ -1,60 +0,0 @@
# Stripe Configuration - Lazy Initialization Approach
## Problem
The "Retour" link on the collect_names page sometimes displayed a Stripe API key error:
```
Erreur de traitement du paiement : No API key provided. Set your API key using "Stripe.api_key = <API-KEY>".
```
## Root Cause
The error occurred because Stripe code was being called without the API key being properly set. This could happen in development environments or when environment variables were not properly configured.
## Solution Implemented - Lazy Initialization
1. **Deferred Stripe Initialization** (`config/initializers/stripe.rb`):
- Stripe configuration is loaded at startup but API key is NOT set
- Stripe.api_key is only set during the checkout process when needed
2. **Stripe Concern** (`app/controllers/concerns/stripe_concern.rb`):
- Created `StripeConcern` module with `stripe_configured?` and `initialize_stripe` methods
- Included in `EventsController` to provide access to Stripe functionality
3. **Direct Configuration Checks**:
- Updated `process_payment` and `payment_success` methods to directly check Stripe configuration
- Added proper error handling for initialization failures
4. **Benefits of This Approach**:
- Stripe is only initialized when actually needed (during checkout)
- Application startup is not dependent on Stripe service availability
- Payment-related issues are isolated and don't affect other application features
- More efficient resource usage (Stripe library only fully loaded during checkout)
5. **Verification**:
- Created test scripts to verify the lazy initialization approach
- Confirmed that Stripe is not initialized at startup but can be initialized during checkout
## Code Changes
### config/initializers/stripe.rb
- Removed automatic Stripe.api_key initialization
- Added informational log message
### app/controllers/concerns/stripe_concern.rb
- Created new concern with `stripe_configured?` and `initialize_stripe` methods
### app/controllers/events_controller.rb
- Added direct Stripe configuration checks in `process_payment` method
- Added direct Stripe configuration checks in `payment_success` method
- Added comprehensive logging for debugging
### app/helpers/stripe_helper.rb
- Kept `safe_stripe_call` method with updated logic
## Testing
The new approach has been verified to work correctly:
- Stripe is not initialized at application startup
- Stripe is properly initialized during the checkout process
- All Stripe functionality works as expected
- Error handling is improved
This approach provides better isolation of payment functionality and ensures that issues with Stripe configuration don't affect the rest of the application.

View File

@@ -11,4 +11,4 @@ class ApplicationRecordTest < ActiveSupport::TestCase
assert_kind_of Class, ApplicationRecord
assert ApplicationRecord < ActiveRecord::Base
end
end
end

View File

@@ -254,4 +254,3 @@ class TicketTest < ActiveSupport::TestCase
assert ticket.save
end
end

View File

@@ -63,4 +63,4 @@ class UserTest < ActiveSupport::TestCase
refute user.valid?, "User with last_name longer than 12 chars should be invalid"
assert_not_nil user.errors[:last_name], "No validation error for too long last_name"
end
end
end

297
yarn.lock
View File

@@ -17,158 +17,11 @@
resolved "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-5.0.0.tgz"
integrity sha512-PCqQV3c4CoVm3kdPhyeZ07VmBRdH2EpMFA/pd9OASpOEC3aXNGoqPDAZ80D0cLpMBxnmk0+yNhGsEx31hq7Gtw==
"@emnapi/core@^1.4.3", "@emnapi/core@^1.4.5":
version "1.4.5"
resolved "https://registry.yarnpkg.com/@emnapi/core/-/core-1.4.5.tgz#bfbb0cbbbb9f96ec4e2c4fd917b7bbe5495ceccb"
integrity sha512-XsLw1dEOpkSX/WucdqUhPWP7hDxSvZiY+fsUC14h+FtQ2Ifni4znbBt8punRX+Uj2JG/uDb8nEHVKvrVlvdZ5Q==
dependencies:
"@emnapi/wasi-threads" "1.0.4"
tslib "^2.4.0"
"@emnapi/runtime@^1.4.3", "@emnapi/runtime@^1.4.5":
version "1.4.5"
resolved "https://registry.yarnpkg.com/@emnapi/runtime/-/runtime-1.4.5.tgz#c67710d0661070f38418b6474584f159de38aba9"
integrity sha512-++LApOtY0pEEz1zrd9vy1/zXVaVJJ/EbAF3u0fXIzPJEDtnITsBGbbK0EkM72amhl/R5b+5xx0Y/QhcVOpuulg==
dependencies:
tslib "^2.4.0"
"@emnapi/wasi-threads@1.0.4", "@emnapi/wasi-threads@^1.0.4":
version "1.0.4"
resolved "https://registry.yarnpkg.com/@emnapi/wasi-threads/-/wasi-threads-1.0.4.tgz#703fc094d969e273b1b71c292523b2f792862bf4"
integrity sha512-PJR+bOmMOPH8AtcTGAyYNiuJ3/Fcoj2XN/gBEWzDIKh254XO+mM9XoXHk5GNEhodxeMznbg7BlRojVbKN+gC6g==
dependencies:
tslib "^2.4.0"
"@esbuild/aix-ppc64@0.25.9":
version "0.25.9"
resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.25.9.tgz#bef96351f16520055c947aba28802eede3c9e9a9"
integrity sha512-OaGtL73Jck6pBKjNIe24BnFE6agGl+6KxDtTfHhy1HmhthfKouEcOhqpSL64K4/0WCtbKFLOdzD/44cJ4k9opA==
"@esbuild/android-arm64@0.25.9":
version "0.25.9"
resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.25.9.tgz#d2e70be7d51a529425422091e0dcb90374c1546c"
integrity sha512-IDrddSmpSv51ftWslJMvl3Q2ZT98fUSL2/rlUXuVqRXHCs5EUF1/f+jbjF5+NG9UffUDMCiTyh8iec7u8RlTLg==
"@esbuild/android-arm@0.25.9":
version "0.25.9"
resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.25.9.tgz#d2a753fe2a4c73b79437d0ba1480e2d760097419"
integrity sha512-5WNI1DaMtxQ7t7B6xa572XMXpHAaI/9Hnhk8lcxF4zVN4xstUgTlvuGDorBguKEnZO70qwEcLpfifMLoxiPqHQ==
"@esbuild/android-x64@0.25.9":
version "0.25.9"
resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.25.9.tgz#5278836e3c7ae75761626962f902a0d55352e683"
integrity sha512-I853iMZ1hWZdNllhVZKm34f4wErd4lMyeV7BLzEExGEIZYsOzqDWDf+y082izYUE8gtJnYHdeDpN/6tUdwvfiw==
"@esbuild/darwin-arm64@0.25.9":
version "0.25.9"
resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.25.9.tgz#f1513eaf9ec8fa15dcaf4c341b0f005d3e8b47ae"
integrity sha512-XIpIDMAjOELi/9PB30vEbVMs3GV1v2zkkPnuyRRURbhqjyzIINwj+nbQATh4H9GxUgH1kFsEyQMxwiLFKUS6Rg==
"@esbuild/darwin-x64@0.25.9":
version "0.25.9"
resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.25.9.tgz#e27dbc3b507b3a1cea3b9280a04b8b6b725f82be"
integrity sha512-jhHfBzjYTA1IQu8VyrjCX4ApJDnH+ez+IYVEoJHeqJm9VhG9Dh2BYaJritkYK3vMaXrf7Ogr/0MQ8/MeIefsPQ==
"@esbuild/freebsd-arm64@0.25.9":
version "0.25.9"
resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.9.tgz#364e3e5b7a1fd45d92be08c6cc5d890ca75908ca"
integrity sha512-z93DmbnY6fX9+KdD4Ue/H6sYs+bhFQJNCPZsi4XWJoYblUqT06MQUdBCpcSfuiN72AbqeBFu5LVQTjfXDE2A6Q==
"@esbuild/freebsd-x64@0.25.9":
version "0.25.9"
resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.25.9.tgz#7c869b45faeb3df668e19ace07335a0711ec56ab"
integrity sha512-mrKX6H/vOyo5v71YfXWJxLVxgy1kyt1MQaD8wZJgJfG4gq4DpQGpgTB74e5yBeQdyMTbgxp0YtNj7NuHN0PoZg==
"@esbuild/linux-arm64@0.25.9":
version "0.25.9"
resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.25.9.tgz#48d42861758c940b61abea43ba9a29b186d6cb8b"
integrity sha512-BlB7bIcLT3G26urh5Dmse7fiLmLXnRlopw4s8DalgZ8ef79Jj4aUcYbk90g8iCa2467HX8SAIidbL7gsqXHdRw==
"@esbuild/linux-arm@0.25.9":
version "0.25.9"
resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.25.9.tgz#6ce4b9cabf148274101701d112b89dc67cc52f37"
integrity sha512-HBU2Xv78SMgaydBmdor38lg8YDnFKSARg1Q6AT0/y2ezUAKiZvc211RDFHlEZRFNRVhcMamiToo7bDx3VEOYQw==
"@esbuild/linux-ia32@0.25.9":
version "0.25.9"
resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.25.9.tgz#207e54899b79cac9c26c323fc1caa32e3143f1c4"
integrity sha512-e7S3MOJPZGp2QW6AK6+Ly81rC7oOSerQ+P8L0ta4FhVi+/j/v2yZzx5CqqDaWjtPFfYz21Vi1S0auHrap3Ma3A==
"@esbuild/linux-loong64@0.25.9":
version "0.25.9"
resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.25.9.tgz#0ba48a127159a8f6abb5827f21198b999ffd1fc0"
integrity sha512-Sbe10Bnn0oUAB2AalYztvGcK+o6YFFA/9829PhOCUS9vkJElXGdphz0A3DbMdP8gmKkqPmPcMJmJOrI3VYB1JQ==
"@esbuild/linux-mips64el@0.25.9":
version "0.25.9"
resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.25.9.tgz#a4d4cc693d185f66a6afde94f772b38ce5d64eb5"
integrity sha512-YcM5br0mVyZw2jcQeLIkhWtKPeVfAerES5PvOzaDxVtIyZ2NUBZKNLjC5z3/fUlDgT6w89VsxP2qzNipOaaDyA==
"@esbuild/linux-ppc64@0.25.9":
version "0.25.9"
resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.25.9.tgz#0f5805c1c6d6435a1dafdc043cb07a19050357db"
integrity sha512-++0HQvasdo20JytyDpFvQtNrEsAgNG2CY1CLMwGXfFTKGBGQT3bOeLSYE2l1fYdvML5KUuwn9Z8L1EWe2tzs1w==
"@esbuild/linux-riscv64@0.25.9":
version "0.25.9"
resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.25.9.tgz#6776edece0f8fca79f3386398b5183ff2a827547"
integrity sha512-uNIBa279Y3fkjV+2cUjx36xkx7eSjb8IvnL01eXUKXez/CBHNRw5ekCGMPM0BcmqBxBcdgUWuUXmVWwm4CH9kg==
"@esbuild/linux-s390x@0.25.9":
version "0.25.9"
resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.25.9.tgz#3f6f29ef036938447c2218d309dc875225861830"
integrity sha512-Mfiphvp3MjC/lctb+7D287Xw1DGzqJPb/J2aHHcHxflUo+8tmN/6d4k6I2yFR7BVo5/g7x2Monq4+Yew0EHRIA==
"@esbuild/linux-x64@0.25.9":
version "0.25.9"
resolved "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.9.tgz"
integrity sha512-iSwByxzRe48YVkmpbgoxVzn76BXjlYFXC7NvLYq+b+kDjyyk30J0JY47DIn8z1MO3K0oSl9fZoRmZPQI4Hklzg==
"@esbuild/netbsd-arm64@0.25.9":
version "0.25.9"
resolved "https://registry.yarnpkg.com/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.9.tgz#06f99d7eebe035fbbe43de01c9d7e98d2a0aa548"
integrity sha512-9jNJl6FqaUG+COdQMjSCGW4QiMHH88xWbvZ+kRVblZsWrkXlABuGdFJ1E9L7HK+T0Yqd4akKNa/lO0+jDxQD4Q==
"@esbuild/netbsd-x64@0.25.9":
version "0.25.9"
resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.25.9.tgz#db99858e6bed6e73911f92a88e4edd3a8c429a52"
integrity sha512-RLLdkflmqRG8KanPGOU7Rpg829ZHu8nFy5Pqdi9U01VYtG9Y0zOG6Vr2z4/S+/3zIyOxiK6cCeYNWOFR9QP87g==
"@esbuild/openbsd-arm64@0.25.9":
version "0.25.9"
resolved "https://registry.yarnpkg.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.9.tgz#afb886c867e36f9d86bb21e878e1185f5d5a0935"
integrity sha512-YaFBlPGeDasft5IIM+CQAhJAqS3St3nJzDEgsgFixcfZeyGPCd6eJBWzke5piZuZ7CtL656eOSYKk4Ls2C0FRQ==
"@esbuild/openbsd-x64@0.25.9":
version "0.25.9"
resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.25.9.tgz#30855c9f8381fac6a0ef5b5f31ac6e7108a66ecf"
integrity sha512-1MkgTCuvMGWuqVtAvkpkXFmtL8XhWy+j4jaSO2wxfJtilVCi0ZE37b8uOdMItIHz4I6z1bWWtEX4CJwcKYLcuA==
"@esbuild/openharmony-arm64@0.25.9":
version "0.25.9"
resolved "https://registry.yarnpkg.com/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.9.tgz#2f2144af31e67adc2a8e3705c20c2bd97bd88314"
integrity sha512-4Xd0xNiMVXKh6Fa7HEJQbrpP3m3DDn43jKxMjxLLRjWnRsfxjORYJlXPO4JNcXtOyfajXorRKY9NkOpTHptErg==
"@esbuild/sunos-x64@0.25.9":
version "0.25.9"
resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.25.9.tgz#69b99a9b5bd226c9eb9c6a73f990fddd497d732e"
integrity sha512-WjH4s6hzo00nNezhp3wFIAfmGZ8U7KtrJNlFMRKxiI9mxEK1scOMAaa9i4crUtu+tBr+0IN6JCuAcSBJZfnphw==
"@esbuild/win32-arm64@0.25.9":
version "0.25.9"
resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.25.9.tgz#d789330a712af916c88325f4ffe465f885719c6b"
integrity sha512-mGFrVJHmZiRqmP8xFOc6b84/7xa5y5YvR1x8djzXpJBSv/UsNK6aqec+6JDjConTgvvQefdGhFDAs2DLAds6gQ==
"@esbuild/win32-ia32@0.25.9":
version "0.25.9"
resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.25.9.tgz#52fc735406bd49688253e74e4e837ac2ba0789e3"
integrity sha512-b33gLVU2k11nVx1OhX3C8QQP6UHQK4ZtN56oFWvVXvz2VkDoe6fbG8TOgHFxEvqeqohmRnIHe5A1+HADk4OQww==
"@esbuild/win32-x64@0.25.9":
version "0.25.9"
resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.25.9.tgz#585624dc829cfb6e7c0aa6c3ca7d7e6daa87e34f"
integrity sha512-PPOl1mi6lpLNQxnGoyAfschAodRFYXJ+9fs6WHXz7CSWKbOqiMZsubC+BQsVKuul+3vKLuwTHsS2c2y9EoKwxQ==
"@hotwired/stimulus@^3.2.2":
version "3.2.2"
resolved "https://registry.npmjs.org/@hotwired/stimulus/-/stimulus-3.2.2.tgz"
@@ -228,15 +81,6 @@
"@jridgewell/resolve-uri" "^3.1.0"
"@jridgewell/sourcemap-codec" "^1.4.14"
"@napi-rs/wasm-runtime@^0.2.12":
version "0.2.12"
resolved "https://registry.yarnpkg.com/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.12.tgz#3e78a8b96e6c33a6c517e1894efbd5385a7cb6f2"
integrity sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==
dependencies:
"@emnapi/core" "^1.4.3"
"@emnapi/runtime" "^1.4.3"
"@tybys/wasm-util" "^0.10.0"
"@pm2/agent@~2.1.1":
version "2.1.1"
resolved "https://registry.npmjs.org/@pm2/agent/-/agent-2.1.1.tgz"
@@ -319,37 +163,37 @@
"@tailwindcss/oxide-android-arm64@4.1.12":
version "4.1.12"
resolved "https://registry.yarnpkg.com/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.1.12.tgz#27920fe61fa2743afe8a8ca296fa640b609d17d5"
resolved "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.1.12.tgz"
integrity sha512-oNY5pq+1gc4T6QVTsZKwZaGpBb2N1H1fsc1GD4o7yinFySqIuRZ2E4NvGasWc6PhYJwGK2+5YT1f9Tp80zUQZQ==
"@tailwindcss/oxide-darwin-arm64@4.1.12":
version "4.1.12"
resolved "https://registry.yarnpkg.com/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.1.12.tgz#e8bd4798f26ec1d012bf0683aeb77449f71505cd"
resolved "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.1.12.tgz"
integrity sha512-cq1qmq2HEtDV9HvZlTtrj671mCdGB93bVY6J29mwCyaMYCP/JaUBXxrQQQm7Qn33AXXASPUb2HFZlWiiHWFytw==
"@tailwindcss/oxide-darwin-x64@4.1.12":
version "4.1.12"
resolved "https://registry.yarnpkg.com/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.1.12.tgz#8ddb7e5ddfd9b049ec84a2bda99f2b04a86859f5"
resolved "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.1.12.tgz"
integrity sha512-6UCsIeFUcBfpangqlXay9Ffty9XhFH1QuUFn0WV83W8lGdX8cD5/+2ONLluALJD5+yJ7k8mVtwy3zMZmzEfbLg==
"@tailwindcss/oxide-freebsd-x64@4.1.12":
version "4.1.12"
resolved "https://registry.yarnpkg.com/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.1.12.tgz#da1c0b16b7a5f95a1e400f299a3ec94fb6fd40ac"
resolved "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.1.12.tgz"
integrity sha512-JOH/f7j6+nYXIrHobRYCtoArJdMJh5zy5lr0FV0Qu47MID/vqJAY3r/OElPzx1C/wdT1uS7cPq+xdYYelny1ww==
"@tailwindcss/oxide-linux-arm-gnueabihf@4.1.12":
version "4.1.12"
resolved "https://registry.yarnpkg.com/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.1.12.tgz#34e558aa6e869c6fe9867cb78ed7ba651b9fcaa4"
resolved "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.1.12.tgz"
integrity sha512-v4Ghvi9AU1SYgGr3/j38PD8PEe6bRfTnNSUE3YCMIRrrNigCFtHZ2TCm8142X8fcSqHBZBceDx+JlFJEfNg5zQ==
"@tailwindcss/oxide-linux-arm64-gnu@4.1.12":
version "4.1.12"
resolved "https://registry.yarnpkg.com/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.1.12.tgz#0a00a8146ab6215f81b2d385056c991441bf390e"
resolved "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.1.12.tgz"
integrity sha512-YP5s1LmetL9UsvVAKusHSyPlzSRqYyRB0f+Kl/xcYQSPLEw/BvGfxzbH+ihUciePDjiXwHh+p+qbSP3SlJw+6g==
"@tailwindcss/oxide-linux-arm64-musl@4.1.12":
version "4.1.12"
resolved "https://registry.yarnpkg.com/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.1.12.tgz#b138f494068884ae0d8c343dc1904b22f5e98dc6"
resolved "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.1.12.tgz"
integrity sha512-V8pAM3s8gsrXcCv6kCHSuwyb/gPsd863iT+v1PGXC4fSL/OJqsKhfK//v8P+w9ThKIoqNbEnsZqNy+WDnwQqCA==
"@tailwindcss/oxide-linux-x64-gnu@4.1.12":
@@ -364,7 +208,7 @@
"@tailwindcss/oxide-wasm32-wasi@4.1.12":
version "4.1.12"
resolved "https://registry.yarnpkg.com/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.1.12.tgz#9fd15a1ebde6076c42c445c5e305c31673ead965"
resolved "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.1.12.tgz"
integrity sha512-4tSyu3dW+ktzdEpuk6g49KdEangu3eCYoqPhWNsZgUhyegEda3M9rG0/j1GV/JjVVsj+lG7jWAyrTlLzd/WEBg==
dependencies:
"@emnapi/core" "^1.4.5"
@@ -376,7 +220,7 @@
"@tailwindcss/oxide-win32-arm64-msvc@4.1.12":
version "4.1.12"
resolved "https://registry.yarnpkg.com/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.1.12.tgz#938bcc6a82e1120ea4fe2ce94be0a8cdf3ae92c7"
resolved "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.1.12.tgz"
integrity sha512-iGLyD/cVP724+FGtMWslhcFyg4xyYyM+5F4hGvKA7eifPkXHRAUDFaimu53fpNg9X8dfP75pXx/zFt/jlNF+lg==
"@tailwindcss/oxide-win32-x64-msvc@4.1.12":
@@ -421,13 +265,6 @@
resolved "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz"
integrity sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==
"@tybys/wasm-util@^0.10.0":
version "0.10.0"
resolved "https://registry.yarnpkg.com/@tybys/wasm-util/-/wasm-util-0.10.0.tgz#2fd3cd754b94b378734ce17058d0507c45c88369"
integrity sha512-VyyPYFlOMNylG45GoAe0xDoLwWuowvf92F9kySqzYh8vmYm7D2u4iUJKa1tOUpS70Ku13ASrOkS4ScXFsTaCNQ==
dependencies:
tslib "^2.4.0"
"@types/alpinejs@^3.13.11":
version "3.13.11"
resolved "https://registry.npmjs.org/@types/alpinejs/-/alpinejs-3.13.11.tgz"
@@ -464,7 +301,7 @@ amp-message@~0.1.1:
dependencies:
amp "0.3.1"
amp@0.3.1, amp@~0.3.1:
amp@~0.3.1, amp@0.3.1:
version "0.3.1"
resolved "https://registry.npmjs.org/amp/-/amp-0.3.1.tgz"
integrity sha512-OwIuC4yZaRogHKiuU5WlMR5Xk/jAcpPtawWL05Gj8Lvm2F6mwoJt4O/bHI+DHwG79vWd+8OFYM4/BzYqyRd3qw==
@@ -511,7 +348,7 @@ ast-types@^0.13.4:
dependencies:
tslib "^2.0.1"
async@^2.6.3, async@~2.6.1:
async@^2.6.3:
version "2.6.4"
resolved "https://registry.npmjs.org/async/-/async-2.6.4.tgz"
integrity sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==
@@ -523,6 +360,13 @@ async@^3.2.0, async@~3.2.0, async@~3.2.6:
resolved "https://registry.npmjs.org/async/-/async-3.2.6.tgz"
integrity sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==
async@~2.6.1:
version "2.6.4"
resolved "https://registry.npmjs.org/async/-/async-2.6.4.tgz"
integrity sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==
dependencies:
lodash "^4.17.14"
autoprefixer@^10.4.21:
version "10.4.21"
resolved "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.21.tgz"
@@ -567,7 +411,7 @@ braces@~3.0.2:
dependencies:
fill-range "^7.1.1"
browserslist@^4.0.0, browserslist@^4.24.4, browserslist@^4.25.1:
browserslist@^4.0.0, browserslist@^4.24.4, browserslist@^4.25.1, "browserslist@>= 4.21.0":
version "4.25.2"
resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.25.2.tgz"
integrity sha512-0si2SJK3ooGzIawRu61ZdPCO1IncZwS8IzuX73sPZsXW6EQ/w/DAfPyKI8l1ETTCr2MnvqWitmlCUxgdul45jA==
@@ -597,7 +441,7 @@ caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001702, caniuse-lite@^1.0.30001733:
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001735.tgz"
integrity sha512-EV/laoX7Wq2J9TQlyIXRxTJqIw4sxfXS4OYgudGxBYRuTv0q7AM6yMEpU/Vo1I94thg9U6EZ2NfZx9GJq83u7w==
chalk@3.0.0, chalk@~3.0.0:
chalk@~3.0.0, chalk@3.0.0:
version "3.0.0"
resolved "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz"
integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==
@@ -675,16 +519,16 @@ colord@^2.9.3:
resolved "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz"
integrity sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==
commander@2.15.1:
version "2.15.1"
resolved "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz"
integrity sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==
commander@^11.1.0:
version "11.1.0"
resolved "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz"
integrity sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==
commander@2.15.1:
version "2.15.1"
resolved "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz"
integrity sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==
croner@~4.1.92:
version "4.1.97"
resolved "https://registry.npmjs.org/croner/-/croner-4.1.97.tgz"
@@ -808,13 +652,6 @@ dayjs@~1.8.24:
resolved "https://registry.npmjs.org/dayjs/-/dayjs-1.8.36.tgz"
integrity sha512-3VmRXEtw7RZKAf+4Tv1Ym9AGeo8r8+CjDi26x+7SYQil1UqtqdaokhzoEJohqlzt0m5kacJSDhJQkG/LWhpRBw==
debug@4, debug@^4.1.1, debug@^4.3.1, debug@^4.3.4, debug@^4.3.7:
version "4.4.1"
resolved "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz"
integrity sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==
dependencies:
ms "^2.1.3"
debug@^3.2.6:
version "3.2.7"
resolved "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz"
@@ -822,6 +659,13 @@ debug@^3.2.6:
dependencies:
ms "^2.1.1"
debug@^4.1.1, debug@^4.3.1, debug@^4.3.4, debug@^4.3.7, debug@4:
version "4.4.1"
resolved "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz"
integrity sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==
dependencies:
ms "^2.1.3"
debug@~4.3.1:
version "4.3.7"
resolved "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz"
@@ -976,16 +820,16 @@ esutils@^2.0.2:
resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz"
integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==
eventemitter2@5.0.1, eventemitter2@~5.0.1:
version "5.0.1"
resolved "https://registry.npmjs.org/eventemitter2/-/eventemitter2-5.0.1.tgz"
integrity sha512-5EM1GHXycJBS6mauYAbVKT1cVs7POKWb2NXD4Vyt8dDqeZa7LaDK1/sjtL+Zb0lzTpSNil4596Dyu97hz37QLg==
eventemitter2@^6.3.1:
version "6.4.9"
resolved "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.9.tgz"
integrity sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg==
eventemitter2@~5.0.1, eventemitter2@5.0.1:
version "5.0.1"
resolved "https://registry.npmjs.org/eventemitter2/-/eventemitter2-5.0.1.tgz"
integrity sha512-5EM1GHXycJBS6mauYAbVKT1cVs7POKWb2NXD4Vyt8dDqeZa7LaDK1/sjtL+Zb0lzTpSNil4596Dyu97hz37QLg==
extrareqp2@^1.0.0:
version "1.0.0"
resolved "https://registry.npmjs.org/extrareqp2/-/extrareqp2-1.0.0.tgz"
@@ -998,7 +842,7 @@ fast-json-patch@^3.1.0:
resolved "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-3.1.1.tgz"
integrity sha512-vf6IHUX2SBcA+5/+4883dsIjpBTqmfBjmYiWK1savxQmFk4JfBMLa7ynTYOs1Rolp/T1betJxHiGD3g1Mn8lUQ==
fclone@1.0.11, fclone@~1.0.11:
fclone@~1.0.11, fclone@1.0.11:
version "1.0.11"
resolved "https://registry.npmjs.org/fclone/-/fclone-1.0.11.tgz"
integrity sha512-GDqVQezKzRABdeqflsgMr7ktzgF9CyS+p2oe0jJqUY6izSSbhPIQJDpoU4PtGcD7VPM9xh/dVrTu6z1nwgmEGw==
@@ -1034,11 +878,6 @@ fs-extra@^11.0.0:
jsonfile "^6.0.1"
universalify "^2.0.0"
fsevents@~2.3.2:
version "2.3.3"
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6"
integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==
function-bind@^1.1.2:
version "1.1.2"
resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz"
@@ -1161,7 +1000,7 @@ is-number@^7.0.0:
resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz"
integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
jiti@^2.5.1:
jiti@^2.5.1, jiti@>=1.21.0:
version "2.5.1"
resolved "https://registry.npmjs.org/jiti/-/jiti-2.5.1.tgz"
integrity sha512-twQoecYPiVA5K/h6SxtORw/Bs3ar+mLUtoPSc7iMXzQzK8d7eJ/R09wmTwAjiamETn1cXYPGfNnu7DMoHgu12w==
@@ -1204,32 +1043,32 @@ jsonfile@^6.0.1:
lightningcss-darwin-arm64@1.30.1:
version "1.30.1"
resolved "https://registry.yarnpkg.com/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.30.1.tgz#3d47ce5e221b9567c703950edf2529ca4a3700ae"
resolved "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.30.1.tgz"
integrity sha512-c8JK7hyE65X1MHMN+Viq9n11RRC7hgin3HhYKhrMyaXflk5GVplZ60IxyoVtzILeKr+xAJwg6zK6sjTBJ0FKYQ==
lightningcss-darwin-x64@1.30.1:
version "1.30.1"
resolved "https://registry.yarnpkg.com/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.30.1.tgz#e81105d3fd6330860c15fe860f64d39cff5fbd22"
resolved "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.30.1.tgz"
integrity sha512-k1EvjakfumAQoTfcXUcHQZhSpLlkAuEkdMBsI/ivWw9hL+7FtilQc0Cy3hrx0AAQrVtQAbMI7YjCgYgvn37PzA==
lightningcss-freebsd-x64@1.30.1:
version "1.30.1"
resolved "https://registry.yarnpkg.com/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.30.1.tgz#a0e732031083ff9d625c5db021d09eb085af8be4"
resolved "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.30.1.tgz"
integrity sha512-kmW6UGCGg2PcyUE59K5r0kWfKPAVy4SltVeut+umLCFoJ53RdCUWxcRDzO1eTaxf/7Q2H7LTquFHPL5R+Gjyig==
lightningcss-linux-arm-gnueabihf@1.30.1:
version "1.30.1"
resolved "https://registry.yarnpkg.com/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.30.1.tgz#1f5ecca6095528ddb649f9304ba2560c72474908"
resolved "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.30.1.tgz"
integrity sha512-MjxUShl1v8pit+6D/zSPq9S9dQ2NPFSQwGvxBCYaBYLPlCWuPh9/t1MRS8iUaR8i+a6w7aps+B4N0S1TYP/R+Q==
lightningcss-linux-arm64-gnu@1.30.1:
version "1.30.1"
resolved "https://registry.yarnpkg.com/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.30.1.tgz#eee7799726103bffff1e88993df726f6911ec009"
resolved "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.30.1.tgz"
integrity sha512-gB72maP8rmrKsnKYy8XUuXi/4OctJiuQjcuqWNlJQ6jZiWqtPvqFziskH3hnajfvKB27ynbVCucKSm2rkQp4Bw==
lightningcss-linux-arm64-musl@1.30.1:
version "1.30.1"
resolved "https://registry.yarnpkg.com/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.30.1.tgz#f2e4b53f42892feeef8f620cbb889f7c064a7dfe"
resolved "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.30.1.tgz"
integrity sha512-jmUQVx4331m6LIX+0wUhBbmMX7TCfjF5FoOH6SD1CttzuYlGNVpA7QnrmLxrsub43ClTINfGSYyHe2HWeLl5CQ==
lightningcss-linux-x64-gnu@1.30.1:
@@ -1244,7 +1083,7 @@ lightningcss-linux-x64-musl@1.30.1:
lightningcss-win32-arm64-msvc@1.30.1:
version "1.30.1"
resolved "https://registry.yarnpkg.com/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.30.1.tgz#7d8110a19d7c2d22bfdf2f2bb8be68e7d1b69039"
resolved "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.30.1.tgz"
integrity sha512-mSL4rqPi4iXq5YVqzSsJgMVFENoa4nGTT/GjO2c0Yl9OuQfPsIfncvLrEW6RbbB24WtZ3xP/2CCmI3tNkNV4oA==
lightningcss-win32-x64-msvc@1.30.1:
@@ -1309,6 +1148,11 @@ lru-cache@^7.14.1:
resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz"
integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==
lucide@^0.542.0:
version "0.542.0"
resolved "https://registry.npmjs.org/lucide/-/lucide-0.542.0.tgz"
integrity sha512-+EtDSHjqg/nONgCfnjHCNd84OzbDjxR8ShnOf+oImlU+A8gqlptZ6pGrMCnhEDw8pVNQv3zu/L0eDvMzcc7nWA==
magic-string@^0.30.17:
version "0.30.17"
resolved "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz"
@@ -1338,16 +1182,16 @@ minizlib@^3.0.1:
dependencies:
minipass "^7.1.2"
mkdirp@1.0.4:
version "1.0.4"
resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz"
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
mkdirp@^3.0.1:
version "3.0.1"
resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz"
integrity sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==
mkdirp@1.0.4:
version "1.0.4"
resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz"
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
module-details-from-path@^1.0.3:
version "1.0.4"
resolved "https://registry.npmjs.org/module-details-from-path/-/module-details-from-path-1.0.4.tgz"
@@ -1446,7 +1290,7 @@ picomatch@^2.0.4, picomatch@^2.2.1:
resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz"
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
picomatch@^4.0.2:
"picomatch@^3 || ^4", picomatch@^4.0.2:
version "4.0.3"
resolved "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz"
integrity sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==
@@ -1825,7 +1669,7 @@ postcss-value-parser@^4.0.0, postcss-value-parser@^4.2.0:
resolved "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz"
integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==
postcss@^8.4.41, postcss@^8.5.3:
postcss@^8.0.0, postcss@^8.0.9, postcss@^8.1.0, postcss@^8.1.4, postcss@^8.2.14, postcss@^8.4, postcss@^8.4.32, postcss@^8.4.38, postcss@^8.4.41, postcss@^8.5.3, postcss@>=8.0.9:
version "8.5.6"
resolved "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz"
integrity sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==
@@ -1873,7 +1717,7 @@ react-dom@^18.3.1:
loose-envify "^1.1.0"
scheduler "^0.23.2"
react@^18.3.1:
"react@^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", react@^18.3.1:
version "18.3.1"
resolved "https://registry.npmjs.org/react/-/react-18.3.1.tgz"
integrity sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==
@@ -1956,7 +1800,14 @@ semver@^7.6.2:
resolved "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz"
integrity sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==
semver@~7.5.0, semver@~7.5.4:
semver@~7.5.0:
version "7.5.4"
resolved "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz"
integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==
dependencies:
lru-cache "^6.0.0"
semver@~7.5.4:
version "7.5.4"
resolved "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz"
integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==
@@ -2087,7 +1938,7 @@ tailwindcss-animate@^1.0.7:
resolved "https://registry.npmjs.org/tailwindcss-animate/-/tailwindcss-animate-1.0.7.tgz"
integrity sha512-bl6mpH3T7I3UFxuvDEXLxy/VuFxBk5bbzplh7tXI68mwMokNYd1t9qPBHlnyTwfa4JGC4zP516I1hYYtQ/vspA==
tailwindcss@4.1.12, tailwindcss@^4.1.4:
tailwindcss@^4.1.4, "tailwindcss@>=3.0.0 || insiders", tailwindcss@4.1.12:
version "4.1.12"
resolved "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.12.tgz"
integrity sha512-DzFtxOi+7NsFf7DBtI3BJsynR+0Yp6etH+nRPTbpWnS2pZBaSksv/JGctNwSWzbFjp0vxSqknaUylseZqMDGrA==
@@ -2129,16 +1980,16 @@ to-regex-range@^5.0.1:
dependencies:
is-number "^7.0.0"
tslib@1.9.3:
tslib@^2.0.1:
version "2.8.1"
resolved "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz"
integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==
tslib@^2.8.0, tslib@1.9.3:
version "1.9.3"
resolved "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz"
integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==
tslib@^2.0.1, tslib@^2.4.0, tslib@^2.8.0:
version "2.8.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f"
integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==
tv4@^1.3.0:
version "1.3.0"
resolved "https://registry.npmjs.org/tv4/-/tv4-1.3.0.tgz"