🎪 Kidzia Kiddie Playground
Complete management system for children's indoor play facilities — check-ins, POS, inventory, analytics, and reporting in one platform.
Overview
What Kidzia is, who it's for, and what it solves.
Kidzia Kiddie Playground is a full-stack management platform built for children's indoor play facilities (trampoline parks, play zones). It replaces pen-and-paper operations with a real-time digital system covering check-ins, POS sales, inventory, multi-branch analytics, and PDF reporting.
Key Capabilities
Architecture
Monorepo structure and system design.
kidzia-kiddie-playground/ ← pnpm monorepo (Turbo)
├── apps/
│ ├── admin/ ← Super admin app (Expo, purple theme)
│ │ ├── app/(auth)/ ← login, accept-invite, unauthorized
│ │ ├── app/(tabs)/ ← dashboard, branches, employees, pricing, reports, profile
│ │ ├── components/ ← RevenueChart, MonthlyRevenueChart, VisitsChart, SecurityGate
│ │ └── stores/ ← authStore, dashboardStore, sessionsStore, ...
│ │
│ └── branch/ ← Branch staff app (Expo, cyan theme)
│ ├── app/(auth)/ ← login, accept-invite, unauthorized
│ ├── app/(tabs)/ ← active, checkin, history, socks, stocks, reports, profile
│ ├── components/ ← SessionTimer, NotificationBanner
│ └── stores/ ← authStore, sessionsStore, socksStore, promoStore
│
├── packages/
│ └── supabase/src/ ← Shared backend client & types
│ ├── client.ts ← Supabase client (chunked secure token storage)
│ ├── types.ts ← TypeScript DB types for all tables
│ └── schemas.ts ← Zod validation schemas
│
└── supabase/migrations/ ← SQL schema migrations (0001–0010)
Data Flow
@kidzia/supabase package for all database
operations, ensuring consistent types and validation across the codebase.
| Layer | Technology | Purpose |
|---|---|---|
| Mobile / Web UI | React Native + Expo | Cross-platform apps (iOS, Android, Web) |
| Routing | Expo Router v6 | File-based navigation with auth guards |
| State | Zustand | Local app state management |
| Backend | Supabase (PostgreSQL) | Auth, database, row-level security, realtime |
| Push Notifications | Firebase + Expo Notifications | Session timeout alerts to staff |
| Secure Storage | Expo Secure Store | JWT session persistence on device |
| Build | Turbo + pnpm | Monorepo task orchestration |
Tech Stack
Every library and tool used across the monorepo.
🟣 Admin App
Super admin dashboard for system-wide management.
com.kidzia.admin · Theme: Purple (#7c3aed)super_admin role.Admin Features
- Multi-branch management (create, edit, deactivate)
- Staff employee accounts with role assignment and branch assignment
- Per-branch pricing tiers with versioned effective dates
- Real-time dashboard KPIs and revenue charts
- PDF report generation with custom date ranges
- Loyalty card management (create, assign discount percentages)
- Security mode to hide sensitive financial data on screen
- Accept staff invite links for onboarding
Admin
Admin — Login
Authentication screen for super admins.
- Email + password login via Supabase Auth
- Accept invite link for new admin onboarding
- Redirect to dashboard on successful login
- Role check — non-admins are redirected to Unauthorized screen
Admin
Admin
Admin — Dashboard
Real-time KPIs, revenue charts, and session overview.
KPI Cards
Charts
Admin
Admin
Admin
Admin
Admin — Branches
Create and manage all playground branch locations.
- List all branch locations with active/inactive status
- Create new branch (name, address)
- Edit branch details
- Soft-delete / deactivate a branch
Admin
Admin
Admin — Employees
Staff account management and role assignment.
- Create staff accounts with email, full name, role, and branch
- Roles:
super_adminorbranch_staff - Assign staff to specific branches
- Activate or deactivate staff accounts
- Set / reset staff passwords
signUpStaff()) to avoid ending the admin's current session.
Admin
Admin
Admin — Pricing
Configure play session pricing tiers per branch.
Each branch has independent pricing. Pricing is versioned with effective_from
dates so historical rates are preserved for reporting accuracy.
| Tier | duration_minutes | Notes |
|---|---|---|
| 30 minutes | 30 | Short play tier |
| 1 hour | 60 | Standard tier |
| 2 hours | 120 | Extended play |
| Unlimited | NULL | Full day / open-ended pass |
Admin
Admin
Admin — Reports
Generate and export PDF reports for any custom date range.
- Custom date range selection via calendar picker
- Session breakdown: check-in/out times, duration, revenue, discounts
- Sock sales summary per variant
- Staff on duty listing
- Payment method breakdown
- PDF export via Expo Print API and system share sheet
Admin
Admin
🔵 Branch App
Frontline operations app for branch staff.
com.kidzia.branch · Theme: Cyan (#0ea5e9)branch_staff role. Includes Firebase push notification support.Branch Staff Features
- Check kids in with full info (name, age, parent, emergency contact)
- Real-time session timer with visual countdown per kid
- Multiple pricing tiers + promo pricing (50% off, PWD discounts)
- Loyalty card scanning with automatic discount calculation
- Extend session duration mid-play
- Revert checkout — undo accidental checkouts with full audit log
- Socks point-of-sale with shopping cart and payment selection
- Inventory tracking with receive / manual set / correction adjustments
- Daily report generation and PDF sharing
- Push notifications for session timeouts
Branch — Login
Authentication screen for branch staff.
- Email + password login via Supabase Auth
- Accept invite link for new staff onboarding
- Redirects to active sessions on successful login
- Non-staff roles redirected to unauthorized page
Branch
Branch — Active Sessions
Live view of all currently checked-in kids with timers and quick actions.
| Action | Description |
|---|---|
| ⏱️ Live Timer | Real-time countdown per session based on the purchased tier duration |
| ➕ Extend | Add more time by selecting a new duration tier mid-session |
| ✅ Check Out | Opens checkout form — scan loyalty card, pick payment method, confirm total |
| ↩️ Revert | Undo a completed checkout — restores session to active with full audit log |
Branch
Branch
Branch
Branch
Branch — Check-in
Register a new kid and start their play session.
| Field | Required | Notes |
|---|---|---|
| Kid Name | ✅ Yes | Auto-fills from previous sessions |
| Kid Age | ✅ Yes | Numeric input |
| Parent Name | ✅ Yes | |
| Parent Contact | ✅ Yes | Phone number |
| Emergency Contact | Optional | Alternative contact person |
| Notes | Optional | Special requests or conditions |
| Pricing Tier | ✅ Yes | 30 min / 1 hr / 2 hrs / Unlimited |
| Promo Type | Optional | Regular / 50% Off / PWD / 50%+PWD |
Branch
Branch
Branch — History
Today's completed sessions log.
- All checked-out sessions for the current day
- Session details: kid name, check-in/out times, duration, total revenue
- Payment method and discounts visible per entry
Branch
Branch — Socks POS
Point-of-sale for sock merchandise with shopping cart.
Sock Variants (₱20 each)
- Add variants to shopping cart with quantity adjustment
- Remove items from cart
- Select payment method (Cash, GCash, Card, Maya, etc.)
- Submit sale — deducts from stock automatically
- Daily sales summary with per-variant breakdown
- Revenue tracked per payment method
Branch
Branch
Branch — Stocks
Real-time sock inventory management and adjustment tracking.
| Adjustment Type | Description |
|---|---|
receive | New stock received from supplier |
manual_set | Manual count override (physical stock count) |
sale | Auto-deducted when a POS transaction is completed |
correction | Error correction adjustments |
- Real-time stock levels per variant
- Low stock alert visual indicator (threshold: <10 units)
- Stock adjustment form with type and optional notes
- Full adjustment history log with timestamps and staff attribution
Branch
Branch
Branch
Branch
Branch — Reports
Comprehensive daily report with PDF export and sharing.
- Full daily session list with check-in/out times and duration
- Sock sales transactions breakdown per variant
- Staff on duty for the day
- Payment method totals (Cash, GCash, Card, Maya, etc.)
- Total revenue and total discounts applied
- Export via system share sheet using Expo Print + Share APIs
Branch
Branch
Database Schema
All PostgreSQL tables managed via Supabase.
Database Migrations
Incremental SQL migrations in supabase/migrations/.
duration_minutes to pricing_configs for tiered pricingexpo_push_token and end_time fields to sessionspayment_method enum, refactors pricing modelcheckout_session function overloadsock_stock_adjustments table for full inventory audit trailbranch_daily_reports table for consolidated end-of-day reportingcheckout_revert_log and revert_checkout() PostgreSQL functionrevert_checkout() — removes time-window restrictions on revertsDatabase Functions
PostgreSQL stored functions for complex atomic operations.
checkout_session(
p_session_id uuid,
p_loyalty_card_num text?,
p_checked_out_by uuid?
)
→ { success: bool, message: text, total_amount: numeric }
get_current_rate(p_branch_id uuid)
→ numeric -- current rate_per_hour for the branch
effective_from date.
revert_checkout(
p_session_id uuid,
p_reverted_by uuid
)
→ { success: bool, message: text }
check_out_at, resets all payment fields back
to pending, and writes a full audit entry to checkout_revert_log. No time-window restriction.
Auth & Security
Role-based access control, RLS policies, and session persistence.
expo-secure-store using a chunked adapter to work around the 2KB per-key limit.role from the profiles table after login and redirect unauthorized roles to a dedicated Unauthorized screen.signUpStaff()) to create staff accounts without ending the current admin session.User Roles
| Role | App Access | Capabilities |
|---|---|---|
super_admin |
Admin App only | All branches, employees, pricing, cross-branch analytics, custom date range reports |
branch_staff |
Branch App only | Check in/out kids, sell socks, manage stock, generate daily branch report for their branch |
Push Notifications
Firebase-powered push alerts for session timeouts.
- Expo push token captured at check-in and stored in the session row
- Notifications triggered when a session timer is about to expire
- Foreground notification handler always shows alert banners in-app
- Tapping a notification navigates directly to the Active Sessions tab
- Firebase Cloud Messaging (FCM) delivery via
google-services.json - Expo Notifications API for cross-platform (iOS + Android) delivery