Minecraft Support Chatbot
An interactive chatbot designed to provide support to players of a Minecraft server. This project is built with Astro, React, and TailwindCSS, offering a modern and customizable experience.
Created by FeliponsioDev
Technologies Used
- Astro: Framework for building fast and modern websites.
- React: Library for building interactive user interfaces.
- TailwindCSS: CSS framework for fast and consistent styling.
- TypeScript: Typed language to improve code quality.
- Vite: Fast development tool for modern web applications.
Features
- Modern User Interface: Responsive and attractive design with dark mode support.
- Predefined Responses: The chatbot answers common questions related to:
- Server connection.
- Performance issues.
- Server rules.
- Useful commands.
- Economy and shops.
- Events and minigames.
- Technical issues.
- Quick Action Buttons: Frequently asked questions accessible with a single click.
- Chat History: Save and load previous conversations.
- Discord Support: Direct link to the Discord server for personalized assistance.
- Customization: Easily configure chatbot responses in the
chatbot.tsfile.
Project Structure
chatbot-website/
├── src/
│ ├── components/ # Reusable React components
│ │ ├── ChatInterface.tsx
│ │ ├── ChatMessage.tsx
│ │ ├── QuickActionButtons.tsx
│ │ └── ui/ # UI components
│ │ ├── Button.tsx
│ │ └── input.tsx
│ ├── layouts/ # Application layouts
│ │ └── Layout.astro
│ ├── lib/ # Logic and utilities
│ │ ├── chatbot.ts
│ │ └── utils.ts
│ ├── pages/ # Main pages
│ │ └── index.astro
│ └── env.d.ts # Environment types
├── public/ # Static files
├── astro.config.mjs # Astro configuration
├── tailwind.config.mjs # TailwindCSS configuration
├── tsconfig.json # TypeScript configuration
├── package.json # Dependencies and scripts
└── README.md # Project documentationRequirements
- Node.js: Version 18 or higher.
- NPM: Included with Node.js.
- Astro: Framework used for development.
Installation
Clone this repository:
bashgit clone https://github.com/FeliponsioDev/chatbot-website.git cd chatbot-websiteInstall dependencies:
bashnpm installStart the development server:
bashnpm run devOpen your browser at
http://localhost:3000.
Configuration
Configure Chatbot Questions and Answers
The file src/lib/chatbot.ts contains the logic to process user questions and return responses. You can customize the responses by editing this file.
Example:
// filepath: src/lib/chatbot.ts
export function processUserMessage(message: string): string {
const input = message.toLowerCase();
let response = "";
if (input.includes("connect") || input.includes("ip")) {
response = "To connect to the server, follow these steps...";
}
// Add more conditions to customize responses
return response;
}Customize the Design
The design is based on TailwindCSS. You can modify global styles in the src/layouts/Layout.astro file or in the Tailwind configuration in tailwind.config.mjs.
Configure the Environment
If you need environment variables, add them to a .env file in the root of the project.
Example:
PUBLIC_SITE_URL=https://your-site.comUsage
- Main Interface: The main page displays the chatbot with a message area and an input field.
- Send Questions: Type your question in the input field and press the send button.
- Quick Buttons: Use quick action buttons for frequently asked questions.
- History: Access chat history from the "History" button.
Deployment
To build the project for production:
npm run buildThe generated files will be in the dist/ folder. You can deploy them to any static hosting service like Vercel, Netlify, or GitHub Pages.
Contribute
- Fork the repository.
- Create a branch for your feature:bash
git checkout -b new-feature - Make your changes and commit them:bash
git commit -m "Added new feature" - Push your changes:bash
git push origin new-feature - Open a Pull Request.
Security
Refer to the SECURITY.md file for more details on how to report vulnerabilities.
License
This project is licensed under the MIT license. Refer to the LICENSE file for more details.
💬 Support
Developed with 💙 by Revers Studio