This is the repository for Senior Project (Final Year Project) of Computer/Software Engineering (BS) in San Jose State University.
- Yi Cong Ch'ng (Melvin)
- Alexis Cheung Ho
- Cherie Sew
- Timothy Wu
Student group developed a system (hardware and software) to provide a guarantee parking spot for garage user. System includes microcontrollers with cameras, image recognition API to analyze license plates, Rails Web App with reserve and pay for a parking spot online or in garage, scalable Rails API App for REST API calls from microcontroller and Web App, statistics of parking garages, real time notification for garage administrator when a license plate is mismatched, and E-mail notification for users and administrators.
- Mobile and user friendly front end
- Dynamic update without redirecting
- Registration
- Session (login and logout)
- Forgot Password
- Email Authentication
- User Profile (basic information with vehicle information and license plate)
- [Admin Only] Is a Garage Owner
- Email & Text Notification System
- Notify user if booking their booking due soon
- Notify user if there is an upcoming booking
- Online Booking
- Payment System
- Choose Garages from Google Map
- Booking History
- QR Code generation
- Receive E-mail on a successful booking
- Check-in page (for online user)
- Get a spot (for drop-in user)
- Search for Parking Spot based on Booking ID
- Payment System
- Check-out page
- Garage Dashboard
- Real-time notification system based on Garage (ActionCable)
- Admin receive E-mail on license plate mismatch
- Query booking information (HTTP GET) based on garage and time
- Query and resolve notifications (HTTP GET & HTTP POST) based on garage
- Process license plate information from HTTP POST request
- Capture license plate and store on onboard storage
- Send license plate picture to OpenALPR for (HTTP POST) license plate recognition
- Send license plate information (HTTP POST) to Rails backend for processing
Below are the major components of the system. Not all the diagrams are provided as our system is pretty huge.
A complete garage system (hardware and software) solution that is based on Web Application.
An algorithm to assign a spot to user.
An algorithm to check if the license plate received from HTTP POST request from micro controller matches the result in database.
- Ruby on Rails
- Materialize Framework
- PostgreSQL
Below is part of gems that assist the development for our Web Application.
- gravatar_image_tag
- abracadabra (fork and modified for Material Design)
- cocoon
- jquery-inputmask-rails
- hashids
- rqrcode
- geocoder
- gmaps4rails
- gon
- simple_calendar
- stripe
- jquery-rails
- jquery-turbolinks
- jquery-ui-rails
- materialize-sass
- material_icons
- devise
- redis
- bcrypt
- pg
- better_errors
- rails_db
- rack-mini-profiler
- OpenAPLR API
- Python
- JSON
- ActionCable
- Redis
- RESTful API
- Qoddi PaaS
- Google Maps
- Coffeescript
- JQuery
- Javascript
- Gmail SMTP
- SendGrid
- Scheduler
- Intel Edison
- USB Camera
- Barcode Scanner
- Tablet Computers
- Battery
- Ruby 2.6.10
- Rails 5.1.7
- Clone this repository
- Install all the packages by using
bundle install
command. - Start the server with
rails s
command.
- A flashed Intel Edison
- Python 2.7
- Ultrasonic sensor
- Camera
- Clone this repository
- Add packages for opkg
$ vi /etc/opkg/base-feeds.conf
- Copy paste these links into the opened vi file
src/gz all http://repo.opkg.net/edison/repo/all
src/gz edison http://repo.opkg.net/edison/repo/edison
src/gz core2–32 http://repo.opkg.net/edison/repo/core2-32
src intel-iotdk http://iotdk.intel.com/repos/3.0/intelgalactic/opkg/i586
- Update opkg
$ opkg update
- Install camera package
$ opkg install kernel-module-uvcvideo
- Run the following command
$ wget https://bootstrap.pypa.io/get-pip.py --no-check-certificate
$ python get-pip.py
- From the cloned repository
$ cd sparking/edison
- Run the program and follow the instructions
$ python -m application.sparking
- Install any missing python package
$ pip install <package_name>
The server code is under sparking/
In the following structure, we will only highlight the most important directories
.
├── app # Application specific code (Uses MVC structure)
│ ├── assets # Directory for JS & CSS
│ │ ├── javascript # JS code
│ │ └── stylesheets # CSS code
│ ├── controllers # Has the logic between the model and view
│ | └── api # API Controller
│ ├── models # Stores all model related code
│ └── views # Directory for HTML files
├── config # Initialize set values for website
│ └── routes # Defines the URL structure of the website
├── db # Database related files
│ ├── schema # Generates database tables
│ └── seeds # Populates database with preset entries
└── script # Ruby scripts to test API endpoints
The edison code is under sparking/edison/
.
├── application # Holds high level abstract code (application specific)
│ └── sparking # Smart Parking application logic
├── component # Device specific logic
│ ├── camera
│ ├── checkLicensePlate
│ ├── led
│ ├── openAlprApi
│ ├── sparkingEdison
│ └── ultrasonic
├── images # Directory to store images
├── lib # Directory to store custom libraries
└── wrapper # Lowest level logic
├── api
├── edison
└── sensor
We do not provide tech support to anyone that tries to run our code Ruby on Rails code. This is due to there are too many constraints that are set within the code and relies on a lot of dependencies. Not all of the features available in this application are illustrated in the animated gif below.
Description | API Server | Host |
---|---|---|
Regular Server | Link | Qoddi |
API Server | Link | Qoddi |