A comprehensive full-stack web application for event management for artists to showcase their work, manage events, and handle ticket sales with advanced QR code verification system.
This platform serves as both an artist portfolio website and a comprehensive event management system. Built for musicians, performers, and event organizers, it provides everything needed to showcase artistic work and manage live performances from booking to verification. Specially designed for Aliva Maharana.
src/
โโโ components/
โ โโโ ui/ # Reusable UI components (shadcn/ui)
โ โโโ admin/ # Admin-specific components
โ โโโ Header.tsx # Navigation header
โ โโโ Hero.tsx # Landing page hero section
โ โโโ Shows.tsx # Show display component
โ โโโ Contact.tsx # Contact form
โ โโโ ... # Other feature components
โโโ pages/ # Route-level page components
โโโ hooks/ # Custom React hooks
โโโ lib/ # Utility functions and services
โโโ integrations/ # External service integrations
โโโ types/ # TypeScript type definitions
The application follows a unidirectional data flow pattern:
User Ticket Booking Flow:
1. User visits website
2. Browse Shows
3. Is Show Available?
โโ Yes โ Select Show
โ โโ Fill Booking Form
โ โโ Calculate Total Price
โ โโ Submit Booking
โ โโ Generate Booking ID
โ โโ Create QR Code
โ โโ Generate PDF Ticket
โ โโ Update Available Tickets
โ โโ Send Confirmation
โ โโ Auto-download PDF
โโ No โ Show 'Sold Out'
Ticket Verification Flow:
1. Staff opens verification page
2. Choose verification method:
โโ QR Scanner โ Scan QR Code
โ โโ Parse QR Data
โโ Manual Entry โ Enter Code Manually
โโ Parse QR Data
3. Query Database
4. Is Ticket Found?
โโ No โ Display 'Invalid Ticket'
โโ Yes โ Is Already Verified?
โโ Yes โ Display 'Already Scanned'
โโ No โ Mark as Verified
โโ Update Database
โโ Display 'Entry Granted'
โโ Show Ticket Details
Admin Management Flow:
1. Admin Login
2. Verify Admin Role
3. Is Admin?
โโ No โ Redirect to Home
โโ Yes โ Access Admin Dashboard
โโ Select Management Tab
โโ Which Tab?
โ โโ Shows โ Manage Shows โ CRUD Operations on Shows
โ โโ Bookings โ View/Manage Bookings โ View Booking Statistics
โ โโ Announcements โ Create/Edit Announcements โ Publish/Update Announcements
โ โโ YouTube โ Manage Social Feed โ Update YouTube Content
Authentication & Authorization Flow:
1. User โ Frontend: Login Request
2. Frontend โ Supabase: Auth Request
3. Supabase โ Database: Validate Credentials
4. Database โ Supabase: User Data + Role
5. Supabase โ Frontend: JWT Token + Session
6. Frontend: Store Auth State
7. Frontend: Route Protection Check
8. Is Admin Route?
โโ Yes โ Frontend โ Database: Check Admin Role
โ Database โ Frontend: Role Verification
โ Frontend โ User: Grant/Deny Access
โโ No โ Frontend โ User: Grant Access
shows TableCREATE TABLE shows (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
title VARCHAR NOT NULL,
venue VARCHAR NOT NULL,
location VARCHAR NOT NULL,
show_date DATE NOT NULL,
show_time TIME NOT NULL,
ticket_price DECIMAL(10,2) NOT NULL,
available_tickets INTEGER NOT NULL,
max_capacity INTEGER NOT NULL,
status VARCHAR DEFAULT 'upcoming',
image_url TEXT,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
bookings TableCREATE TABLE bookings (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
show_id UUID REFERENCES shows(id),
customer_name VARCHAR NOT NULL,
customer_email VARCHAR NOT NULL,
customer_phone VARCHAR,
tickets_count INTEGER NOT NULL,
total_amount DECIMAL(10,2) NOT NULL,
verification_code VARCHAR(6) NOT NULL,
booking_status VARCHAR DEFAULT 'confirmed',
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
profiles TableCREATE TABLE profiles (
id UUID PRIMARY KEY REFERENCES auth.users(id),
user_id UUID REFERENCES auth.users(id),
full_name VARCHAR,
role VARCHAR DEFAULT 'user',
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
announcements TableCREATE TABLE announcements (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
title VARCHAR NOT NULL,
content TEXT NOT NULL,
priority VARCHAR DEFAULT 'medium',
is_active BOOLEAN DEFAULT TRUE,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
youtube_videos TableCREATE TABLE youtube_videos (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
video_id VARCHAR NOT NULL,
title VARCHAR NOT NULL,
description TEXT,
is_active BOOLEAN DEFAULT TRUE,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
Database Relationships:
USERS 1--* PROFILES : has
SHOWS 1--* BOOKINGS : books for
PROFILES:
- uuid id PK
- uuid user_id FK
- varchar full_name
- varchar role
- timestamp created_at
- timestamp updated_at
SHOWS:
- uuid id PK
- varchar title
- varchar venue
- varchar location
- date show_date
- time show_time
- decimal ticket_price
- integer available_tickets
- integer max_capacity
- varchar status
- text image_url
- timestamp created_at
- timestamp updated_at
BOOKINGS:
- uuid id PK
- uuid show_id FK
- varchar customer_name
- varchar customer_email
- varchar customer_phone
- integer tickets_count
- decimal total_amount
- varchar verification_code
- varchar booking_status
- timestamp created_at
- timestamp updated_at
ANNOUNCEMENTS:
- uuid id PK
- varchar title
- text content
- varchar priority
- boolean is_active
- timestamp created_at
- timestamp updated_at
YOUTUBE_VIDEOS:
- uuid id PK
- varchar video_id
- varchar title
- text description
- boolean is_active
- timestamp created_at
- timestamp updated_at
git clone <repository-url>
cd aliva-artist-platform
npm install
.env.local file:
VITE_SUPABASE_URL=your_supabase_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
npm run dev
npm run build
-- Enable necessary extensions
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
-- Run table creation scripts
-- (See Database Schema section for complete SQL)
-- Enable RLS on all tables
ALTER TABLE shows ENABLE ROW LEVEL SECURITY;
ALTER TABLE bookings ENABLE ROW LEVEL SECURITY;
ALTER TABLE profiles ENABLE ROW LEVEL SECURITY;
-- Create policies for appropriate access control
# Supabase Configuration
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your-anon-key
# Optional: Custom Configuration
VITE_APP_TITLE=Aliva Artist Platform
VITE_CONTACT_EMAIL=sanidhyadash32@gmail.com
src/index.css for custom CSS variablestailwind.config.ts for theme customizationpublic/ directory/admin route/verify-ticket pageThe application uses Supabase client-side SDK for all data operations:
// Example: Fetching shows
const { data: shows, error } = await supabase
.from('shows')
.select('*')
.eq('status', 'upcoming')
.order('show_date', { ascending: true });
// Example: Creating booking
const { data: booking, error } = await supabase
.from('bookings')
.insert({
show_id: showId,
customer_name: formData.customer_name,
// ... other fields
})
.select()
.single();
src/lib/verificationService.ts)findBookingByVerificationCode(code: string)findBookingByLast6(code: string)markBookingVerified(id: string)getShowById(showId: string)src/lib/pdfTicketGenerator.ts)generateTicketPDF(ticketData: TicketData)downloadTicketPDF(ticketData: TicketData)generateVerificationCode()# Install Vercel CLI
npm i -g vercel
# Deploy
vercel --prod
{
"buildCommand": "npm run build",
"outputDirectory": "dist",
"framework": "vite"
}
npm run builddistnpm run build
# Using serve
npx serve -s dist
# Using nginx
# Configure nginx to serve from dist/ directory
git checkout -b feature/amazing-feature
git commit -m 'Add amazing feature'
git push origin feature/amazing-feature
This project is licensed under the MIT License - see the LICENSE file for details.
For support, email [sanidhyadash32@gmail.com] or create an issue in the GitHub repository.
Built with โค๏ธ By Sanidhya Dash
This platform empowers artists to connect with their audience and manage live performances efficiently while providing fans with a seamless ticket booking and verification experience.