Skip to content

πŸ“– GNOSIS - For sharing knowledge is an ambitious project designed to transform the way individuals engage with and acquire knowledge.

Notifications You must be signed in to change notification settings

MidHunterX/GNOSIS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

For sharing knowledge

The "GNOSIS-for sharing knowledge" is an ambitious project designed to transform the way individuals engage with and acquire knowledge in the realm of computer functionality. In today's rapidly evolving technological landscape, the demand for comprehensive and accessible information has never been greater. This platform seeks to bridge the gap between complex technical concepts and userfriendly learning by providing a dynamic and interactive space where users can post questions and receive tailored responses in their preferred format. At its core, the platform is built on the foundation of inclusivity and accessibility, recognizing that users have diverse learning styles and preferences.

πŸ’» Development Progress

  • Concept of operation
  • Requirements elicitation
  • Database Modelling and Implementation
  • Backend Server Logic Design and Implementation
  • UI/UX Design and Implementation

πŸ”§ Project Features

Profile Related Features

  • Register an account
  • Show error messages on unsuccessful authentication
  • Login with registered account on successful authentication
  • Edit registered account details
  • Upload Pictures to set as Profile Display Picture in account settings
  • Logout of registered account
  • View own registered account
  • View other registered accounts
  • Upload Pictures for Profile Picture
  • Toggle between Uploader and Viewer Mode

Question Related Features

  • Create questions in plaintext
  • Read questions
  • Update questions in plaintext
  • Delete questions
  • Add questions to favorites list
  • Optional ability to restrict comments on study materials / posts
  • Auto Generate answers with Gemini AI
  • Answer questions asked by other registered accounts in plaintext
  • Answer questions asked by other registered accounts in markdown
    • Sanitize problematic HTML tags for security
    • Model in Database for storing Sanitized Data
    • Renderer for stored markdown code
  • Answer questions asked by other registered accounts with inline image (url) attachment
  • Answer questions asked by other registered accounts in audio
  • Answer questions asked by other registered accounts in video

User Interface Features

  • Switch between Light mode and Dark mode
  • Fully featured markdown input formatting UI
  • Query questions using fuzzy logic
  • Generative AI Answer and Fuzzy Search questions logic using a single search bar
  • Show Generating Status on Answer Generation
  • Split Uploader/Viewer mode selection screen
  • Dropdown list for all Profile Functions
  • Show a landing page on website load
  • Searched question's multimedia answer query options (more option)

Optional Features

  • Show a welcome page after login
  • Show a goodbye page after logout
  • On goodbye page, redirect users to login page after n seconds
  • Human readable approximate timestamps

TODO List

  • Illustration for Hero Section
  • Landing Page Feature List
  • Attach answer UI within Ask Question form for Uploaders
  • Tab style multimedia uploading form

πŸ“¦ Technologies Used

Name Usage
Django Python webapp framework
virtualenv Python package virtual environment
python-dotenv System Environment Variables for Python
django-crispy-forms For all Input Forms
crispy-bootstrap5 Bootstrap for Crispy Forms
django-markdownfield Raw Markdown storage model and renderer
bleach HTML Sanitizier for storing MD to DB
Bootstrap v5.3 CSS Framework
Fontawesome CSS Icons Library
easymde Markdown Editor Frontend for User Input
fuzzywuzzy Fuzzy String Sequence and Pattern detection
python-Levenshtein String similarity and distance operations

πŸ†• Initializing Project

Step 1: Clone the project

git clone https://github.com/MidHunterX/GNOSIS

Step 2: Initialize Virtual Environment (Recommended)

Install Python and execute following commands:

python -m pip install virtualenv
python -m venv ENV

Step 3: Activate Virtual Environment

Using the command based on your current shell

# CMD
ENV\Scripts\activate.bat
# Powershell
.\ENV\Scripts\Activate.ps1
# Bash and Zsh
source ENV/bin/activate
# Fish
source ENV/bin/activate.fish

Step 4: Install Requirements

pip install -r requirements.txt

Step 5: Create Admin Account (optional)

python manage.py createsuperuser

πŸƒ Running Project

Execute runserver.bat if you are on Windows.
Or run server manually by doing the following steps:

Step 1: Activate Virtual Environment

Using the command based on your current shell

# CMD
ENV\Scripts\activate.bat
# Powershell
.\ENV\Scripts\Activate.ps1
# Bash and Zsh
source ENV/bin/activate
# Fish
source ENV/bin/activate.fish

Step 2: Run Server

python manage.py runserver

Open http://localhost:8000 or http://127.0.0.1:8000 with your browser

⚠️ Problems Faced

Question Search Logic

Task: Search for an input question in a database. If question found, return question; else, return generated answer.

  • Searching for questions based on string comparison won't work on spelling mistakes and rephrased questions
  • Spelling mistakes issue can be solved using Levenshtein distance which finds the similarity of two strings
  • With that set, the rest of the input can be compared using Fuzzy Logic which returns questions similar enough
  • So, the best approach is to use Fuzzy Logic based on string similarity percentage.
  • If similarity percentage is set high, it might skip slightly rephrased questions.
  • If similarity percentage is set low, wrong questions with similar words might be returned.

βœ‚οΈ Snippets for Development

Re-applying Migrations (Col not found error)

python manage.py migrate gnosis_app zero
python manage.py migrate

About

πŸ“– GNOSIS - For sharing knowledge is an ambitious project designed to transform the way individuals engage with and acquire knowledge.

Topics

Resources

Stars

Watchers

Forks