Skip to content

MpLebron/GMSKnowVerse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

GMSKnowVerse - Geographic Model Knowledge Management System

GMSKnowVerse is a knowledge management system specifically designed for geographic models. It allows users to create and manage geographic analysis model entries and upload knowledge files (like PDFs, Word documents, etc.) to these models. The system uses Dify's knowledge base API as the backend for document processing and retrieval.

Features

  • Create and manage geographic models (climate, terrain, population, etc.)
  • Upload and manage knowledge files for each model
  • Search functionality for models and documents
  • Integration with Dify's knowledge base API for document processing
  • Responsive UI with Tailwind CSS

Tech Stack

Frontend

  • Vue 3
  • JavaScript
  • Tailwind CSS
  • Axios for API requests
  • Vue Router for navigation

Backend

  • Node.js
  • Express
  • MongoDB with Mongoose
  • Multer for file uploads
  • Axios for Dify API integration

Project Structure

GMSKnowVerse/
├── frontend/                  # Vue 3 frontend
│   └── GMSKnowVerseFront/
│       ├── public/            # Static files
│       └── src/
│           ├── assets/        # CSS, images, etc.
│           ├── components/    # Vue components
│           ├── pages/         # Vue pages
│           ├── App.vue        # Main app component
│           └── main.js        # Entry point
│
└── backend/                   # Node.js backend
    ├── config/                # Configuration files
    ├── controllers/           # Route controllers
    ├── middleware/            # Express middleware
    ├── models/                # Mongoose models
    ├── routes/                # Express routes
    ├── utils/                 # Utility functions
    ├── .env                   # Environment variables
    └── index.js               # Entry point

Setup and Installation

Prerequisites

  • Node.js (v14 or higher)
  • MongoDB
  • Dify API key

Backend Setup

  1. Navigate to the backend directory:

    cd GMSKnowVerse/backend
    
  2. Install dependencies:

    npm install
    
  3. Create a .env file with the following variables:

    PORT=5001
    MONGO_URI=mongodb://localhost:27017/gmsknowverse
    DIFY_API_KEY=your_dify_api_key
    DIFY_API_URL=http://your_dify_api_url
    
  4. Start the server:

    npm run dev
    

Frontend Setup

  1. Navigate to the frontend directory:

    cd GMSKnowVerse/frontend/GMSKnowVerseFront
    
  2. Install dependencies:

    npm install
    
  3. Start the development server:

    npm run dev
    

Usage

  1. Open your browser and navigate to http://localhost:3000
  2. Create a new geographic model by clicking on "Create New Model"
  3. Upload knowledge files to the model
  4. Search for models and documents using the search functionality

API Endpoints

Models

  • GET /api/models - Get all models
  • GET /api/models/:id - Get a specific model
  • POST /api/models - Create a new model
  • PUT /api/models/:id - Update a model
  • DELETE /api/models/:id - Delete a model
  • GET /api/models/:id/documents - Get all documents for a model
  • POST /api/models/:id/documents/upload - Upload a document to a model
  • POST /api/models/:id/documents/text - Create a text document for a model

Documents

  • GET /api/documents/:id - Get a specific document
  • DELETE /api/documents/:id - Delete a document
  • GET /api/documents/:id/status - Get document indexing status
  • GET /api/documents/:id/segments - Get document segments

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors