It’s Finished!

After many months and many long days, my capstone for the MITxPro Coding Bootcamp is finally finished!

I used my frontend Bad Bank website and added a backend and database to it. Specifically, I created the backend using ExpressJS and NodeJS, and incorporated a MongoDB database. I deployed my frontend and backend on Heroku and my database as a serverless MongoDB instance on Mongo Atlas. This sounds so much easier than it felt at the time!

For the backend, the ExpressJS web framework worked great and I used NodeJS to build my APIs. I used POST to create accounts by sending information through the body. Rich explained that using a POST request would also make querying for users safer, so I used that to return user information as well. When updating information I used the HTTP PUT verb and for getting all accounts, I used the GET verb.

To help abstract the data from the logic, I wrote functions for the Data Access Layer, or DAL. This was by far the most difficult part. I used MongoClient to connect to my MongoDB serverless instance where my database was deployed. I had several connection issues, but finally figured out that Heroku needed the MongoDB environmental variables to facilitate the connection. This made it so that I only had to call the process.env when making the connection to the database URL. The next issue I faced was that the database return took longer than the API calls and this was interfering with my results. I had to make the DAL function async and await each and every part of the connection. This took a really long time to figure out and I ran out of time to add extra authentication and roles to the database like I wanted.

My first full stack application is now complete! Its a fully deployed and functional website which you can check out here! I had a great time making this application and I look forward to improving it in the future.

You can check out my GitHub repository for the code that created this beautiful application.

Real Time Boston Bus Tracker

What Does It Do?

This program identifies the locations of every bus in Boston using the Massachusetts Bay Transportation Authority website and uses markers to identify them on a Boston map. Every 15 seconds, the program updates the location of each bus by pulling the longitude and latitude from the MBTA data.

Originally, the program only identified the location of one point on the map with a given longitude and latitude. I updated this program to pull data from the MBTA website to provide real-time locations of their city bus locations.

Try It Out!

Load the index.html file in your browser. Every 15 seconds, the markers will update based on the current location of MBTA buses.

What I Could Improve

This program would be even better if the map could predict the next stop for each bus along with tracking the data. The MBTA provides the schedules for the busses and this change would make the map more useful for a traveler in Boston.

Check out this repository and try it out!

PacMan Game

For this MITxPro challenge, we were tasked with making a game that factory produced PacMen. Then we had to make the PacMen bounce off the walls continuously. To challenge myself, I made the PacMen chomp as the moved across the screen. Then I made them face the direction of their movement while chomping.

What I Found Challenging

My program isn’t perfect by far. The chomping toggle doesn’t work perfectly. I wasn’t sure what the best method was to loop through the images, but I was able to make it work pretty well with the `imageChange` function and a `setInterval` function. I will come back to this program and see if I can make it work smoother in the future.

If you have any suggestions or advice to make my program better, I’d love to hear your thoughts. Check out my GitHub Repository for this challenge.

# PacMenGame