WallpaperMachine
The wallpapers you love. A new home on your Mac.
月ねこAIがあなたの心に寄り添う名言を選びます
Translation pending
LifestyleTypeScript · CSSGitHub @nekoai-labOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
ユーザーが入力した「現在の感情」や「悩み」をAIが解析し、数多あるアニメ・漫画作品の中から最適な「名言」を選定して処方するWebアプリケーションです。
Translation pending
Loading the full README.
Read the full README ↗「気の利いたことは言えませんが、最高の物語なら知っています。」
感情に寄り添う、AI駆動型・和モダン名言処方アプリケーション。
月ねこ名言帖は、ユーザーが入力した「現在の感情」や「悩み」をAIが解析し、数多あるアニメ・漫画作品の中から**最適な「名言」**を選定して処方するWebアプリケーションです。
単なるランダム表示ではなく、Google Gemini AI のコンテキスト理解能力を活用し、ユーザーの心に響く「意外なセリフ」や「隠れた名作」を提案します。 デザインは「和モダン」をテーマに、デジタルなAI技術と伝統的な美意識(麻の葉、青海波など)を融合させています。
本アプリケーションは、Next.js (App Router) をベースに構築され、Vercel 上での動作を想定しています。
graph TD
Client["Client (Browser)"]
subgraph "Vercel / Next.js Infrastructure"
Page["React Server/Client Components"]
RouteGen["API Route: /api/generate"]
RouteCover["API Route: /api/book-cover"]
end
subgraph "External Services"
Gemini["Google Gemini API"]
Rakuten["Rakuten Books API (Optional)"]
end
Client -->|1. User Input| Page
Page -->|2. POST Request| RouteGen
RouteGen -->|3. Optimized Prompt| Gemini
Gemini -->|4. Structured JSON| RouteGen
RouteGen -->|5. Quote Data| Page
Page -.->|6. Fetch Cover Image| RouteCover
RouteCover -.->|7. Search Query| Rakuten
app/api/generate/route.ts 内に、AIの「ペルソナ(伝説のオタク兼カウンセラー)」と「出力制約(JSON)」を厳密に定義しています。types/quote.ts)により、AI出力の揺らぎを吸収し、堅牢なフロントエンド実装を保証しています。ユーザーが感情を入力してから、名言が提示されるまでのフローです。
sequenceDiagram
participant User
participant UI as Browser (React)
participant API as Next.js API
participant AI as Gemini Model
Note over User, UI: ユーザーが感情を入力 (例: "明日が不安...")
User->>UI: 送信ボタン押下
UI->>UI: ローディング状態へ遷移 (Mascot Animation)
UI->>API: POST /api/generate { emotion: text }
Note over API: Input Validation & Prompt Construction
API->>AI: generateContent(SystemPrompt + UserEmotion)
opt Thinking Process
AI-->>AI: 感情分析 (Primary/Secondary)
AI-->>AI: 作品・名言候補の選定
AI-->>AI: JSONフォーマットへの整形
end
AI-->>API: JSON Response
API->>API: JSON Parsing & Error Handling
API-->>UI: QuoteResponse Object
UI->>UI: 名言カードのレンダリング (Fade-in-up)
UI-->>User: 名言と解説を表示
| Category | Technology | Version | Usage |
|---|---|---|---|
| Framework | Next.js | 16.1.1 | App Router, Server Actions |
| Language | TypeScript | 5.x | Static Typing, Interfaces |
| UI Library | React | 19.x | Component Architecture |
| Styling | Tailwind CSS | 4.x | Utility-first CSS, Custom Animations |
| AI Model | Google Gemini | 2.5-flash | Natural Language Processing |
| Icons | Lucide React | 0.562 | SVG Icons |
| Font | Google Fonts | Noto Serif JP, Zen Kurenaido | Typography |
.
├── app/
│ ├── api/generate/ # AI生成のエンドポイント
│ ├── components/ # UIコンポーネント (Atomic Design Inspired)
│ │ ├── EmotionForm.tsx # 入力フォーム
│ │ ├── QuoteCard.tsx # 名言表示カード
│ │ ├── WelcomeMessage.tsx # 動的ウェルカムメッセージ
│ │ └── ...
│ ├── layout.tsx # Root Layout (Google Fonts設定)
│ └── page.tsx # メインページ (State管理)
├── lib/
│ └── gemini.ts # Google Generative AI クライアント初期化
├── types/
│ └── quote.ts # APIレスポンスの型定義
└── public/ # 静的アセット (mascot.jpg 等)
開発者向けセットアップガイドです。
リポジトリをクローンし、依存関係をインストールします。
git clone https://github.com/yourname/tsukineko-meigen-gacha.git
cd tsukineko-meigen-gacha
npm install
ルートディレクトリに .env.local ファイルを作成し、APIキーを設定してください。
GEMINI_API_KEY=your_google_gemini_api_key_here
npm run dev
http://localhost:3000 にアクセスして動作を確認します。
Created with ❤️ & 🌙 by 月ねこ開発チーム