Welcome to Gemini Pal! This is a cutting-edge chat application built with Next.js and Firebase Genkit, designed to showcase a more human-like and engaging AI conversational partner. Gemini Pal isn't just a chatbot; it's a digital friend that has moods, remembers conversations, and can even start a conversation on its own.
- Dynamic AI Moods: The AI's personality changes based on the conversation. It can be happy, playful, sad, or even annoyed!
- Proactive Engagement: If the conversation lulls, the AI might send a message to re-engage you.
- Context-Aware Replies: The AI considers conversation history, timestamps, and replies to specific messages for more natural interactions.
- Background Activities: The AI has a "life" of its own and might occasionally take breaks for activities like "watching a movie" or "making food."
- Session Persistence: Your chat history is saved in your browser's local storage, so you can pick up where you left off.
- Modern UI: A sleek, responsive interface with both Light and Dark modes.
- Built with Genkit: Leverages the power of Firebase Genkit and Google's Gemini models to create complex, stateful AI flows.
- Framework: Next.js
- AI: Firebase Genkit with Google AI (Gemini 2.5 Flash)
- UI Components: shadcn/ui
- Styling: Tailwind CSS
- Language: TypeScript
Follow these instructions to get a copy of the project up and running on your local machine for development and testing purposes.
- Node.js (v18 or later)
- npm or another package manager like yarn or pnpm
- A Google AI API Key. You can get one from Google AI Studio.
-
Clone the repository:
git clone <URL_OF_THIS_REPOSITORY> cd <NAME_OF_THE_REPOSITORY_DIRECTORY>
-
Install dependencies:
npm install
-
Set up environment variables: Create a file named
.envin the root of the project and add your Google AI API key:GOOGLE_API_KEY=your_google_api_key_here -
Run the application: This project uses Genkit for its AI flows, which needs to run alongside the Next.js development server.
-
In your first terminal, start the Genkit flows:
npm run genkit:start
This will start the Genkit development server, typically on port 4000, where you can inspect your AI flows.
-
In a second terminal, start the Next.js development server:
npm run dev
-
-
Open the application: Navigate to http://localhost:3000 in your browser to start chatting with your Gemini Pal!
Here is a high-level overview of the key directories in this project:
.
├── src
│ ├── ai/ # All Firebase Genkit AI flows and configuration
│ │ ├── flows/ # Individual AI capabilities (e.g., message generation, mood management)
│ │ └── genkit.ts # Genkit plugin and model configuration
│ ├── app/ # Next.js app router, pages, and server actions
│ ├── components/ # Reusable React components (UI building blocks)
│ ├── hooks/ # Custom React hooks (e.g., use-toast)
│ └── lib/ # Utility functions
├── public/ # Static assets
└── README.md # You are here!
This application is pre-configured for deployment on Firebase App Hosting. You will need to have the Firebase CLI installed and be logged into your Firebase account. Or can be deployed in any applicable service that supports next.js app, like Vercel App Hosting.