A premium, client-side collectible e-commerce frontend built using Vite, vanilla Javascript, and Vanilla CSS. The application connects to Supabase for dynamic products data, falling back to static lists when offline.
- Bundler: Vite
- Logic: Vanilla ES Modules (Javascript)
- Styling: Vanilla CSS
- Database: Supabase Client (
@supabase/supabase-js)
-
Create a Supabase Project: Head to Supabase and spin up a new database project.
-
Initialize Database Tables: Open the SQL Editor tab in your Supabase dashboard, click "New Query", paste the entire contents of supabase/schema.sql, and run it. This will:
- Create the
categoriesandproductstables. - Configure Row-Level Security (RLS) policies allowing public read select access.
- Insert seed data for the 6 collectible categories and 12 baseline items.
- Create the
-
Configure Environment Variables:
- In your local workspace root, copy
.env.exampleto.env.local. - Retrieve your API keys from Project Settings > API in the Supabase Dashboard.
- Populate the variables:
VITE_SUPABASE_URL=your-project-url.supabase.co VITE_SUPABASE_ANON_KEY=your-anon-public-key
(Note:
.env.localis listed in.gitignoreand will never be committed to Git). - In your local workspace root, copy
This static multi-page site is configured to build and deploy automatically to GitHub Pages via GitHub Actions:
-
Select Actions Deployment Source:
- Go to your repository settings on GitHub: Settings → Pages.
- Under Build and deployment → Source, change the selection from Deploy from a branch to GitHub Actions.
-
Deploy by Pushing to Main:
- Any push to the
mainbranch triggers the build workflow defined in.github/workflows/deploy.yml. - Track build progress under the Actions tab in GitHub.
- Any push to the
-
Access Live Preview URL:
- Once completed, the live site is viewable at:
https://J0BL1N.github.io/Shopaholic/
- Once completed, the live site is viewable at:
To run and build the project locally:
# Install dependencies
npm install
# Run Vite local development server
npm run dev
# Compile the production bundle (build output served under /dist)
npm run build
# Preview the compiled production build locally
npm run preview