β¨ Powered by Modern Technologies
- Vue 3: The versatile powerhouse that makes building dynamic user interfaces a breeze.
- Vuetify 3: Elevate your design with the elegance of Material Design, right at your fingertips.
- Pinia: Your go-to state management solution, as easy as pie, and just as satisfying.
- Vite: Lightning-fast build tool that ensures your development experience is as smooth as silk.
- Firebase: Real-time magic for your database and storage needs, ensuring your data is always in sync.
- OpenAI: The brains behind the operation, bringing sophisticated AI chat capabilities to your app.
This project harnesses these cutting-edge technologies to deliver a seamless and responsive chat interface, enriched with AI-driven interactions. Enjoy the power of real-time data, sleek design, and intelligent conversation in one cohesive package.
Vue.3.ChatGPT.Deep.dive.into.AI.World.Audio.Text.Image.mp4
-
Real-time AI Chat
- OpenAI Integration: Leverage the power of OpenAI's ChatGPT for intelligent and dynamic conversations.
- Seamless Interaction: Chat with the AI in real-time, with instant responses and fluid interaction.
-
Multi-format Support
- Text Messages: Exchange plain text messages effortlessly.
- Image Support: Send and receive images directly in the chat.
- Audio Messages: Record and share audio clips with ease.
-
Persistent Chat History
- Local Storage: Messages are saved locally, ensuring chat history is retained even after the page refreshes.
- Firebase Realtime Database: Store messages in the cloud for access across multiple devices.
-
User-friendly Interface
- Vuetify 3: Aesthetic and intuitive design with Material Design components.
- Responsive Layout: Optimized for both desktop and mobile devices.
-
State Management
- Pinia: Simplified and intuitive state management for maintaining the chat application state.
-
Efficient Development Workflow
- Vite: Fast build tool for an efficient development experience.
- Modular Code Structure: Clean and maintainable codebase with Vue 3's Composition API.
-
Security and Scalability
- Firebase Authentication: Secure user authentication to protect chat data.
- Scalable Infrastructure: Firebase backend ensures scalability and reliability as the user base grows.
-
File Management
- Firebase Storage: Store and manage images and audio files securely in the cloud.
To get started, clone the repository and run the development server:
git clone https://github.com/your/repository.git
cd repository-name
yarn install
yarn dev
The application will be running at http://localhost:5017/.
To fully utilize Firebase features:
-
Create a Firebase Project:
- Navigate to the Firebase Console and create a new project.
-
Enable Firebase Services:
- In your Firebase project settings, enable Firebase Storage to store files like images and audio.
-
Obtain Firebase Configuration:
- Go to your Firebase project settings and find the Firebase SDK snippet. You'll need to copy the configuration details including:
apiKey
authDomain
databaseURL
projectId
storageBucket
messagingSenderId
appId
- Go to your Firebase project settings and find the Firebase SDK snippet. You'll need to copy the configuration details including:
-
Add Firebase Configuration to
.env
File:- Create a
.env
file in the root directory of your project if it doesn't exist. - Add your Firebase configuration details to the
.env
file using the following format:VITE_FIREBASE_API_KEY=your-firebase-api-key VITE_FIREBASE_AUTH_DOMAIN=your-auth-domain VITE_FIREBASE_DATABASE_URL=your-database-url VITE_FIREBASE_PROJECT_ID=your-firebase-project-id VITE_FIREBASE_STORAGE_BUCKET=your-firebase-storage-bucket VITE_FIREBASE_MESSAGING_SENDER_ID=your-messaging-sender-id VITE_FIREBASE_APP_ID=your-firebase-app-id
- Create a
Messages are stored in local storage using the useStorage
hook from @vueuse/core
. This ensures that chat history persists even when the page is refreshed.
-
Sign up for OpenAI API:
- Go to the OpenAI website and sign up for an account.
-
Generate API Key:
- After signing in, navigate to your account settings or API section to generate a new API key specifically for ChatGPT.
- Copy the generated API key.
-
Add OpenAI API Key to
.env
File:- Open or create the
.env
file in your project directory. - Add your OpenAI API key to the
.env
file using the following format:VITE_OPENAI_API_KEY=your-openai-api-key
- Open or create the
- β Star my GitHub repo
- π Create pull requests, submit bugs, suggest new features or updates