- Users can view all ongoing auctions (both authenticated and unauthenticated are able to)
- An auction item consists of the following attributes:
- Title
- Description
- Base price
- Lastest bid
- Auction item image
- Remianing time
- Bid now button
- An authenticated user can place a bid on an item in the item details page
- Users who have already bid on a specific item will receive a notification (FCM push messsage) when they have been outbid
The application architecture follows the MVVM pattern (using ViewModels and LiveData) together with the repository pattern.
Since the app is using Firebase as the backend, the repository doesn't need to implement any caching mechanisms or communiate with a remote data source since Firebase SDK provides everything to effectively cache and manipulate data.
The application consists of 4 fragments :
- AuctionsList fragment (start)
- AuctionDetail fragment
- Login fragment
- Register fragment
The application uses two collections :
- registered_users collection stores the following attributes :
- Email Address
- User authentication ID
- FCM Token (used for push messages)
- Two flags (authenticated & created)
- auction_items collection stores the following attributes :
- Title
- Description
- Base price
- Auction item image url (images are stored in firebase storage)
- Remianing time
- Lastest bid amount
- User ID of the user who places the highest bid
- Bidding history (An array of maps storing records of each bid for a specific item)
- Timestamp (millis)
- Users Email address
- User ID
A cloud function trigger was implemented using Nodejs which listens to an update even on the auction_items collection. The itention of this function is to send push notifications to all the bidding participants for a specific auction item in the bidding history array (except the highest bidder) mentioning that they have been outbit by another user.
GIT Repo URL => https://github.com/RamithRD/CenticBids_CloudFunction
The cloud function is deployed to Firebase successfully.