Skip to content

sameezy667/Flagr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

FLAGR

๐Ÿšฉ Finally understand what you're agreeing to - making legal jargon actually readable

license last-commit repo-top-language repo-language-count

React TypeScript Vite


๐Ÿ“‹ Table of Contents


๐Ÿ” Overview

Flagr is a modern, intelligent document analysis and chat platform built with React and TypeScript. It combines the power of AI-driven document processing with an intuitive chat interface, enabling users to upload, analyze, and interact with their documents through natural language conversations.

The platform leverages advanced language models to provide comprehensive document insights, making it easier for users to extract meaningful information from complex documents through an interactive chat experience. Whether you're dealing with legal contracts, technical documentation, or research papers, Flagr transforms dense text into understandable, actionable insights.


โœจ Features

๐Ÿ”ฅ Core Capabilities

  • ๐Ÿ“„ Document Upload & Parsing - Support for multiple document formats with intelligent content extraction
  • ๐Ÿค– AI-Powered Analysis - Advanced document analysis using state-of-the-art language models
  • ๐Ÿ’ฌ Interactive Chat Interface - Natural language conversations about your documents
  • ๐Ÿ” User Authentication - Secure login and user profile management
  • ๐Ÿ’พ Local Storage Integration - Persistent data storage for chat history and user preferences
  • ๐Ÿ“Š Analysis Results Visualization - Comprehensive display of document insights and analysis results

๐Ÿ› ๏ธ Technical Features

  • โšก Modern React Architecture - Built with React 18+ and TypeScript for type safety
  • ๐ŸŽจ Responsive Design - Mobile-first approach with adaptive UI components
  • ๐Ÿ”ง Modular Component Structure - Well-organized, reusable components for maintainability
  • ๐Ÿš€ Fast Development - Powered by Vite for lightning-fast development and builds
  • ๐Ÿ”Œ API Integration - Seamless integration with multiple AI service providers

๐Ÿ—๏ธ Project Structure

โ””โ”€โ”€ Flagr/
    โ”œโ”€โ”€ App.tsx                          # Main application component
    โ”œโ”€โ”€ README.md                        # Project documentation
    โ”œโ”€โ”€ components/                     
    โ”‚   โ”œโ”€โ”€ AnalysisLoadingView.tsx     
    โ”‚   โ”œโ”€โ”€ AnalysisModal.tsx           
    โ”‚   โ”œโ”€โ”€ AnalysisResultsView.tsx     
    โ”‚   โ”œโ”€โ”€ ChatInput.tsx               
    โ”‚   โ”œโ”€โ”€ ChatMessage.tsx            
    โ”‚   โ”œโ”€โ”€ ChatPanel.tsx               
    โ”‚   โ”œโ”€โ”€ ChatView.tsx               
    โ”‚   โ”œโ”€โ”€ InitialView.tsx             
    โ”‚   โ”œโ”€โ”€ LoginPage.tsx               
    โ”‚   โ”œโ”€โ”€ Sidebar.tsx                
    โ”‚   โ””โ”€โ”€ UserProfile.tsx          
    โ”œโ”€โ”€ constants.tsx                   
    โ”œโ”€โ”€ index.html                     
    โ”œโ”€โ”€ index.tsx                      
    โ”œโ”€โ”€ metadata.json                   
    โ”œโ”€โ”€ package-lock.json              
    โ”œโ”€โ”€ package.json                   
    โ”œโ”€โ”€ services/                      
    โ”‚   โ”œโ”€โ”€ documentParser.ts           # Document parsing and content extraction utilities
    โ”‚   โ”œโ”€โ”€ firebaseService.ts          # Firebase integration for backend services
    โ”‚   โ”œโ”€โ”€ geminiService.ts.bak        # Gemini AI service (backup)
    โ”‚   โ”œโ”€โ”€ llama-api.services.ts       # Llama API integration for AI-powered analysis
    โ”‚   โ””โ”€โ”€ storageService.ts           # Local storage management and data persistence
    โ”œโ”€โ”€ tsconfig.json                  
    โ”œโ”€โ”€ types.ts                       
    โ”œโ”€โ”€ vite-env.d.ts                  
    โ””โ”€โ”€ vite.config.ts                  

๐Ÿ“‚ Project Index

FLAGR/
__root__
types.ts TypeScript type definitions for the entire application
constants.tsx Application-wide constants and configuration values
App.tsx Main React application component and routing logic
package.json NPM package configuration and dependencies
vite.config.ts Vite build tool configuration
index.tsx React application entry point and root rendering
components
InitialView.tsx Landing page and welcome screen component
LoginPage.tsx User authentication and login interface
ChatView.tsx Main chat conversation display component
ChatPanel.tsx Chat interface container and management
ChatInput.tsx Message input component with file upload
ChatMessage.tsx Individual chat message display component
AnalysisModal.tsx Document analysis configuration modal
AnalysisLoadingView.tsx Loading state display during analysis
AnalysisResultsView.tsx Analysis results display and visualization
Sidebar.tsx Navigation sidebar and menu component
UserProfile.tsx User profile management and settings
services
documentParser.ts Document parsing and content extraction utilities
llama-api.services.ts Llama API integration for AI-powered analysis
storageService.ts Local storage management and data persistence
firebaseService.ts Firebase integration for backend services

