TopZone adalah platform e-commerce gaming bertema Neubrutalism โ top up game dan belanja gaming gear dengan sistem autentikasi lokal + opsi Supabase.
๐ Live demo: topzone.vercel.app
- Fitur
- Tech Stack
- Instalasi
- Konfigurasi
- Struktur Project
- API Endpoints
- Akun Demo
- CI/CD
- Branch Strategy
- Lisensi
| Fitur | Status |
|---|---|
| Katalog Game & Gear (24+ game, 60+ gear) | โ |
| Detail produk dengan paket top-up / spesifikasi | โ |
| Keranjang belanja (nanostores) | โ |
| Checkout & riwayat pesanan per-user | โ |
| Voucher diskon (welcome 10%) | โ |
| Profil: poin, pengaturan, voucher | โ |
| Review & rating produk | โ |
| Pencarian produk real-time | โ |
| Category filter (Mobile / PC / Console) | โ |
- Login/Register dengan Supabase Auth + localStorage fallback
- Session management dengan cookie
- Voucher otomatis saat register baru
| Fitur | Status |
|---|---|
| Dashboard statistik (orders, revenue, pending, selesai) | โ |
| CRUD Games + paket top-up | โ |
| CRUD Gear + spesifikasi | โ |
| Manajemen Orders (status workflow) | โ |
| Manajemen Voucher | โ |
| Manajemen Customers | โ |
| Audit Log | โ |
| Export CSV / JSON laporan | โ |
- Neubrutalism โ border hitam tebal, neon colors, shadow heavy
- Dark/Light mode โ toggle dengan localStorage persistence
- Fully Responsive โ mobile-first dengan hamburger menu
- PWA Ready โ installable ke home screen
- GSAP Scroll Animations โ smooth page entry
- SEO โ JSON-LD schema, Open Graph, Twitter Cards, sitemap
| Teknologi | Kegunaan |
|---|---|
| Astro v6.4.8 | Framework (SSR + Static) |
| Tailwind CSS v4 | Styling neubrutalism |
| Nanostores | State management (cart, auth) |
| Supabase | Backend opsional (auth + PostgreSQL) |
| TypeScript | Type safety |
| Vite | Build tool & dev server |
| Playwright | E2E testing |
| Vitest | Unit testing |
| GSAP | Animations |
| Chart.js | Admin dashboard charts |
# Clone
git clone https://github.com/luminariadev/topzone.git
cd topzone
# Install dependencies
npm install
# Development server (port 4322)
npm run dev
# Build production
npm run build
# Preview production build
npm run serveBuat file .env di root:
PUBLIC_SUPABASE_URL=https://xxxxxx.supabase.co
PUBLIC_SUPABASE_ANON_KEY=eyJhbG...NiIs...Tanpa Supabase, semua data otomatis pakai fallback (localStorage / hardcoded data).
Admin login tetap bisa menggunakan hardcoded token tanpa Supabase.
| Script | Deskripsi |
|---|---|
npm run dev |
Dev server (port 4322) |
npm run build |
Build production |
npm run serve |
Preview build |
npm test |
Unit tests (Vitest) |
npm run e2e |
E2E tests (Playwright) |
npm run lint |
ESLint |
npm run astro |
CLI Astro |
src/
โโโ components/ # Komponen Astro (Navbar, Footer, FAQ, dll)
โ โโโ products/ # ImageGallery
โโโ data/ # Hardcoded data fallback (games, gears)
โโโ layouts/ # Layout.astro (base HTML, SEO, theme)
โโโ lib/ # Utilities (supabase client, admin-auth, cart, cache)
โโโ pages/ # Routes
โ โโโ admin.astro # Admin Panel (SPA-style)
โ โโโ games/ # /games (listing + [slug])
โ โโโ gear/ # /gear (listing + [slug])
โ โโโ api/ # API endpoints (auth, admin, reviews, dll)
โ โโโ cart.astro
โ โโโ checkout.astro
โ โโโ orders.astro
โ โโโ profile.astro
โ โโโ ...
โโโ stores/ # Nanostores (cart, auth, notifications)
โโโ styles/ # Global CSS + Tailwind theme
โโโ types/ # TypeScript types
โโโ utils/ # Helpers (format currency, dll)
| Method | Endpoint | Deskripsi |
|---|---|---|
| POST | /api/auth/register |
Register user baru |
| POST | /api/auth/login |
Login user |
| POST | /api/auth/logout |
Logout |
| POST | /api/auth/admin-login |
Login admin |
| GET | /api/auth/admin-me |
Cek session admin |
| Method | Endpoint | Deskripsi |
|---|---|---|
| GET/POST | /api/admin/games-crud |
CRUD games |
| GET/POST | /api/admin/gears-crud |
CRUD gear |
| GET | /api/admin/orders |
List orders |
| POST | /api/admin/orders/{id}/status |
Update status order |
| GET | /api/admin/vouchers |
List vouchers |
| GET | /api/admin/dashboard-stats |
Statistik dashboard |
| GET | /api/admin/customers |
List customers |
| GET | /api/admin/audit-log |
Log aktivitas admin |
| GET | /api/admin/reviews |
Manajemen reviews |
| Method | Endpoint | Deskripsi |
|---|---|---|
| POST | /api/reviews |
Submit review |
| GET | /api/reviews?product_id=X |
Ambil reviews produk |
| Role | Password | |
|---|---|---|
| Admin | admin@topzone.id |
4189 |
| User | (register baru) | min 6 karakter |
Admin login: buka
/admin, masukkan kredensial di atas.
Saat Supabase offline, admin session otomatis pakai hardcoded fallback.
Proyek ini menggunakan GitHub Actions untuk:
| Job | Deskripsi |
|---|---|
lint-and-typecheck |
ESLint + Astro type check |
unit-tests |
Vitest unit tests |
build |
Build production |
e2e-tests |
Playwright E2E (Chrome + Firefox) |
changelog |
Auto-generate CHANGELOG.md |
version-tag |
Auto-bump versi + git tag |
Lihat .github/workflows/ci.yml untuk detail.
main โ Production-ready code (stable)
v1 โ Archive of v1 release
Setelah rilis v1, branch main menjadi satu-satunya branch aktif.
Semua fitur lama telah di-merge dan branch feature sudah dihapus.
MIT โ bebas digunakan untuk pembelajaran, portfolio, atau development.
Dibuat dengan โค๏ธ oleh LuminariaDev.
TopZone โ Your ultimate destination for game top-ups and premium gaming gear in Indonesia.