How diptaaaa/chatbot-dipta works
Dipta AI is a PHP web chatbot. Users open a room, view its conversation, submit a prompt, and receive a Groq-generated reply; chat history and room titles are stored in MySQL. The graph includes the documented room-management and Markdown/code-rendering features. Source excerpts confirm the main page, AJAX flow, and AI integration; wiring for some room-management actions is not fully visible, so those links are omitted.
Main entry points: index.php Chat page · chat-ajax.php Chat AJAX endpoint · config.php Config and DB connection · groq.php AI request helper
Components 13
Chat experience
- Chat page
index.php - Chat styling
style.css - Markdown rendering
index.php
PHP application
- Serverless page route
api/index.php - Chat AJAX endpoint
chat-ajax.php - Serverless chat route
api/chat-ajax.php - Config and DB connection
config.php
AI integration
- AI request helper
groq.php
Conversation data
- MySQL database
database.sql
Other components
- User
- Marked.js
- Highlight.js
- Groq Cloud
Connections 17
- User → Chat page: opens and uses
- Chat page → Chat styling: loads styles
- Chat page → Config and DB connection: loads configuration
- Chat page → MySQL database: reads rooms and history
- Chat page → Chat AJAX endpoint: submits prompts
- Chat AJAX endpoint → Config and DB connection: loads configuration
- Config and DB connection → MySQL database: connects to
- Chat AJAX endpoint → MySQL database: checks room; stores messages and title
- Chat AJAX endpoint → AI request helper: requests reply with history
- AI request helper → Config and DB connection: reads AI settings
- AI request helper → Groq Cloud: sends completion request
- Chat AJAX endpoint → Chat page: returns JSON reply
- Chat page → Markdown rendering: renders conversation
- Markdown rendering → Marked.js: parses Markdown
- Markdown rendering → Highlight.js: highlights code
- Serverless page route → Chat page: includes page entry
- Serverless chat route → Chat AJAX endpoint: includes chat entry