โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ _____ ______ _______ _____ ______ _______ _ _ โ
โ |_____] |______ | | | | | | | |______ |____/ โ
โ | |______ | |__|__| |__|__| |______ | \_ โ
โ โ
โ ULTRA-MODERN VIRTUAL DESKTOP PET ECOSYSTEM โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Explore Live Repo โข Browse Approved Packs โข System Architecture
PetDex is a state-of-the-art public gallery, interactive Tamagotchi-style desktop simulator, and custom creation studio for Codex-compatible animated digital companion pets.
Engineered with Next.js 16 (Turbopack), React 19, Tailwind CSS v4, and Web Audio API sound synthesis, PetDex provides developers, pixel artists, and AI enthusiasts with an immersive glassmorphic experience to preview, play with, build, and deploy desktop pets directly into the Codex CLI ecosystem (~/.codex/pets/).
- Live Vitality Statistics: Real-time progress meters for Happiness, Fullness, and Energy.
- Interactive Actions:
- Pet โค๏ธ: Synthesizes a warm purr sound, triggers celebration animations, and bursts heart particles.
- Feed Treat ๐: Synthesizes crunch sound effects, triggers eating state, and restores hunger.
- Play Ball โฝ: Synthesizes a bounce sweep sound, triggers play state, and exercises the pet.
- 5 Dynamic Environments: Switch between Cyberpunk Grid, Cozy Desk, Mystic Forest, Synthwave Neon, and Dark Void.
- Web Audio API Sound Engine: Zero external audio asset dependencies โ pure synthesized browser chiptune audio.
- Drag-and-Drop Spritesheet Inspector: Upload custom PNG/WEBP spritesheet images.
- Frame Grid Mapper: Interactively map frame width, height, start frames, and frame sequences across 10+ animation states (
idle,walk,run,sleep,play,eat,celebrate,drag). - One-Click Package Exporter: Generates
pet.json,metadata.json, and client-side.ziparchives ready for Codex CLI deployment.
- Multi-Tag Real-Time Search: Instant filtering by pet name, vibe, or tag.
- Vibe Filter Tabs:
cozy,cyberpunk,playful,magical,chill. - Favorites & Bookmarks: Custom local storage hook (
useFavoritePets) with reactive state sync.
- Theme Accents: Soft glowing mesh radial gradients and glassmorphism panels.
- Custom Brand Selection Highlight: Custom CSS
::selectionstyling matching PetDex Indigo (#5266ea). - Hygiene & Reliability: Built-in Service Worker (
public/sw.js) and database fallbacks for zero console warnings and 100% build stability.
flowchart TD
subgraph Client ["Client UI Layer (React 19 & Next.js 16)"]
UI["PetDex Dashboard & Hero Parade"]
PG["Interactive Playground (Tamagotchi Engine)"]
ST["Pet Creation Studio & Spritesheet Inspector"]
AUDIO["Web Audio API Sound Synthesizer"]
FAV["Local Storage Favorites Manager"]
end
subgraph Server ["Next.js 16 App Router & Server Runtime"]
API_SUBMIT["/api/submit (Community Submissions)"]
API_ADMIN["/api/admin/[id] (Review Dashboard)"]
API_UPLOAD["/api/uploadthing (Media Storage)"]
MAN["/packs/manifest.json (Pet Gallery Manifest)"]
MW["Proxy Middleware (Route Protection)"]
end
subgraph Data ["Data & Services Layer"]
DB[(Neon PostgreSQL Database)]
ORM["Drizzle ORM Engine"]
REDIS[(Upstash Redis Rate Limiter)]
CLERK[Clerk Authentication Provider]
end
subgraph Output ["Codex CLI Distribution"]
PACKS["public/packs/*.zip Archives"]
CODEX["~/.codex/pets/<slug>/ Target Directory"]
end
UI --> PG & ST & FAV
PG --> AUDIO
ST --> PACKS
API_SUBMIT & API_ADMIN --> ORM --> DB
API_SUBMIT --> REDIS
MW --> CLERK
PACKS --> CODEX
PetDex comes pre-loaded with 12 approved animated digital companions:
| Pet Icon | Name | Category | Vibe | States Count | Description |
|---|---|---|---|---|---|
| ๐ง | Boba | Creature | Cozy | 10 States | A cute otter enjoying boba tea during coding sessions. |
| ๐ฆ | Boxcat | Creature | Cozy | 10 States | A cozy kitten tucked inside a cardboard box. |
| ๐ฐ | Byte Bunny | Creature | Playful | 10 States | An energetic cyber bunny that loves jumping over logic bugs. |
| ๐ฆซ | Cache Capy | Creature | Chill | 10 States | The ultimate relaxed capybara for stress-free debugging. |
| ๐น | Cash Cuy | Creature | Playful | 10 States | A wealthy guinea pig keeping track of your cloud compute credits. |
| ๐ | Cosmo | Creature | Magical | 10 States | An astronaut pet floating through space synthwave grids. |
| ๐ค | Kebo | Robot | Cyberpunk | 10 States | An AI robot companion monitoring background build tasks. |
| ๐ต๏ธ | Noir Webling | Character | Mysterious | 10 States | A dark detective pet investigating stack traces. |
| โข๏ธ | Nukey | Character | Chaos | 10 States | A radioactive pixel pet bursting with nuclear energy. |
| ๐ผ | Pixel Panda | Creature | Cozy | 10 States | A bamboo-munching panda for serene coding nights. |
| ๐ง | Prompt Penguin | Creature | Focused | 10 States | An AI prompt specialist penguin guiding your code queries. |
| ๐ฆ | Scoop | Food | Chill | 10 States | A sweet ice-cream companion keeping your terminal cool. |
PetDex/
โโโ .github/ # GitHub workflows & repository config
โโโ public/ # Public static assets & pre-built packs
โ โโโ brand/ # Brand mark & wordmark SVG logos
โ โ โโโ petdex-mark.svg
โ โ โโโ petdex-wordmark.svg
โ โโโ packs/ # Generated pet .zip archives & manifest.json
โ โ โโโ manifest.json
โ โโโ pets/ # Approved virtual pet directories (12 pets)
โ โ โโโ boba/ # (spritesheet.webp, pet.json, metadata.json)
โ โ โโโ boxcat/
โ โ โโโ byte-bunny/
โ โ โโโ cache-capy/
โ โ โโโ cash-cuy/
โ โ โโโ cosmo/
โ โ โโโ kebo/
โ โ โโโ noir-webling/
โ โ โโโ nukey/
โ โ โโโ pixel-panda/
โ โ โโโ prompt-penguin/
โ โ โโโ scoop/
โ โโโ apple-icon.png # Brand favicon & app icons
โ โโโ favicon.ico
โ โโโ og.png # Social media preview card
โ โโโ sw.js # Service Worker to prevent 404 logs
โโโ src/ # Application source code
โ โโโ app/ # Next.js 16 App Router routes
โ โ โโโ admin/ # Admin review dashboard page
โ โ โโโ api/ # Server API routes (submit, admin, uploadthing)
โ โ โโโ install/ # One-click Codex CLI install route
โ โ โโโ pets/ # Individual pet details & state inspection route
โ โ โโโ submit/ # Community pet submission page
โ โ โโโ globals.css # Global styles & custom ::selection theme
โ โ โโโ layout.tsx # Root HTML layout with Clerk auth provider
โ โ โโโ page.tsx # Main home page hero parade & gallery
โ โโโ components/ # Reusable UI components
โ โ โโโ admin-review-row.tsx
โ โ โโโ auth-badge.tsx
โ โ โโโ download-actions.tsx
โ โ โโโ github-icon.tsx
โ โ โโโ ideas-queue.tsx
โ โ โโโ install-command.tsx
โ โ โโโ pet-builder.tsx # Custom Pet Creation Studio
โ โ โโโ pet-gallery.tsx # Real-time multi-tag search & vibe filters
โ โ โโโ pet-playground.tsx# Tamagotchi simulator & stats engine
โ โ โโโ pet-sprite.tsx # HTML Canvas pixel animation player
โ โ โโโ pet-state-viewer.tsx
โ โ โโโ pet-submit-form.tsx
โ โ โโโ petdex-logo.tsx
โ โ โโโ track-on-click.tsx
โ โโโ data/ # Generated datasets
โ โ โโโ pets.generated.ts # Pet definitions registry
โ โโโ lib/ # Utility libraries & core modules
โ โ โโโ db/ # Database client, queries, and schema
โ โ โ โโโ client.ts
โ โ โ โโโ queries.ts
โ โ โ โโโ schema.ts
โ โ โโโ admin.ts
โ โ โโโ audio.ts # Web Audio API sound synthesizer
โ โ โโโ downloads.ts
โ โ โโโ favorites.ts # Favorites local storage custom hook
โ โ โโโ ideas.ts
โ โ โโโ pet-states.ts # Animation state frame metadata
โ โ โโโ pets.ts
โ โ โโโ ratelimit.ts # Upstash Redis rate limiter
โ โ โโโ types.ts # TypeScript type definitions
โ โ โโโ uploadthing.ts
โ โโโ proxy.ts # Clerk authentication middleware
โโโ scripts/ # Automation & asset pipeline scripts
โ โโโ build-packs.ts # Automated pet zip pack generator
โ โโโ generate-assets.ts # Canvas spritesheet generator
โ โโโ import-pet.ts # Pet package importer & validator
โโโ .env.example # Environment variables template
โโโ biome.json # Biome code formatting & linting config
โโโ drizzle.config.ts # Drizzle ORM PostgreSQL config
โโโ next.config.ts # Next.js 16 configuration
โโโ package.json # Project dependencies & npm scripts
โโโ postcss.config.mjs # PostCSS Tailwind CSS v4 config
โโโ PRD.md # Product Requirements Document
โโโ README.md # Futuristic project documentation
โโโ tsconfig.json # TypeScript configuration
- Node.js:
v20.0.0or higher - npm:
v10.0.0or higher
# Clone the repository
git clone https://github.com/CodeWithBasu/PetDex.git
cd PetDex
# Install dependencies using npm
npm installCopy .env.example to .env.local to configure authentication and database connections:
cp .env.example .env.localnpm run devOpen http://localhost:3000 in your browser.
| Script | Description |
|---|---|
npm run dev |
Starts the Next.js 16 Turbopack development server at http://localhost:3000. |
npm run build |
Compiles TypeScript and creates an optimized production build. |
npm run start |
Launches the production server after running npm run build. |
npm run build-packs |
Programmatically generates pet .zip archives and manifest.json. |
npm run check |
Executes Biome linting and code quality checks. |
npm run format |
Runs Biome auto-formatting across the codebase. |
To install any pet locally into your Codex CLI environment:
# Create local Codex pets directory for Boba
mkdir -p ~/.codex/pets/boba
# Download and extract the pet package
curl -O https://petdex.dev/packs/boba.zip
unzip boba.zip -d ~/.codex/pets/bobaThis project is open-source and licensed under the MIT License.
Made with โค๏ธ for the Codex community by CodeWithBasu.