ChatAnyFile is a powerful full-stack application that allows you to interact with your files using AI. Upload PDFs, images, videos, and audio files, and start having meaningful conversations with them. The application uses Google's Gemini AI to understand and respond to your queries about the content of your files.
- 📄 Upload and chat with PDF documents
- 🖼️ Process and understand images
- 🎥 Analyze video content
- 🎵 Interact with audio files
- 🔗 Support for file upload via drag & drop or by URL
- 💬 Natural language conversations with your files
- 🎨 Creative content generation based on multimedia files
This project is built using Nx monorepo, which provides a powerful set of tools for managing and scaling enterprise-level applications with multiple applications and shared libraries.
chat-any-file/
├── apps/
│ ├── client/ # Angular frontend application
│ └── server/ # NestJS backend application
├── libs/ # Shared libraries
- Node.js (v18 or later)
- npm or yarn
- Firebase account
- Google Cloud account
- Gemini API key
git clone https://github.com/luixaviles/chat-any-file.git
cd chat-any-file
npm install
-
Navigate to the server directory:
cd apps/server
-
Create a
.env
file based on.env.example
:cp .env.example .env
-
Configure the following environment variables:
API_KEY
: Your Gemini API key from Google AI StudioGOOGLE_CLOUD_STORAGE_BUCKET
: Your Firebase Storage bucket name. See more information hereGOOGLE_APPLICATION_CREDENTIALS
: Path to your service account JSON file. See more information here
-
Create environment files:
cd libs/environments/src/lib/environments cp environment.template.ts environment.ts cp environment.template.ts environment.development.ts
-
Configure Firebase in your environment files:
- Go to Firebase Console
- Select your project
- Click on the web icon (</>) to add a new web app
- Copy the Firebase configuration object
- Paste it into both
environment.ts
andenvironment.development.ts
In separate terminal windows:
# Start the backend server
npx nx serve server
# Start the frontend application
npx nx serve client
The application will be available at:
- Frontend: http://localhost:4200
- Backend: http://localhost:3000/api
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.