Skip to content

tam1411/EPL-Card-Reader-Interface

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EPL-Card-Reader-Interface

The capstone project for Portland State Universities EPL Card Reader project. An interface an admin can interact with to verify or update student's "trained" status for various ECE machines in ECE labs. It will offer portability and flexibility so that it may be used across multiple labs at PSU.

Per the Sponsor's request: The EPL is seeking a streamlined check in system for students entering the lab. This system would build on the previous ECE capstone RFID badge reader system sponsored by the EPL. At check in, on scanning their student ID, the user interface displays an iconographic grid indicating wether a student is trained to use various equipment categories around the lab. The icons would change color to indicate status.

This system would also facilitate and track safety waivers and emergency contact status for quick retrieval by an EPL manager in case of emergency. EPL managers will be able to mark a person as trained (per icon) in the system.

This system should be easily reconfigurable in the UI for different shops around campus.

I would guess that it may make the most sense to host on a local server. I would however, like to make it easy to stand it up on a PC with the UI pointed at the 127.0.0.1:x so that it could have a standalone mode as well.

Pending hardware specs, currently planning on the following framework:

  • Server webdev in Python using the Flask framework.
  • An SQL database via SQLAlchemy
  • Bootstrap Flask for a front end UI display

Building

  1. First, make sure your enviroment has Python 3 installed with your preferred package manager or download from: https://www.python.org/downloads/

  2. Clone this project down:

    $ cd your/project/directory/here
    $ git clone https://github.com/ZYostSass/EPL-Card-Reader-Interface.git
    
  3. Create your virtual enviroment:

    # In a bash compatible shell
    $ python3 -m venv venv
    # In powershell
    > py -3 -m venv venv
    
  4. And run the application:

    $ ./run.ps1
    

Day to day development

The run.ps1 script is very simple. It uses the polyshell template to:

  • Activate your enviroment, so pip doesn't clutter up your $PATH
  • Install all the depencies listed in requirements.txt. This is very fast as pip only checks for new packages.
  • Run any pending database migrations
  • Runs flask in debug mode, so that the web app automatically updates as you write code

This should make it so that this project 'just runs' every time on unix-compatible shells.

If you need to add a dependency from pip, add a new line to requirements.txt with the dependency name, exactly as you would write it for a normal pip install, as soon as someone else pulls down your changes we'll all have the dependency installed immediately.

Updating the database

Changing any of the models in the database requires a _migration_ to update the database's schema on disk. These migrations are mostly autogenerated for us but there are limitations, particularly around renaming.

In order to update the database, first modify the associated classes, then run:

# In Bash:
$ flask --app web_app/webapp.py db migrate -m "Describe the migration here"
# In Powershell:
> flask --app web_app\webapp.py db migrate -m "Describe the migration here"

This will add the associated scripts to the migrations folder. Note that these are not live reloaded, and so you need to restart the run script.

For more detail, read the associated docs

About

The capstone project for Portland State Universities EPL Card Reader project. An interface an admin can interact with to verify or update student's "trained" status for various ECE machines in ECE labs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors