Inspiration

I'm very passionate about front-end and back-end development and APIs/webdev in general. I had worked with QR codes in the past and wanted to create a project that combined these skills.

What it does

QRoom is an application that allows schools and businesses to track how people spread throughout the building and concentration of people. It can be useful during the pandemic as a tool to enforce social distancing and mitigate the spread of Coronavirus.

How I built it

The backend API was built with node.js with ExpressJS and hosted on a Glitch server. The frontend application was built for Android devices using https://appinventor.mit.edu/ and interfaces with the API through HTTP web requests. Logging in to QRoom stores a 1-day random token as a cookie on the device which is sent in the request for authentication.

Challenges I ran into

I was originally planning to build this application as a Web App, but I ran into some issues when attempting to scan QR codes through a web browser due to issues when scanning on different devices. I also was planning to build this app for the iPhone with XCode but don't currently own a new enough macOS device.

I also ran into some issues with storing the people in a room and which room a person is in at the same time, which were resolved.

An example of a rooms.json file might look like this:

{
 "buildings": {
  "jmk": {
   "owner": "jmkdev",
   "rooms": [
    {
     "name": "Bedroom",
     "people": []
    },
    {
     "name": "Computer Desk",
     "people": [
      "jmkdev"
     ]
    },
    {
      "name": "Hallway",
      "people": []
    }
   ]
  }
 },
 "userRooms": {
  "jmkdev": {
   "building": "jmk",
   "room": 1
  }
 }
}

In this example, user "jmkdev" is present in room 1 (Computer Desk) of building "jmk".

The accounts.json file is essentially just a key-value dictionary of usernames and passwords, so I won't show it here. The authenticated.json file is essentially another key-value array of random session tokens along with creation date, username, and enabled property.

Accomplishments that I'm proud of

I am proud of the login feature of the application as it works very well and persists across multiple application sessions (reopening the application does not log you out).

What I learned

I improved my skills with both JSON and backend development. I was in a bit of a rush, so some code on the back-end is messier than I would like it, but it'll be cleaned up in the future.

What's next for QRoom

After it is submitted to this competition, I will work on it more as a standalone tool and expand its features.

Built With

Share this project:

Updates