A complete, modern React web application featuring AI-powered chat, image generation, PDF analysis, and voice processing capabilities.
- GPT-style AI chat with streaming responses
- Markdown support for code blocks, lists, and tables
- Save conversation history in IndexedDB
- Export chat to TXT files
- Chat history sidebar
- Text-to-image generation via OpenAI DALL·E
- Preview images in responsive grid
- Download generated images
- Favorite/bookmark system
- Save images in IndexedDB
- Upload and process PDF files
- Extract text using pdf.js
- AI-powered document summarization
- PDF viewer with pagination
- Export summaries to TXT
- Speech-to-text transcription
- Text-to-speech generation
- Live microphone recording
- Audio playback controls
- Save recordings in IndexedDB
- React 19 - UI framework
- React Router - Navigation
- TailwindCSS - Styling
- IndexedDB (idb) - Local data persistence
- pdf.js - PDF processing
- React Markdown - Markdown rendering
- Lucide React - Icons
- Vite - Build tool
- Clone the repository
- Navigate to the
aidirectory - Install dependencies:
```bash npm install ```
-
(Optional) Add your OpenAI API key:
- Copy
.env.exampleto.env - Add your API key:
VITE_OPENAI_API_KEY=your_key_here
- Copy
-
Start the development server:
```bash npm run dev ```
- Open your browser to
http://localhost:5173
The app works immediately with simulated responses for testing. All features are functional with placeholder data.
- Get your API key from OpenAI Platform
- Add it to
.envfile - Restart the dev server
- Enjoy real AI-powered features!
Toggle between light and dark themes using the button in the navbar. Theme preference is saved in localStorage.
All data is stored locally:
- LocalStorage: Theme preferences, settings
- IndexedDB: Chat history, generated images, PDF summaries, voice recordings
``` ai/ ├── src/ │ ├── api/ │ │ └── openai.js # OpenAI API integration │ ├── components/ │ │ ├── Button.jsx # Reusable button │ │ ├── Loader.jsx # Loading spinner │ │ ├── Modal.jsx # Modal dialog │ │ └── Navbar.jsx # Navigation bar │ ├── context/ │ │ └── UserContext.jsx # Global state management │ ├── modules/ │ │ ├── Chat/ │ │ │ ├── ChatModule.jsx │ │ │ └── ChatMessage.jsx │ │ ├── Image/ │ │ │ ├── ImageModule.jsx │ │ │ └── ImagePreview.jsx │ │ ├── PDF/ │ │ │ ├── PDFModule.jsx │ │ │ └── PDFViewer.jsx │ │ └── Voice/ │ │ ├── VoiceModule.jsx │ │ └── VoicePlayer.jsx │ ├── pages/ │ │ ├── Home.jsx # Landing page │ │ └── Dashboard.jsx # Main app dashboard │ ├── utils/ │ │ ├── storage.js # IndexedDB helpers │ │ └── pdfUtils.js # PDF processing │ ├── App.jsx # Main app component │ ├── main.jsx # Entry point │ └── styles.css # Global styles ├── index.html ├── package.json ├── tailwind.config.js ├── postcss.config.js └── vite.config.js ```
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLint
- ✅ 100% Frontend-first (no backend required)
- ✅ Dark/Light mode with persistence
- ✅ Responsive design (mobile, tablet, desktop)
- ✅ Local data storage (IndexedDB + LocalStorage)
- ✅ Export functionality (TXT, images, audio)
- ✅ Modular architecture
- ✅ Modern UI with TailwindCSS
- ✅ Accessibility support
MIT
Contributions are welcome! Feel free to open issues or submit pull requests.
- OpenAI for AI APIs
- Mozilla for pdf.js
- The React and Vite teams
- TailwindCSS team