Inspiration
There has been a lot of talk recently about a study published in Nature last week, which surveyed Californian EV owners and found that one in five went back to internal combustion after bad experiences with electric. Their chief reason was the hassle of charging. This has of course been picked up by journalistic publications as evidence that EVs are problematic. However, there are some obvious issues with the reasoning, and the study on which it is based. Charging an EV publicly is more hassle than putting fuel in an internal combustion car, but is it really such a dealbreaker? So the problem revolves around EV charging stations and booking a charging slot as EV batteries take 2 hours to 4, 8,10, 20 hours to charge per EV battery model and slow vs fast EV charger.
What it does
We built an app where EV owners can pre book a slot for charging their EV, pay online as well as in person using a card or by scanning QR Code.
How we built it
We built the front end using React and the backend using Java SpringBoot. React frontend deployed in AWS using AWS Amplify service. Backend also deployed in AWS cloud using Elastic Beanstalk. We are using a mysql database to store data.
Challenges we ran into
Rahul based at USA and Nicholas based at Nigeria and myself inIndia. As team members are from different geographic areas. So time zone was the issue. I had to take a sync up call at 2.00 AM IST. to keep the hackathon work going.
Accomplishments that we're proud of
We accomplished a lot through this project, in putting our knowledge and experience in backend and front end development to create something that is truly impactful in society
What we learned
We learned how to use a digital wallet in an application and created a mobile application that solves a real world problem. New aspects in terms of the front end include using the Google Maps API. We also learned how to integrate Square Bookings API, Cash App Pay, and Checkout API
What's next for Chargify
Next, we want to expand Chargify to a wider range other than just the United States and allow them to make larger transactions and manage multiple vehicles at the same time
Square Application ID: sandbox-sq0idb-uonINeTlY7QlKSvV8MRI_g
Link to live application link: https://main.d1szdosrzk8nmr.amplifyapp.com
Note: Please note this application is best viewed in Mobile view(in browser)
Steps to access:
- Login with below credentials : hackathon2022@gmail.com
- Then enter OTP 123456 to login successfully
- Then enter zip code 85281
- Navigate to Google map page
- Click on Charging station icon(in Red color)
- Click on Book button
- Select Connector
- Click Book Timeslot
- Select vehicle
- Select date and duration for charging your Electric vehicle
- Then click on Book in confirm popup window
- Do payment using Checkout api, Cash App pay or wallet payment method
- After successful payment you will navigate to the Charging history/Bookings page.
- Also view menu which has options - Profile, My Garage, My Wallet and My reservations etc.
App History
- We have developed wireframes multiple times and then redesigned wireframes as well
- We had developed a sign up and login page only.
- We could not proceed to developing next screens/pages
Category submitting into:
- Checkout API
- Cash App Pay
- Bookings API release
Features: We have developed all pages and features in this Square hackathon. It includes -
- Google map page,
- Charging station search feature,
- Booking a charging slot
- Viewing already booked charging slot
- Payment using Checkout Api, Cash App Pay or Wallet.
- Booking a charging slot using Square Booking Api
- A profile page
- My Garage page/My vehicles page
- My Wallet page
- My reservations/bookings page
Features in detail: Role - EV Owner
Feature 1 - Sign up page:
- POST /api/auth/v2/signup
- Name
- Mobile number with country code
Feature 2 - Login page
- POST /api/auth/v2/signin
- Mobile number
Feature 3 - OTP verification
- POST /api/otp/generate
- POST /api/otp/validate
- Field to enter OTP
- Also a resend option
Feature 4 - Edit Profile page
- POST /api/users
- mobile number - Read only
- Email - Read only
- Name
- Add address
- Address line 1
- Address line 2 8.City - Drop down 9.Zip Code
- State - Drop down
- Country - Drop down
Feature 5 - Capture Vehicle details page
- POST /api/vehicle
- Vehicle brand - Drop down
- Vehicle model - Drop down
- Battery capacity - Drop down
- Charging port type - Drop down
Feature 6 - Search nearby station page / flow
- GET /api/station/all
- Show EV charging stations on Google map
- User clicks on a specific EV charging station
- User gets nearby stations with available time slot both already booked and free slots
- User selects a slot based on below type/options(or show below options) Option - Full charge, % charge and Based on hours 2, 4, 6 etc.
- Once slot selected/clicked, user gets a slot confirmation page/message
- Once user confirms then navigates to payment page with below payment options
- Online payment using Square Checkout Api POST - /api/transaction and /api/transaction/confirmation
- Cash App Pay POST - /api/transaction
- Wallet pay POST - /api/transaction
- Once payment done then user gets payment confirmation page
Feature 7 - Charging history
- GET /api/transaction
- User can see vehicle charging history
- A table with below fields
- Date
- Units consumed
- Hours spent
- Amount paid
- Mode of payment
- Link to download invoice
Feature 8 - Wallet page
- POST /api/wallet
- User can add balance in wallet
- While adding money to the wallet, the user should navigate to the payment page with below payment options:
- Online payment using Square Checkout Api
- Cash App Pay
- Wallet pay
- User shall view wallet balance
Add station - POST /api/station
Java Sdk: We have used below Java Sdk to create client to make call to Checkout, Cash App Pay and Bookings Api
<dependency>
<groupId>com.squareup</groupId>
<artifactId>square</artifactId>
<version>23.0.0.20220817</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.9.0</version>
</dependency>
Link to open Api specification / Swagger file: http://polling-app-server-dev2.us-west-2.elasticbeanstalk.com/swagger-ui.html#/
Log in or sign up for Devpost to join the conversation.