tenshikn / orb

A web application to log and store new knowledge
MIT License
0 stars 0 forks source link

ORB

Video Demo: https://youtu.be/wBvbt49rL5A

Description: A web application to log and store new knowledge.

Background

We often come across new knowledge and concepts when going about our daily activities but fail to recall it and its source when the need arises. ORB tries to solve this problem. ORB is essentially a web application that allows users to add knowledge summaries (entries) to a wide array of topics (the vault). Through nicely organized images and widget entries, learners can quickly add to and view already existing entries for their own future reference.

Upon logging in, which requires a username and a password, users can see at a glance all existing entries and contents of their vault. Users can add to their vault collection via a search and immediately add an entry or decide to do so at a later time. Users can also add to existing entries and view all entries on a particular topic by just clicking on the image representation.

Users should be able to perform the necessary tasks on whatever device they are currently on and as such the software is built to be responsive and usable on all screen sizes.

Installation and Running

sudo easy_install pip
pip install -r requirements.txt
flask run

And visit the output url to see the application in action!

Understanding

application.py

This file firstly imports necessary libraries and helper functions. After the application configuration which includes app sessions and the likes, the file connects to orb.db: a disk-based database using python's sqlite3 module. Implementations of a bunch of routes for the app follows which includes an index and login route for logging in, a /signing route strictly for an AJAX call, a /register and /signup for the signup process for new users, a /new-topic route for knowledge base user query thanks to the wikimedia api and a /home route for the user's main page among others.

helpers.py

helpers.py contains useful helper functions required by application.py. These include apology; responsible for displaying certain error messages to the user as feedback, login_required function to ensure that a user needs to be logged in before some routes are accessible and finally wiki_search; the function responsible for retrieving and parsing responses from wikimedia's database

orb.db

Orb.db is a lightweight disk based database for the web application. It contains tables users; all users of the app, table vault; the table responsible for storing individual's respective titles and finally entries, which holds all user entries for a particular title. SQL queries are performed on these tables to retrieve required data when the need arises.

static/

Inside static/ folder exists the necessary files that adds style to the application. This includes styles.css for CSS, and focus.js and validate.js

templates/

Inside the templates/ folder exists the necessary HTML. These include layout.html; the blueprint that allows other HTML files to inherit and build upon, apology.html; the template used with the apology function found in helpers.py, index.html and signup html which are responsible for user log in and sign up respecively, new-topic.html for the adding of new topics and/or entries to a user's collection, and finally home.html and logs.html for displaying user's existing data. These templates are returned and displayed to the user based on certain conditions by application.py.

Implementation Details

The Future

Below is a possible list of features that will be added to ORB down the line

And you can also help out in any other way you can!