A simple, anime-themed chatbot inspired by Nezuko from Demon Slayer. This project features a React frontend with an Express.js backend powered by Google’s Gemini AI to provide responses in Nezuko’s characteristic innocent and knowledgeable style about anime.
- Anime-Themed Personality: Responds as Nezuko with immense anime knowledge.
- Real-time Chat Interface: Modern React-based UI with smooth messaging.
- AI-Powered Responses: Uses Google Gemini 1.5 Flash model for intelligent conversations.
- Responsive Design: Clean, user-friendly chat interface.
- Error Handling: Graceful handling of API failures and overload scenarios.
- Live Demo: Deployed on Vercel for easy access.
chatBot-01/
├── Nezuko-back/ # Backend Express.js server
│ ├── Neko.js # AI integration with Google Gemini
│ ├── server.js # Main server file
│ ├── package.json # Backend dependencies
│ └── vercel.json # Deployment configuration
├── nezuko-front/ # React frontend
│ ├── Chatbot.js # Main chat component
│ ├── Chatbot.css # Styling for chat interface
│ ├── app.js # React entry point
│ ├── index.html # HTML template
│ └── package.json # Frontend dependencies
├── index.js # Alternative server entry point
└── README.md # Project documentation
- Node.js (v14 or higher)
- Google Gemini API Key (from Google AI Studio)
- npm or yarn package manager
- Clone the Repository
git clone https://github.com/Zeref-XXX/chatBot-01.git
cd chatBot-01
- Backend Setup
cd Nezuko-back
npm install
- Frontend Setup
cd ../nezuko-front
npm install
- Environment Configuration
Create a
.env
file in theNezuko-back
directory:
GEN=your_google_gemini_api_key
PORT=4000
- Start the Backend Server
cd Nezuko-back
npm start
# or
node server.js
The server will run on http://localhost:4000
.
2. Start the Frontend
In a new terminal:
cd nezuko-front
npm start
# or with Parcel
npx parcel index.html
The frontend will be available at http://localhost:1234
by default.
3. Interact
Open the chat interface in your browser and type your questions. Nezuko will respond with her signature “Nya” charm.
Method | Endpoint | Description |
---|---|---|
GET | / |
Health check (returns “pong”) |
GET | /ping |
Status check (returns “working”) |
POST | /api/chat |
Main chat endpoint: send { "message": "Your question here" } and receive a Nezuko-style reply |
- Real-time Messaging: Smooth auto-scroll and instant updates.
- Loading Indicators: Visual feedback during API calls.
- Error Handling: User-friendly messages on network/API errors.
- Responsive Design: Mobile and desktop support.
- Nezuko-Themed UI: Cat emojis and pastel styling for an anime vibe.
The chatbot uses Google Gemini 1.5 Flash with a custom system instruction:
systemInstruction: "you are Nezuko anime freak who have immense knowlege about it"
This ensures responses are:
- Anime-focused and knowledgeable
- In-character as Nezuko
- Friendly and engaging
- Backend: Vercel (configured via
vercel.json
) - Frontend: Any static hosting (Vercel, Netlify, GitHub Pages)
- Live Demo: https://frontend-roan-two-80.vercel.app
@google/genai
– Google Gemini AI integrationexpress
– Web frameworkcors
– Cross-origin resource sharingdotenv
– Environment variable managementchalk
– Terminal stylingreadline-sync
– Synchronous input
react
– Frontend frameworkreact-dom
– React DOM renderingparcel
– Build tool and bundler
- Validates API key on startup
- Detects and reports model overload
- Retries on transient network errors
- Provides clear user error messages
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m "Add amazing feature"
) - Push to your branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- Add more Demon Slayer characters
- Implement conversation memory
- Add voice chat capabilities
- Develop a mobile app version
- Include anime recommendation features
This project is open source under the MIT License. Keep your Google Gemini API key secure and never commit it to version control. Enjoy chatting with Nezuko! 🐾