Welcome to Cajas
Cajas is a modern, provably fair case opening platform that lets users open virtual cases to win items. Built with Next.js 16 and powered by Supabase, it provides a complete gaming experience with user authentication, wallet management, and transparent fairness verification.What is Cajas?
Cajas is a web-based platform where users can:- Browse and open virtual cases containing items
- Experience smooth animations and real-time case opening mechanics
- Verify the fairness of every roll using provably fair technology
- Manage their balance through an integrated wallet system
- Track their inventory and transaction history
- View and manage their profile settings
Cajas implements provably fair gaming algorithms to ensure complete transparency and fairness in all case openings.
Key Features
Provably Fair System
Cryptographic verification ensures every case opening is transparent and fair using HMAC-SHA256 algorithms.
Real-time Case Opening
Smooth animations and dynamic reel mechanics provide an engaging user experience.
Wallet Management
Integrated balance system with deposit and withdrawal support for multiple payment methods.
User Profiles
Complete profile management with avatar uploads and personal information.
Technology Stack
Cajas is built with modern web technologies:- Frontend: Next.js 16 with React 19, TypeScript, and Tailwind CSS 4
- Backend: Supabase for authentication, database, and storage
- UI Components: Framer Motion for animations, Lucide React for icons
- Forms: React Hook Form with Zod validation
- Styling: Tailwind CSS with custom design system
Architecture Overview
The platform follows a modern full-stack architecture:Core Components
Database Schema
Database Schema
The database uses PostgreSQL via Supabase with tables for:
- users: User profiles and balances
- cases: Case definitions with prices and metadata
- case_items: Items within cases with probabilities
- user_seeds: Provably fair seed management
- game_rolls: Audit log of all case openings
- transactions: Balance changes and payments
Authentication
Authentication
User authentication is handled entirely by Supabase Auth with:
- Email/password authentication
- OAuth providers support
- Row Level Security (RLS) policies
- Automatic profile creation on signup
API Routes
API Routes
Server-side API routes handle sensitive operations:
POST /api/cases/open- Opens a case using provably fair logicPOST /api/provably-fair/seed- Manages user seeds for fairness
Project Structure
The codebase follows Next.js App Router conventions:Getting Started
Ready to set up Cajas locally? Head over to the Quickstart Guide to get your development environment running in minutes.Quickstart
Clone the repository, set up Supabase, and run your first case opening in under 10 minutes.
Use Cases
Cajas is perfect for:- Gaming Platforms: Add case opening mechanics to your game
- E-commerce: Create mystery box experiences for products
- Marketing: Engage users with gamified rewards
- Learning: Study provably fair algorithms and modern web architecture
Community & Support
Need help or want to contribute?- GitHub: View the source code
- Issues: Report bugs or request features
- Discussions: Share ideas and ask questions
Next Steps
Set up your environment
Follow the Quickstart Guide to install dependencies and configure Supabase.
Explore features
Read the Features Documentation to understand all platform capabilities.
