blueballs-svelte Svelte Themes

Blueballs Svelte

Blue Balls - A challenging ball game built with SvelteKit, Supabase, and modern web technologies. Features real-time leaderboards, user authentication, and premium subscriptions.

Blue Balls SvelteKit App

A SvelteKit app based on the original Blue Balls HTML game with user authentication and high scores.

Features

  • šŸŽ® Full game functionality converted from HTML/JS to SvelteKit
  • šŸ” User authentication with Supabase
  • šŸ† Global leaderboard and high score tracking
  • šŸ“± Responsive design for mobile and desktop
  • šŸŽÆ Score saving to database
  • šŸš€ Fast, modern SvelteKit architecture
  • šŸ’³ Stripe integration for premium subscriptions
  • šŸ“Š Advanced analytics and dashboard
  • šŸŽØ Modern dark theme with glassmorphism effects

Setup Instructions

1. Database Setup (Supabase)

Run the provided SQL scripts to set up your database schema:

  • database-setup.sql - Main database schema
  • subscription_schema.sql - Stripe subscription tables
  • migration_progression_system.sql - User progression system

2. Environment Variables

Create a .env file with your credentials:

PUBLIC_SUPABASE_URL=your_supabase_url
PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
VITE_PUBLIC_SUPABASE_URL=your_supabase_url
VITE_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
PUBLIC_STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key
STRIPE_SECRET_KEY=your_stripe_secret_key

3. Installation & Development

# Install dependencies
npm install

# Start development server
npm run dev

# Build for production
npm run build

# Preview production build
npm run preview

Project Structure

src/
ā”œā”€ā”€ lib/
│   ā”œā”€ā”€ components/
│   │   ā”œā”€ā”€ GameCanvas.svelte          # Main game component
│   │   ā”œā”€ā”€ LeaderboardDisplay.svelte  # Leaderboard component
│   │   ā”œā”€ā”€ LivesDisplay.svelte        # Lives system UI
│   │   ā”œā”€ā”€ LoginForm.svelte           # Login form
│   │   ā”œā”€ā”€ ProgressionDisplay.svelte  # User progression UI
│   │   └── RegisterForm.svelte        # Registration form
│   ā”œā”€ā”€ livesSystem.ts                 # Lives management system
│   ā”œā”€ā”€ progressionSystem.ts           # User progression logic
│   ā”œā”€ā”€ stores.ts                      # Svelte stores
│   ā”œā”€ā”€ stripe.ts                      # Stripe client
│   ā”œā”€ā”€ subscriptionStore.ts           # Subscription management
│   └── supabase.ts                    # Supabase client
ā”œā”€ā”€ routes/
│   ā”œā”€ā”€ +layout.svelte                 # Main layout
│   ā”œā”€ā”€ +page.svelte                   # Homepage with game
│   ā”œā”€ā”€ api/                           # API endpoints
│   ā”œā”€ā”€ dashboard/                     # User dashboard
│   ā”œā”€ā”€ leaderboard/                   # Leaderboard page
│   ā”œā”€ā”€ subscription/                  # Premium subscription
│   └── ...
└── app.css                            # Global styles

Game Features

  • Authentication: Complete user registration and login system
  • Game Play: Full Blue Balls game with modern enhancements
  • Lives System: Energy-based gameplay with regeneration
  • Progression: Level and tier-based advancement
  • Leaderboards: Multiple leaderboard types (levels, tiers, scores)
  • Premium Subscriptions: Stripe-powered premium features
  • Dashboard: Comprehensive user analytics and settings
  • Responsive Design: Optimized for all devices
  • Dark Theme: Modern glassmorphism design

Technologies Used

  • SvelteKit - Modern web framework
  • TypeScript - Type safety
  • Supabase - Backend as a service
  • PostgreSQL - Database via Supabase
  • Stripe - Payment processing
  • Canvas API - Game rendering
  • CSS Custom Properties - Dynamic theming

Deployment

The app can be deployed to any platform supporting SvelteKit. Environment variables need to be configured for Supabase and Stripe integration.

Development Notes

This project includes comprehensive database management scripts, advanced user progression systems, and modern web development practices. See the individual documentation files for detailed setup instructions.

Top categories

Loading Svelte Themes