A playful, modern Tamagotchi-inspired web app with a Gacha mechanic — built with the T3 stack and focused on clean architecture, TypeScript-first code, and a production-ready developer experience.
- Polished UI & UX: Responsive Next.js pages, Tailwind CSS, and component-driven design for fast iteration.
- Gacha + Tamagotchi Game Logic: Client-side
EngineandAvatarGencomponents drive the Tamagotchi behaviours and previews. - Full-stack TypeScript: End-to-end TypeScript with server controllers, typed schemas, and shared types.
- Drizzle ORM & Server API: Lightweight SQL layer and organized server controllers for maintainable backend logic.
- Auth & User Flows: Authentication, user profile pages, gacha pulls, and leaderboards.
- Persistent user accounts and Tamagotchis
- Gacha system with rarity tiers
- Real-time-ish game engine for feeding, playing, and evolving pets
- Leaderboard and community discoverability
- Clean separation: UI components, providers, hooks, and server controllers
- Frontend: Next.js (App Router), React, Tailwind CSS
- Backend: TypeScript, Drizzle ORM, custom controllers (Express-like routing structure)
- Auth: NextAuth / JWT-based flows (see
src/lib/jwt.ts) - Dev tools: Bun/Node, TypeScript, ESLint, Prettier
- Architecture: T3-inspired structure with clear client/server boundaries, Context providers for auth and queries
What to look for in the code (quick pointers):
- Game engine & preview: src/components/site/Tomogatchi/Engine.tsx and src/components/site/Tomogatchi/PreviewCard.tsx
- API controllers: src/server/api/controllers/tamagotchi.controller.ts
- Auth flow & context: src/context/AuthContext.tsx and src/provider/AuthProvider.tsx
- App entry: src/app/page.tsx
Prerequisites: Node.js (or Bun), a package manager (npm, pnpm, or yarn), and a local database if you want persistence.
Install and run locally:
# install
npm install
# start local DB (project provides a helper)
./start-database.sh
# dev server
npm run devBuild for production:
npm run build
npm run startsrc/app/— Next.js app routes and pagessrc/components/— UI + Tamagotchi-specific components (Engine,AvatarGen,PreviewCard)src/server/api/controllers/— Backend controllers for auth, gacha, tamagotchi, and user logicsrc/shared/schemas/— Zod/validation schemas and shared types
This repository demonstrates solid full-stack TypeScript practices: clear separation of frontend and backend responsibilities, reusable component architecture, typed schemas and shared types, and pragmatic use of ORMs and providers. It showcases engineering judgment around maintainability, developer ergonomics, and feature-driven components — ideal evidence of your ability to build production-ready React/Next applications.
Contributions are welcome. Open an issue or PR with a short description of the change.
This project is released under the terms of the MIT License. See LICENSE for details.