Browsing Available Cases
The Cajas platform offers a variety of cases at different price points. All cases are displayed on the home page with powerful filtering options.Case Browser Interface
The Case Browser component (/components/case-browser.tsx) provides:
Search Bar
Search cases by name using the input field on the left side of the filter bar.Placeholder: “Buscar caja…”
Price Filter
Filter cases by price ranges:
- Cualquier precio (Any price)
- 10,000
- 25,000
- 50,000
- 75,000
- 100,000
Sort Options
Order cases by:
- Más Nuevos - Newest first (default)
- Menor Precio - Lowest price first
- Mayor Precio - Highest price first
Grid Display
Cases display in a responsive grid:
- 2 columns on mobile
- 3 columns on tablet
- 4 columns on desktop
- 5 columns on 2XL screens
Using Filters
Search by Name
Type in the search bar to filter cases by name. The search is case-insensitive and updates in real-time.
Set Price Range
Click the Precio dropdown and select your desired price range. The grid updates immediately to show only matching cases.
Sort Results
Click the Ordenar dropdown to change the sorting order. Cases rearrange based on your selection.
All filters work together. For example, you can search “iPhone” + price range “25,000” + sort by “Lowest price” to find the cheapest iPhone cases in that range.
Understanding Case Cards
Each case is displayed as a card with key information:- Visual Elements
- Case Information
- Actions
- Case Image - High-quality product image at the top
- Hover Effect - Card lifts slightly on hover with a glow effect
- Responsive Design - Scales beautifully on all screen sizes
Case Detail Page
When you click a case card, you’re taken to the dedicated case opener page.Page Layout
The case detail page (/app/cases/[slug]/page.tsx) includes:
Header Section
- Back Button - Returns to home page (“Atrás”)
- Case Name - Large, bold display at center
- Price - With ARS flag icon
- Mute Button - Toggle sound effects on/off
Case Contents
Below the spinner, you’ll see all possible items you can win:
- Sorted by value (highest first)
- Rarity indicators (color-coded borders)
- Item images and names
- Exact prices in ARS
- Probability percentages
Case Spinner Interface
The spinner window features:- Neon Frame - Dark background with border glow
- Center Line - Vertical line showing where the item lands
- Top/Bottom Markers - Yellow arrows indicating the selection point
- Side Fade Effects - Gradient edges for visual depth
- Item Cards - Scrolling horizontally with rarity-based bottom borders:
- Yellow = Legendary
- Purple = Epic
- Blue = Rare
- Gray = Common
Opening a Case
Follow these steps to open your case and win an item.Ensure You're Logged In
The “Abrir Caja” button requires authentication.If you’re not logged in:
- Clicking the button triggers the auth modal
- You’ll see the login/signup form
- Complete authentication to continue
Check Your Balance
Make sure you have sufficient balance to open the case.Your balance is visible in the navbar. If insufficient:
- Navigate to
/wallet - Deposit funds (see Wallet Management)
- Return to the case page
Click 'Abrir Caja'
Click the golden “Abrir Caja” (Open Case) button below the spinner.The button features:
- Gradient background (yellow to orange)
- Hover effects
- Active press animation (scales down slightly)
- Disabled state while spinning
Server Processing
The system makes a POST request to
/api/cases/open with:- Your user ID (from session)
- The case ID
- Optional client seed (for provably fair)
- Verifies your balance
- Deducts the case price
- Uses provably fair algorithm to select winner
- Creates transaction record
- Adds item to your inventory
- Returns the winning item data
Spinner Animation
Once the server responds:Duration: 8 seconds (8000ms)Visual Effects:
- Items scroll rapidly at first
- Gradually slows down (cubic-bezier easing)
- Sound effects play as items pass the center line
- Comes to a smooth stop on the winning item
- Winner is placed at index 75 in the reel
- Reel contains 110 total items
- Animation uses CSS transforms for smooth performance
Winner Reveal
When the spinner stops, a modal appears showing:Modal Contents:
- “¡FELICIDADES!” headline
- Large item image with rarity glow
- Rarity badge (color-coded)
- Item name
- Item value in ARS
- Completion sound effect plays (fin.mp3)
Provably Fair System
Every case opening uses a cryptographically secure provably fair algorithm.How It Works
Seeds Generation
Three components determine your outcome:
- Server Seed - Random string generated by the server (hashed)
- Client Seed - Your personal seed (customizable)
- Nonce - Increments with each game (prevents reuse)
Roll Calculation
The server combines these values using HMAC-SHA256:The first 8 characters are converted to a number between 0-100.
Item Selection
The roll number determines which item you win based on cumulative probabilities:
- Item 1: 0-5 (5% chance)
- Item 2: 5-15 (10% chance)
- Item 3: 15-40 (25% chance)
- Item 4: 40-100 (60% chance)
Troubleshooting
Button says 'Abriendo...' and won't respond
Button says 'Abriendo...' and won't respond
Auth modal opens instead of case opening
Auth modal opens instead of case opening
You’re not logged in. Complete authentication and try again.
Error: 'Failed to open case'
Error: 'Failed to open case'
Common causes:
- Insufficient balance
- Network connectivity issue
- Server error
No sound effects during spin
No sound effects during spin
Check the mute button in the top-right. The speaker icon should not have a red tint. Click to unmute.
Winner modal won't close
Winner modal won't close
Click the X button in the top-right corner, or click outside the modal (on the dark backdrop).
Best Practices
Budget Management
Set a budget before opening cases. The platform is for entertainment - never spend more than you can afford to lose.
Understand Odds
Review the case contents and probabilities before opening. Higher-value items typically have lower drop rates.
Sound Settings
Use the mute button if you’re in a public space or prefer to play without sound.
Verify Results
Check the provably fair page to verify your wins are legitimate and random.
