Code Monkey home page Code Monkey logo

iris's Introduction

GitHub commit activity language DeepSource Languages GitHub issues code style: prettier License

IRIS - Space Electronic Warfare Sandbox

A stand-alone training platform for Space Electronic Warfare. The application has a "Student front-end" as well as an "instructor front-end." Users have their own "session/game" that the instructor creates and students join. Each "game" has its own unique id. Games exist as standalone objects that can be "spun up" from the database.

The student makes choices given the unique problem set presented and can take action to "jam" electronic signals.

The interface responds if the student chooses the correct setting to jam the signal.

The problem set is presented as a visual representation of electronic signals that force the student to perform the analysis they are trained for.

Table of Contents

Setting up a Local Copy

git clone https://github.com/thkruz/iris        #Clone the github files.
cd ./iris/                                      #Switch into the directory.
docker compose up -d                            #Start the docker containers.

Versioning

We use SemVer for versioning.

DeepSource

We are using DeepSource for static code analysis. It will automatically scan the dev branch and continuously find and fix security vulnerabilities, performance issues, and more.

You can see the current results here:https://deepsource.io/gh/thkruz/iris/.

Tests

Unit/Functional

Currently we are using Jest for ui unit and functional tests that should ideally cover at least 80% of the functions. All of these tests can be run using:

cd ./ui/
npm run test

End-To-End

For end-to-end (E2E) testing we will be using the cypress framework. This is on the to-do list.

Security

For security testing we are using SonarCloud automatically in the CI/CD pipeline.

Contributors

License

Copyright (C) 2022 Theodore Kruczek

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Full License

iris's People

Contributors

bigbpete avatar bjhufstetler avatar deepsource-autofix[bot] avatar deepsourcebot avatar dependabot[bot] avatar filmo003 avatar jeff-haddock avatar shaneaskins avatar thkruz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iris's Issues

Shared Environment

  • As Spec Snuffy, when I’m transmitting, I want the instructor to be able to see it so that they can evaluate my performance.
  • #12

Backend

  • It should have GET and POST for the /signals endpoint to add and grab data to/from the db
  • It should have GET and POST for the /users endpoint to add and grab data to/from the db
  • It should return the response in JSON format
  • Update the wiki API page with response body examples
  • Update seed to clear the authors table before running.

Frontend

  • It should display student signals as a different color than noise and instructor signals so that instructors can see each student's signal
  • It could display signal and student data by hovering over a student signal.

Component Structure

  • As Mr. Programmer, I want to layout the general structure of the program UI by adding and organizing component files.

  • As Mr. Programmer, I want to ^^^ by making a theme component.

CRUD Functions

We need to add CRUD functions so that the instructor can modify the starting signals for everyone.

Student modifications to their transmitter should be pushed to the database in addition to emitted via websocket (otherwise a page refresh will delete everything)

Instructor Page

  • As Capt Gruff, in the students window I want to see a list of teams with their rosters so that I know which students are on each team.
  • As Capt Gruff, in the students window I want to see a list of students who have not been assigned to a team so I know who is unassigned.
  • As Capt Gruff, in the students window I want to be able to click the ‘add’ button next to a team then click students to add them to the team until I click the add button again to stop adding so that I can quickly assign teams or swap team members.
  • As Capt Gruff, in the students window I want to see a list of my broadcasts in a row next to each team so that I can see each teams’ progress at a glance.
  • As Capt Gruff, in the students window I want the broadcast icons to change color or somehow reflect whether or not they are active, passive, or active and being jammed.
  • As Capt Gruff, in the students window I want to see a list of antennas for each team and their current properties so I can quickly tell when and how each team is broadcasting.
  • As Capt Gruff, in the students window I want to be able to click on a broadcast icon to toggle it between active and passive.

Receiver Window

  • As Spec Snuffy, in the receiver window, I want to be able to select the antenna, center frequency (with dropdown for unit), span (with dropdown for unit), and modulation (with dropdown) so I can configure my receiver.
  • As Spec Snuffy, in the receiver window, I want to be able to toggle on and off the receiver with a power button and I want a pop-up to warn me when I’m turning it on if I’m transmitting on that antenna because I can’t receive while I’m transmitting.
  • As Spec Snuffy, in the receiver window, I want to see a clear video feed when I’ve configured my receiver correctly and the signal is not being jammed so that I know I’ve done things correctly.
  • As Spec Snuffy, in the receiver window, I want to see a distorted video when I’ve configured my receiver correctly and the signal is being jammed so that I know I’m jamming the signal.
  • As Spec Snuffy, in the receiver window, I want to see a static video when I’ve configured my receiver incorrectly so that I now I’ve messed up.

