ai-chatbot
v0.1.1
Published
AI at blinkX! ## Architecture 
Readme
blinkX AI
AI at blinkX!
Architecture

Preface
Built for easing the task for the call center guys. This chat bot would handle simple queries using from the user and if required forwards the query to an Whatsapp agent on user's demand.
Tech stack used
- NextJs 14 -> Bleeding edge when the project was made
- Initially, it was built for using Vercel's AI SDK, but unfortunately, the feature "StreamingUI" isn't compatible with nginx. So, I've switched to generic server-side actions for deployments.
- Make sure to revise
Server ActionsanduseContextproviders.
Folders
/app Directory
/ai -> Base path
A base path is added so that it wouldn't cause discrepancies for other web servers hosted on the VM.
/ai/chat -> The Chat Bot
The chat application - Utilizes Context Providers and Server Side actions extensively.
/ai/video -> A PoC project which was probably scraped
You probably don't have to worry about this.
/ai/api -> The server side API for NextJs
Initially, it had been made for /ai/chat to leverage ChatGPT's API. Now it's not used anymore.
/components -> Contains all the components
Most of the components for this project are present here
/lib -> The business logic of this project
All the logic for server-actions goes here. Make sure to use it wisely.
/chat -> The chat business logic
The main server action for chat bot.
/hooks -> custom use hooks
Don't ask me why I created it.
'main is the main branch'
Getting Started
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
