Skip to content
/ ibp Public
forked from jonkensta/ibp-server

Inside Books Project database web interface

License

Notifications You must be signed in to change notification settings

dc-b2p/ibp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

This repository hosts the Inside Books Project database web interface. This interface is implemented using Flask and SQLAlchemy and includes the following features:

  • printing processing labels through the Dymo JS framework,
  • querying inmate data from the TDCJ and FBOP websites,
  • printing warnings and alerts for inmates,
  • printing shipment and request metrics,
  • logging in through Google your google account.

Installation

Installing and running this software requires several steps. First, you must clone this repository with submodules. Then, the Python and HTML/CSS/JS dependencies must be installed. Finally, you must configure the application and initialize the database.

Clone with Submodules

To clone this repository with submodules included, run the following:

git clone --recurse-submodules https://github.com/jonkensta/ibp.git

Meeting Dependencies

All of the Python dependencies must be installed as given in the requirements file. It is recommended that these be installed in a virtual environment.

pip install -r requirements.txt

The above command requires that the python package manager pip is installed.

Next, from the root directory, install the static HTML/CSS/JS dependencies as follows:

cd ibp/static
npm install

The above command requires that the javascript package manager npm is installed.

Configuration

Next, you will need to set the configuration for your development or production configuration files. To do this, set both the secret_key and apikey variables in the [server] section to distinct passwords that you keep secret. Then, go to the Google Developer's Console and create development or production credentials. The resulting IDs and keys need to be stored in the ID and secret variables in the [google] section.

Initialization

Finally, you will need to initialize the database and create an authorized user. This is done using Python as follows:

import ibp
ibp.db.create_all()

user = ibp.models.User(email='your_email@your_email.com', authorized=True)
ibp.db.session.add(user)
ibp.db.session.commit()

Development

After going through each of the installation steps, you can run the server in development mode on your local machine by doing the following:

FLASK_ENV=development python run.py

By default, this will load the interface on localhost port 8000.

Deployment

Coming soon ...

About

Inside Books Project database web interface

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 45.6%
  • Shell 31.0%
  • HTML 23.0%
  • Mako 0.4%