A SvelteKit app based on the original Blue Balls HTML game with user authentication and high scores.
Run the provided SQL scripts to set up your database schema:
database-setup.sql
- Main database schemasubscription_schema.sql
- Stripe subscription tablesmigration_progression_system.sql
- User progression systemCreate 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
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
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
The app can be deployed to any platform supporting SvelteKit. Environment variables need to be configured for Supabase and Stripe integration.
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.