An open API service indexing awesome lists of open source software.

https://github.com/d-4-dibakar/zerocode-fe-assignment


https://github.com/d-4-dibakar/zerocode-fe-assignment

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

          

# ๐Ÿค– Zerocode Chatbot

A responsive, customizable chatbot UI built with **React**, **TypeScript**, **TailwindCSS**, and **Material UI**.
Includes authentication, theme toggling, prompt templates, PDF export, message editing, and more!

> โšก Built as part of the Zerocode Frontend Assignment

---

## ๐ŸŒ Live Demo

๐Ÿ”— [View Live Project](https://resilient-daffodil-7ffe44.netlify.app/)

## Demo Credentials:

- Email: `test@demo.com`
- Password: `123456`

---

## ๐Ÿ–ผ๏ธ Screenshots

### ๐Ÿ’ฌ Chat Interface

![Chat Screenshot](https://github.com/user-attachments/assets/928810a5-6350-40f3-b2cb-aedab485d85d)
![Chat Screenshot](https://github.com/user-attachments/assets/e3d3d5f1-11af-4cc8-b892-9b60d5df002b)
![Chat Screenshot](https://github.com/user-attachments/assets/cbbe35b5-1c17-48f2-a4ca-c18c4d68dadd)
![Chat Screenshot](https://github.com/user-attachments/assets/3123b2e4-3185-4d07-a6fb-b5bb1f1b7f81)

### ๐Ÿ”’ Auth Pages

### Login Page

![Login Screenshot](https://github.com/user-attachments/assets/3368a122-1fc9-4a5c-961a-34c48d724043)
![Login Screenshot](https://github.com/user-attachments/assets/232606c9-c8e4-4d93-ba75-f84db46e4e22)

### Register Page

![Register Screenshot](https://github.com/user-attachments/assets/6df2f93c-4f3c-4a0a-a1ab-83d904fa5f22)
![Register Screenshot](https://github.com/user-attachments/assets/0b362317-4917-4258-8c3b-5384bb556beb)

---

## โœจ Features

- ๐Ÿ” **Authentication** (Register & Login pages)
- ๐ŸŒ™ **Light/Dark Mode** toggle (persistent)
- ๐Ÿ’ฌ **Chat Interface**
- Send & receive messages (mock bot replies)
- Prompt template shortcuts
- Timestamp on each message
- Persistent chat history (localStorage)
- ๐Ÿ“ **Message Controls**
- Inline **edit** & **delete**
- Scroll-to-bottom on new messages
- ๐Ÿ“„ **Export to PDF** (via `jsPDF`)
- ๐Ÿงช **Responsive Design** (mobile-friendly)
- ๐Ÿš€ Built with Vite for fast dev and optimized builds

---

## ๐Ÿ› ๏ธ Tech Stack

| Technology | Purpose |
| ---------------- | ------------------------------ |
| React + Vite | Frontend framework & bundler |
| TypeScript | Type safety |
| TailwindCSS | Utility-first styling |
| MUI | UI components (buttons, icons) |
| jsPDF | Export chat as PDF |
| File Saver | Save PDF to local |
| React Router DOM | Page routing |

---

## ๐Ÿ“ Project Structure

```

src/
โ”‚
โ”œโ”€โ”€ assets/ # Static assets like logos
โ”œโ”€โ”€ components/ # Reusable UI components
โ”‚ โ”œโ”€โ”€ ChatWindow\.tsx
โ”‚ โ”œโ”€โ”€ MessageBubble.tsx
โ”‚ โ”œโ”€โ”€ MessageInput.tsx
โ”‚ โ”œโ”€โ”€ PromptTemplates.tsx
โ”‚ โ”œโ”€โ”€ ProtectedRoute.tsx
โ”‚ โ””โ”€โ”€ ThemeToggle.tsx
โ”‚
โ”œโ”€โ”€ context/
โ”‚ โ””โ”€โ”€ ThemeContext.tsx
โ”‚
โ”œโ”€โ”€ pages/ # Route-based pages
โ”‚ โ”œโ”€โ”€ Chat.tsx
โ”‚ โ”œโ”€โ”€ Login.tsx
โ”‚ โ””โ”€โ”€ Register.tsx
โ”‚
โ”œโ”€โ”€ utils/
โ”‚ โ”œโ”€โ”€ auth.ts
โ”‚ โ””โ”€โ”€ prompts.ts
โ”‚
โ”œโ”€โ”€ App.tsx
โ”œโ”€โ”€ index.css
โ”œโ”€โ”€ main.tsx
โ””โ”€โ”€ vite-env.d.ts

```

---

## โš™๏ธ Setup Instructions

### ๐Ÿ“ฆ Install Dependencies

```bash
npm install
```

### ๐Ÿงช Run Dev Server

```bash
npm run dev
```

### ๐Ÿ› ๏ธ Build for Production

```bash
npm run build
```

### ๐Ÿ” Preview Production Build

```bash
npm run preview
```

---

## ๐Ÿ“ฆ Dependencies

```json
"dependencies": {
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"@heroicons/react": "^1.0.6",
"@mui/icons-material": "^7.1.1",
"@mui/material": "^7.1.1",
"file-saver": "^2.0.5",
"jspdf": "^3.0.1",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"react-router-dom": "^7.6.2"
}
```

```json
"devDependencies": {
"@eslint/js": "^9.25.0",
"@types/react": "^19.1.2",
"@types/react-dom": "^19.1.2",
"@vitejs/plugin-react": "^4.4.1",
"autoprefixer": "^10.4.21",
"eslint": "^9.25.0",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.19",
"globals": "^16.0.0",
"postcss": "^8.5.6",
"tailwindcss": "^3.4.17",
"typescript": "~5.8.3",
"typescript-eslint": "^8.30.1",
"vite": "^6.3.5"
}
```

---

## ๐Ÿง  Inspiration

This project is part of the Zerocode technical assignment to demonstrate frontend development skills using React + TypeScript + Tailwind + MUI.

---

## ๐Ÿ™Œ Author

**Dibakar Parida**
๐Ÿ“ง [Connect on LinkedIn](https://www.linkedin.com/in/dibakar-parida/)

---

> Feel free to clone, modify, and use for learning or projects. Contributions welcome!