Skip to content

ChatAnyFile is a powerful full-stack application that allows you to interact with your PDF documents, images, videos and audio files using AI.

License

Notifications You must be signed in to change notification settings

luixaviles/chat-any-file

Repository files navigation

Chat Any File

Chat with any file using AI - PDFs, Images, Videos, and Audio

License: MIT TypeScript Angular NestJS Firebase Gemini

🚀 Overview

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.

✨ Features

  • 📄 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

🏗️ Project Structure

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

🛠️ Prerequisites

  • Node.js (v18 or later)
  • npm or yarn
  • Firebase account
  • Google Cloud account
  • Gemini API key

🚀 Getting Started

1. Clone the Repository

git clone https://github.com/luixaviles/chat-any-file.git
cd chat-any-file

2. Install Dependencies

npm install

3. Environment Setup

Backend (NestJS Server)

  1. Navigate to the server directory:

    cd apps/server
  2. Create a .env file based on .env.example:

    cp .env.example .env
  3. Configure the following environment variables:

    • API_KEY: Your Gemini API key from Google AI Studio
    • GOOGLE_CLOUD_STORAGE_BUCKET: Your Firebase Storage bucket name. See more information here
    • GOOGLE_APPLICATION_CREDENTIALS: Path to your service account JSON file. See more information here

Frontend (Angular App)

  1. Create environment files:

    cd libs/environments/src/lib/environments
    cp environment.template.ts environment.ts
    cp environment.template.ts environment.development.ts
  2. 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 and environment.development.ts

4. Start the Development Servers

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:

📚 Documentation

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

ChatAnyFile is a powerful full-stack application that allows you to interact with your PDF documents, images, videos and audio files using AI.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published