Back

Creating My Chatbox | DanoGlez

March 20, 2025

2 min read

Creating My Chatbox

I’m super hyped to share this new feature I’ve added to my website — a custom chatbox! 🚀 This little project has been a game-changer for engaging with visitors and collecting inquiries more efficiently.

Why Build a Chatbox?

I wanted a sleek and interactive way for users to reach out without relying on clunky forms. Plus, who doesn’t love a friendly digital assistant popping up to offer help?

Key Features

  • Smooth UI: A clean and minimalist design that blends seamlessly with the website’s aesthetics.
  • Step-by-Step Interaction: It guides users through the conversation step by step, collecting relevant info like name, email, and even phone numbers if they want.
  • Discord Integration: All collected info gets sent straight to a Discord channel via a webhook — no more digging through emails to find inquiries!
  • Toggle Animation: A simple click opens or closes the chatbox, and the chat icon changes dynamically. Little details make a big difference.

Tech Stack

  • Astro: For the overall page structure and component handling.
  • TypeScript & JavaScript: Handling the conversation flow and managing user data.
  • CSS & Tailwind: Making sure the chatbox looks clean and modern.
  • Discord Webhook: Instantly sends user data to a private Discord server.

Lessons Learned

  1. State Management: Keeping track of conversation steps and user data taught me a lot about handling app state smoothly.
  2. Async Handling: Sending data to Discord without blocking the UI required careful async/await handling.
  3. User Experience: Simplifying the process for users was key — fewer clicks, more satisfaction.

What’s Next?

I plan to enhance the bot with a backend service to handle inquiries better, and maybe even add some AI-driven responses. For now, it’s already making life easier by keeping everything organized and accessible.

Check it out and let me know what you think! Feedback is always welcome. 🌟