Heroku Deployment

  • As Mr Programmer, I want to be able to deploy to heroku, so that I have a public facing application

New About Modal

Add a new about modal to include BSDI origins and other contributors.

Github Pages URLs

github.io deployment assumes everything is under /iris/ but create-react-app assumes everything is under /. Need to find a way to resolve this without breaking Heroku deployment since any production build will likely be under root.

Separate websockets into 'Games'

As a student/instructor, I want to create a game that is 'independent' of anyone else's game.

Socket.io has the ability to create 'namespaces' that we can use to separate out websockets. That way updates in one game are independent of updates in another game and we don't get 'crosstalk'

Transmitter Window

  • As Spec Snuffy, in the transmitter window I want to be able to add multiple transmitter configurations that show up as tabs so I can prepare potential broadcasts to be accessed on demand.
  • As Spec Snuffy, in the transmitter antenna window, for each transmitter configuration, I want to be able to select the antenna using a drop down menu so I don’t input a bad value.
  • As Spec Snuffy, in the transmitter signal generator window, for each transmitter configuration, I want to be able to select the frequency (with a drop down for unit), amplitude, symbol rate, mode (with a drop down), modulation (with a drop down), sweep center frequency (with a drop down for unit), sweep hop width (with a drop down for unit), sweep rate (with a drop down for unit), hop rate so I can get the correct signal generated.

Header

  • As Spec Snuffy, when I visit the site I want to see a banner at the top with the name of the app so I know I’m in the right place.
  • As Spec Snuffy, I want only the header and login dialog box visible when I first visit the site so I can quickly access what I need in that moment.
  • As Spec Snuffy, in the header I want a logout button to be easily recognized so I don’t have to search to be able to log out.
  • As Spec Snuffy, in the header I want to see my team name once it’s been assigned so I can quickly see who I’m working with.
  • As Spec Snuffy, in the header when I click my team name, I want to see the names of my team members so I know who I’m working with.

Create Seed Data

As an instructor, I need initial seed data to create a server/session/game

AC

  • It should have, uh, data? I guess?

Knex errors when running docker-compose up on local machine

When running docker-compose up on a freshly cloned repo, knex does not install causing the build for the backend to fail. Research different ways to resolve this and implement any changes as needed.

  • It should be able to run docker-compose up without knex errors on a clean clone

Task: create framework for cypress tests

Add Cypress to the project to enable integration tests.

  • It should have Cypress folders created in the UI directory
  • It should have Cypress added to the package.json

Bug: Fix receiver updates

When the receiver receives an update in box 0, it updates all 4 receivers at the same time. Updating values in any of the other boxes don't update anything, even though the update function is called. Compare to Tx implementation, there may be a mismatch somewhere.

Injects Window

  • As Capt Gruff, in the injects window I want to be able to add as many broadcast signals as I want by clicking on a plus-tab icon so that I can easily understand how to add configurations.
  • As Capt Gruff, in the injects window I want to see all of my configurations as a list of tabs so that I can quickly choose between them.
  • As Capt Gruff, in the injects window I want to be able to type the name, center frequency (with dropdown units), span (with dropdown units), amplitude, modulation (with dropdown), source (with dropdown), and video source (with dropdown) so I can easily set up the configuration.
  • As Capt Gruff, in the injects window I want to be able to click save and type a save name into a popup dialog to save all of the current broadcast configurations so that I can quickly rebuild the current environment.
  • As Capt Gruff, in the injects window I want to be able to click a load button and select a save file from a dropdown in a popup dialog so I can quickly restore saved configurations.

Implement Websockets for Backend

As Spec Snuffy and or Capt Instructor, I want to see the same data regardless of which browser/UI instance that I am using.

Jeff has recommended https://github.com/socketio/socket.io and potentially a queue service like Rabbit MQ or Redis to synchronize things across all UI instances.

REST requests from the UI can likely all be handled in the files under /ui/src/context. IE, when a user submits a change on their transmitter, it updates their UI's context in txContext.jsx where it can then perform the PATCH request, and upon receiving a 200 response can send an update task to redis/rabbitmq for the rest of the frontends to pull from and update their respective contexts with a GET to the DB.

