A fun and interactive web application that generates fortunes through a chocolate-themed gacha system. Built with Next.js and TypeScript.
- 🎰 Interactive gacha machine with smooth animations
- 🌏 Multi-language support (Korean/English)
- 🎯 Dynamic fortune generation using AI
- 🎨 Beautiful UI with chocolate theme
- 🔄 Smooth transitions and effects
- 🌐 SEO optimized with metadata
- Framework: Next.js
- Language: TypeScript
- Styling: Tailwind CSS
- Animation: Framer Motion
- AI Integration: Google Generative AI(Gemini)
- Internationalization: i18next
- Font: Google Fonts (Do Hyeon, Poor Story)
- Deployment: Vercel
src/
├── app/ # Next.js app router
│ ├── [lang]/ # Dynamic language routes
│ │ └── result/ # Result pages
│ ├── api/ # API routes
│ └── layout.tsx # Root layout
│ └── page.tsx # Root page
├── components/ # React components
│ ├── ChocolateGacha.tsx # Main gacha machine
│ ├── ClientPage.tsx # Client-side page
│ ├── FortuneResult.tsx # Fortune display
│ ├── Description.tsx # Page description
│ ├── Footer.tsx # Footer component
│ └── LanguageSelector.tsx # Language switcher
├── i18n/ # Internationalization
├── types/ # TypeScript definitions
├── utils/ # Utility functions
└── data/ # Static data (chocolates)
- Clone the repository
git clone https://github.com/yourusername/chocolate-fortune-gacha.git
- Install dependencies
npm install
# or
yarn install
- Set up environment variables
Create a
.env.local
file:
GOOGLE_API_KEY=your_google_api_key
- Run the development server
npm run dev
# or
yarn dev
- Smooth spinning animation with Framer Motion
- Interactive lever mechanism
- Dynamic chocolate selection
- Realistic slot machine effects
- Progressive spinning speed changes
- Seamless language switching (한국어/English)
- Full support for Korean and English
- SEO-optimized metadata for each language
- Type-safe translations
- Dynamic fortune generation using Google Generative AI(Gemini)
- Contextual responses based on chocolate type
- Multi-language fortune generation
- Personalized fortune messages
Contributions are welcome! Please feel free to submit a PR.