๐Ÿš€ Getting Started

๐Ÿ“‹ Prerequisites

Before getting started with Flagr, ensure your development environment meets the following requirements:

  • Node.js: Version 16.0 or higher
  • NPM: Version 8.0 or higher (or Yarn 1.22+)
  • Operating System: Windows 10+, macOS 10.15+, or Linux
  • Browser: Modern browser with ES2020 support (Chrome 88+, Firefox 85+, Safari 14+)

โš™๏ธ Installation

Install Flagr using the following steps:

  1. Clone the repository:
git clone https://github.com/sameezy667/Flagr.git
  1. Navigate to the project directory:
cd Flagr
  1. Install dependencies:

Using npm:

npm install

Using yarn:

yarn install
  1. Set up environment variables (if needed):
cp .env.example .env
# Edit .env with your configuration

๐Ÿ’ป Usage

Run Flagr in development mode:

Using npm:

npm run dev

Using yarn:

yarn dev

Build for production:

npm run build
# or
yarn build

Preview production build:

npm run preview
# or
yarn preview

The application will be available at http://localhost:5173 (or the port specified in your configuration).

๐Ÿ›ฃ๏ธ Project Roadmap

๐Ÿ”„ In Progress

  • Enhanced Document Analysis - Advanced parsing for multiple file formats (PDF, DOCX, TXT)
  • Real-time Collaboration - Multi-user document sharing and collaboration
  • Advanced Search - Full-text search across uploaded documents

๐ŸŽฏ Upcoming Features

  • Document Summarization - AI-powered document summaries and key insights
  • Export Functionality - Export chat conversations and analysis results
  • Mobile App - React Native mobile application
  • API Documentation - Comprehensive API documentation and SDK
  • Integration Plugins - Third-party integrations (Google Drive, Dropbox, etc.)
  • Advanced Analytics - Usage analytics and performance metrics

๐Ÿ”ฎ Future Enhancements

  • Voice Input - Speech-to-text for hands-free interaction
  • Multi-language Support - Internationalization and localization
  • Custom AI Models - Support for custom-trained language models
  • Workflow Automation - Automated document processing workflows

๐Ÿค Contributing

We welcome contributions from the community! Here's how you can help make Flagr better:

๐Ÿ”— Quick Links

๐Ÿ› ๏ธ Development Workflow

Contributing Guidelines
  1. ๐Ÿด Fork the Repository

    # Fork the project to your GitHub account
  2. ๐Ÿ“ฅ Clone Locally

    git clone https://github.com/YOUR-USERNAME/Flagr.git
    cd Flagr
  3. ๐ŸŒฟ Create a Feature Branch

    git checkout -b feature/amazing-new-feature
  4. โš™๏ธ Set Up Development Environment

    npm install
    npm run dev
  5. โœจ Make Your Changes

    • Write clean, well-documented code
    • Follow the existing code style
    • Add tests for new functionality
    • Update documentation as needed
  6. ๐Ÿงช Test Your Changes

    npm run test
    npm run lint
    npm run type-check
  7. ๐Ÿ’พ Commit Your Changes

    git add .
    git commit -m "feat: add amazing new feature"

    Follow Conventional Commits format:

    • feat: for new features
    • fix: for bug fixes
    • docs: for documentation changes
    • style: for formatting changes
    • refactor: for code refactoring
    • test: for test additions/modifications
  8. ๐Ÿš€ Push to GitHub

    git push origin feature/amazing-new-feature
  9. ๐Ÿ”„ Submit a Pull Request

    • Create a PR with a clear title and description
    • Reference any related issues
    • Include screenshots for UI changes
    • Ensure all checks pass

๐Ÿ“Š Contributor Recognition

Contributor Graph


๐Ÿ“„ License

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


๐Ÿ™ Acknowledgments

๐Ÿ› ๏ธ Technologies & Libraries

  • React - UI library for building interactive interfaces
  • TypeScript - Type-safe JavaScript development
  • Vite - Fast build tool and development server
  • Firebase - Backend services and authentication
  • Llama API - AI language model integration

๐ŸŽจ Design & Assets

๐ŸŒŸ Special Thanks

  • IEEE RAS team for inspiring and motivating us to build this project for the PIXEL PALETTES hackathon
  • The open-source community for inspiration and support

๐Ÿ“š Resources & Inspiration


Made with โค๏ธ by the Flagr Team

โญ Star this project | ๐Ÿ› Report Bug | ๐Ÿ’ฌ Join Discussion

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages