Skip to content
manuprince123Public

About

DocuSense AI is designed for enterprise document analysis and decision support. It combines: - A React frontend for dashboarding, document upload, and knowledge graph visualization - An Express backend for API handling, AI requests, authentication, and document parsing - Google Gemini AI integration for classification, and complianc

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

DocuSense AI

Overview

This repository contains a React + Vite frontend and an Express-based Node server for a document intelligence application.

The project uses:

  • React 19 + Vite
  • Express server bundled with esbuild
  • Google Gemini AI via @google/genai
  • Tailwind CSS for styling
  • Vitest for tests

Prerequisites

  • Node.js 20 or later
  • npm

Setup

  1. Install dependencies:

    npm install
  2. Create a .env file in the project root with the following values:

    GEMINI_API_KEY=your_google_gemini_api_key
    JWT_SECRET=your_jwt_secret
    • GEMINI_API_KEY is required for AI model requests.
    • JWT_SECRET is used by the server for token generation and validation.

Development

Run the app in development mode:

npm run dev

This starts the application via tsx server.ts and serves the frontend through Vite.

Build

To build the frontend and bundle the server for production:

npm run build

What this does:

  • vite build builds the React frontend
  • esbuild server.ts --bundle --platform=node --format=cjs --packages=external --sourcemap --outfile=dist/server.cjs bundles the Express server into dist/server.cjs

Start

After building, start the production server with:

npm run start

The server listens on port 3000 by default.

Clean

Remove build artifacts:

npm run clean

Test

Run the test suite:

npm run test

Notes

  • The server uses an in-memory database, so data does not persist across restarts.
  • File upload size limits are configured in server.ts with JSON and URL-encoded payload limits of 50mb.
  • If you need to customize the port, update PORT in server.ts.

Project Info

DocuSense AI is designed for enterprise document analysis and decision support. It combines:

  • A React frontend for dashboarding, document upload, and knowledge graph visualization
  • An Express backend for API handling, AI requests, authentication, and document parsing
  • Google Gemini AI integration for classification, summarization, and compliance insights
  • In-memory state for user sessions, documents, conversations, audit logs, and shared reports

This build is intended as a modern proof-of-concept stack with fast local development and easy production bundling.

Next Uses

  1. Extend the AI flows:

    • add smarter prompt templates
    • support additional Gemini models or fallback logic
    • persist results to a database instead of memory
  2. Add production readiness:

    • implement real authentication and user management
    • add logging, metrics, and error tracking
    • secure env handling and secrets management
  3. Improve UX:

    • add file upload previews and document history
    • enhance the knowledge graph and analysis viewer
    • support PDF, image OCR, and advanced document types
  4. Deploy:

    • containerize with Docker
    • host on a cloud platform (AWS, GCP, Azure, or Vercel for frontend)
    • connect to a persistent database and secure API gateway

About

DocuSense AI is designed for enterprise document analysis and decision support. It combines: - A React frontend for dashboarding, document upload, and knowledge graph visualization - An Express backend for API handling, AI requests, authentication, and document parsing - Google Gemini AI integration for classification, and complianc

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages