Skip to content

thgiang-dev/TechSage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TechSage 🧠📚

TechSage is a smart document management and comprehensive learning support platform. The application combines the power of Large Language Models (LLM) with a modern web interface, allowing users to upload documents (PDF), create projects, summarize content, lookup information, and automatically generate quizzes from documents.

🚀 Key Features

  • Smart Document Management: Upload, store, and organize PDF documents by project.
  • AI Summarization: Automatically summarize complex documents using Google Gemini or OpenAI.
  • Chat with Documents: Chat and ask questions to extract specific information from your documents.
  • Quiz Generation: Automatically generate quizzes to test knowledge based on document content.
  • Security: Secure user registration and authentication system using JWT.
  • Modern Interface: Smooth user experience with Vue 3 and Bootstrap 5.

🛠️ Technology Stack

Backend (Server-side)

  • Runtime: Node.js
  • Framework: Express.js
  • Database: PostgreSQL
  • Query Builder: Knex.js
  • AI/LLM Integration: LangChain, Google Generative AI (Gemini), OpenAI
  • Authentication: JSON Web Token (JWT) & Bcrypt
  • File Processing: Multer (Upload), PDF-Parse, PDF.js

Frontend (Client-side)

  • Framework: Vue.js 3
  • Build Tool: Vite
  • State Management: Pinia
  • Routing: Vue Router
  • UI Library: Bootstrap 5
  • HTTP Client: Axios

📦 Installation Guide

Prerequisites

  • Node.js (v18 or higher)
  • PostgreSQL
  • Git

1. Clone the repository

git clone <repository-url>
cd TechSage

2. Backend Setup

Navigate to the backend directory and install dependencies:

cd backend
npm install

Create a .env file in the backend directory with the following environment variables (update with your credentials):

PORT=3000
DATABASE_URL=postgres://username:password@localhost:5432/techsage_db
JWT_SECRET=your_super_secret_key
GOOGLE_API_KEY=your_google_gemini_api_key
# OPENAI_API_KEY=your_openai_api_key (Optional if using OpenAI)

Run migrations to create database tables:

npx knex migrate:latest --knexfile knexfile.js

Start the backend server:

npm run dev

The server will run at http://localhost:3000 API Documentation (Swagger) is available at http://localhost:3000/api-docs

3. Frontend Setup

Open a new terminal, navigate to the frontend directory:

cd frontend/TechSage-frontend
npm install

(Optional) Create a .env file if you need to configure a different API URL:

VITE_API_BASE_URL=http://localhost:3000/api

Start the frontend server:

npm run dev

Access the application at http://localhost:5173

📖 Usage Guide

  1. Register a new account or log in.
  2. Create a new Project (e.g., "History Research", "Learning React").
  3. Upload PDF Documents to that project.
  4. Use the Summarize feature to get a content summary.
  5. Use the Chat (Q&A) feature to ask detailed questions about the document.
  6. Select Generate Quiz to create a knowledge test.

🤝 Contribution

Contributions are always welcome! Please create a Pull Request or open an Issue to report bugs.

📄 License

This project is licensed under the ISC License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors