Skip to content
master
Switch branches/tags
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

PSLab Webapp

This repository holds the code for the PSLab Webapp to enable students to access the Pocket Science Lab (PSLab) open hardware platform and other equipment through the Internet.

Build Status Mailing List Gitter Twitter Follow

The goal of the PSLab Webapp is to create a virtual lab that can give students remote access to Pocket Science Labs and other equipment in laboratories via the internet without having to be physically present near the equipment. PSLab is a tiny pocket science lab that provides an array of equipment for doing science and engineering experiments. It can function like an oscilloscope, waveform generator, frequency counter, programmable voltage and current source and also as a data logger. Our website is at https://pslab.io

Buy

Communication

Development Goals of PSLab Webapp Virtual Lab

A virtual lab interface can give students remote access to equipment in laboratories via the internet without having to be physically present near the equipment. The idea is that lab experiments can be made accessible to a larger audience which may not have the resources to set up the experiment at their place. Another use-case scenario is that the experiment setup must be placed at a specific location which may not be habitable. The capabilities of the Pocket Science Lab can be increased significantly by setting up a framework that allows remote data acquisition and control. It can then be deployed in various test and measurement scenarios such as an interactive environment monitoring station.

Deployments

Introductory blog posts

Structure

Backend

The virtual lab will be hosted using Python-Flask, which is a BSD Licensed microframework for Python based on Werkzeug and Jinja 2 . It will use sqlalchemy to interface with databases containing user credentials and data. At present, postgresql will be used.

The repository has been integrated with Heroku, and modifications to the master branch are automatically deployed to pslab-stage.herokuapp.com after the CI build passes

Frontend

The frontend code resides in a subdirectory called frontend . It is Designed with EmberJS , and a production build is automatically deployed to pslab-remote.surge.sh by the CI if the build is successful.

Installing dependencies

Setting up PSLab is really easy. The steps are:

  1. Ensure you have the following dependencies to setup PSLab:
  • Python3/2
  • Git
  • Nodejs
  1. Clone the pslab-webapp repositary via git.
 git clone https://github.com/fossasia/pslab-webapp.git && cd pslab-webapp/
  1. Install all Python packages in requirements.txt
pip install -r requirements.txt
  1. Install the frontend dependcies as well
cd frontend/
npm install

Running the app locally

gunicorn app:app This launches the API server on default port 8000

cd frontend ember -s environment='development' this launches the the emberjs webapp on port 4200

navigate to localhost:4200 in your web browser

Implemented features

  • backend

    • homepage hook
    • SignUp hook
    • SignUp database updation procedure
    • SignIn hook
    • SignIn database verification
    • User script page hook
    • Store, Edit, View, Delete user submitted code snippets
    • Execute a function string
    • Execute a code snippet
    • Create object oriented apps
  • New Frontend based on EmberJS

    • Home Page
    • Navbar with bootstrap styling
    • sign-up page
    • sign-in page
    • user-home.html. Feature to Create and Store code snippets. Execute function strings
    • Create/Edit/Delete/Execute Python scripts. Embedded ace-js code editor.
    • Display object oriented applications
    • Plot data with the integrated JQplot library

Old resources

This project was moved from another repository, and in order to browse the various issues and PRs, the following links may help