4. Final Report - Jeff-Stapleton/SportScheduling GitHub Wiki
I. Functionality
This site is designed to help people find and organize pick up basketball games. Players create and account by signing on with their facebook credentials. When a user logs in with facebook, we store relevant information in our database. Players can then browse facilities that are in the database to find one they like. Once a facility is selected they can view all the courts that facility has to reserve. The player picks a court that is suitable to their needs and then is presented with a calendar to book the specific time. The player picks a time. Once a time is click a modal window appears and asked the user to set a duration for the reservation. The player can then view events to see all the games they started as well as games that are open to the general public. The player can view and edit their profile.
Above is an screenshot of the home page. This is the page the user sees after logging in. From this screen the user can view all the facilities in the database and pick one that suits their fancy. These facilities exist in the database. Once a user enters this page we pull from the database and dynamically create “facility boxes” for each city in the database. Here we just query the facilities name and the facility profile picture. This page is responsive. If you shrink the window the “facility boxes” will eventually reduce to one in each row.
Once a facility is selected the user can then browse all courts that facility has to offer. The courts exist in the database. When a user selects a facility, we query the database and find all the courts that facility has and dynamically creates “court boxes” for each court. From the database we pull the court name and the court picture. This page is also responsive. The middle column will shrink as the browser window is resized. Also the “court boxes” will eventually reduce to one a row when the window is small enough.
Once the court is selected the user will be brought to this page. Unfortunately we were not able to connect this page to the back end and associate it with the specified court. This page features an interactive calendar that is dynamically created. Based on what days and hours the facility is open. This page also offers a responsive design. When the page is resized and become narrow the middle column shrinks. The table however features a side scrolling when it gets to small ensuring the the user will always be able to easily navigate the calendar.
When a time is selected on the calendar this modal window will pop up. This is where the user can specify how long he would like to reserve the court. The user selects the from the drop down 1, 2, 3 or 4 hours. Unfortunately this calendar is not connective to any calendar in the backend. The selection is parsed and the index of the table is found. Once a specific calendar is connected it will be able to accurately update it.
II. Database Schema
For our backend we used Nodejs, MongoDb, and Mongoose. MongDB is a document based database. We created models inside the app/model folder that provided the structure for our database. We had four models: Court Schema: { name: String, facId: String, image: String } The Courts were tied to a specific facility (facId).
Facility Schema: { name: String, hours: String, phone: String, id: String, image: String, url: String }
Game Schema: { name: String, location: String, fbUserId: String, start: String, end: String, people: Number, courtId: String, open: Boolean, image: String }
The Games were tied to a user through their fbUserId and also a court through the courtId.
User Schema: { firstName: String, lastName: String, email: String, phone: String, fbUserId: String, loggedIn: Boolean }
III. Future Roadmap
There were a lot more features that we would have loved to finish and add if we had the time and know how. Now one in our group had an experience with anything relating to web development, so it was a great and slow learning experience
We definitely would have loved to be able to associate the courts page with the correct court in the database. A related feature is then we would be able to associate the calendar with the correct court. This would have allowed users to easily create games and share them with others. While this it is still very much possible to create games, one must know the appropriate API calls in order to achieve it at this point.
One of the big features we would have like to add was the ability to share new created games with your friends on facebook. This would actually allow user to use the site for its intended purpose of advertising your game and getting your friends to join. This would have been an easy feature to implement since we initial had the ability to simply share the website in the very early stages of development. Since we were not able to connect courts, we never were able to implement social sharing
A feature that would have gone a long ways in terms of usability would have been the ability for facilities to sign up and join the site. As of now, There is no graphical interface to allow facility owners the ability to add their facility to the database. This would have made the site self sufficient in the fact that facilities would add themselves along with pictures of their court and building. Users then could browse and reserve times to organize basketball games. This would have been a massive undertaking that potentially doubles the work load. It was never realistic to finish this feature in the allotted time but as for the future, it would be a very nice addition.