@thkruz I believe you worked with web sockets on your last project. We will probably need your help implementing this.

  • When Spec Snuffy changes a value in the transmitter box and transmits, Capt Instructor and any other student should be able to see the new value on their UI instances.
  • Any Patch request from the UI should be met with an update to displayed values across all applications.

Update API Endpoints As Per New Schema

The DB schema has been updated with lots of new tables. Create API endpoints for interaction.

  • It should have at least a GET endpoint for each table
  • Wiki is updated with new endpoints
  • Investigate how to implement "instructor only" endpoints. Session cookies?

TASK: Create backend skeleton

Create basic backend and DB design to support frontend development.

  • It should be dockerized
  • It should deploy with docker-compose up without any issues

Redesign DB schema

DB schema needs to be redesigned to reflect new input from squadron.

  • Migrations updated to new schema
  • XML updated with changes
  • Wiki updated with changes

Antenna Functionality

  • As Spec Snuffy, in the antenna window I want to be able to configure my antennas by selecting an antenna, then selecting from a list of targets and enabling an ‘auto-track’ feature so that I can choose which target it is engaging.

User Login

  • As Spec Snuffy, I want to be able to click the ‘create an account’ dialog to open a popup that lets me create an account with a user id, password, and student role so I can login.
  • As Spec Snuffy, I want to be able to reset my password if I forget it.
  • As Spec Snuffy, I want to be able to login to my own account that has my configurations saved for me so that I can quickly pick up where I left off.
  • As Spec Snuffy, when I login, I want to be taken to a page with a Spectrum analyzer, antenna configuration, transmitter, and receiver visible so I can see everything at once.
  • As Capt Gruff, I want to be able to click the ‘create an account’ dialog to open a popup that lets me create an account with a user id, password, and instructor role so I can login.
  • As Capt Gruff, when I login, I want to be taken to a page with a students window and an injects window so that I have everything I need right in front of me.

Transmitter Modem

  • As Spec Snuffy, in the transmitter transmitter modem window, for each transmitter configuration, I want to be able to select the frequency (with drop down for unit), power, and modulation (with a drop down) so that I can set up my transmitter easily.
  • As Spec Snuffy, in the transmitter transmitter modem window, for each transmitter configuration, I want to be able to turn on and off my rf emissions with a toggle switch and I want to be warned with a pop-up when I try to turn it on so that I don’t accidentally radiate bad transmissions.
  • As Spec Snuffy, in the transmitter transmitter modem window, I want to see a power light turn green when I’m transmitting that configuration and red when I’m not.

Spectrum Analyzer

  • As Spec Snuffy, in the Spectrum analyzer window, I want to see a power vs frequency graph
  • As Spec Snuffy, in the Spectrum analyzer window, I want the power vs frequency graph to tell me the center frequency and span so that I know what I’m looking at
  • As Spec Snuffy, in the Spectrum analyzer window, I want to be able to click the frequency button, type a number, then select a unit from the menu window so that I can change the center frequency of the graph
  • As Spec Snuffy, in the Spectrum analyzer window, I want to be able to click the span button, type a number, then select a unit from the menu window so that I can change the span of the graph
  • As Spec Snuffy, in the Spectrum analyzer window, I want to be able click the mode button so that I can toggle between Spectrum analyzer and apsk graphs.
  • As Spec Snuffy, in the Spectrum analyzer window, I want to be able to click the trace button and select the type of trace I see in the Spectrum analyzer window so that I can better understand the data.
  • As Spec Snuffy, in the Spectrum analyzer window, I want to be able to click the marker button and have a marker appear no the graph.
  • As Spec Snuffy, in the Spectrum analyzer window, I want to see the current frequency and amplitude of the marker on the graph so that I can use it as a reference.
  • As Spec Snuffy, in the Spectrum analyzer window, I want to click the left and right arrow buttons to move the marker around the graph so that I can get information from multiple points.
  • As Spec Snuffy, in the Spectrum analyzer window, I want to be able to click the reset button to restore the Spectrum analyzer to it’s default values.
  • As Spec Snuffy, in the Spectrum analyzer window, I want to be able to select an antenna to connect to the Spectrum analyzer so that I can use the carrier-under-carrier function.
  • As Spec Snuffy, in the Spectrum analyzer window, I want to be able to click carrier-under-carrier to show what the Spectrum looks like without my broadcast.
  • As Mr. Programmer, in the Spectrum analyzer window, I want the logic for drawing the spectrum analyzer results to be class based and standalone

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.