Skip to content
Hikki-devPublic

About

Crowd-sourced supermarket price comparison for Dubai shoppers. Flutter app, admin web portal and Node/Prisma API.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

253 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DealSouk

CI Flutter Node Postgres Firebase Moderator console Shopper app

Shoppers in Dubai share what things cost on the shelf, so everyone can see the cheapest supermarket before they leave home.

The DealSouk home page on a desktop: best prices near you, a daily challenge and a share-a-price card

You search for an item and see its price in every nearby store, with how fresh each price is. When you spot a price on a shelf, you take a photo and earn tokens. Tokens turn into supermarket vouchers.

Nobody orders anything here. DealSouk only helps you decide where to go.

It works on phones, tablets and desktops, in English and in Arabic, and the text can be made larger for anyone who needs it.

On this page

What you get

There are three parts. Each does one job.

Part Who it is for What it does
Shopper app Everyone Compare prices, find stores, share prices, earn rewards
Moderator console The team Check shared prices, stop fraud, hand out vouchers
API The apps One safe place for the data, the sign-in checks and the token counts

For shoppers

  • Search for an item and see its price in every nearby store. Prices older than 72 hours are marked as old.
  • My list: put your shopping in one list and see which store is cheapest for the whole basket.
  • Scan a barcode to find a product straight away.
  • See stores on a map, with their prices and how the price has moved.
  • Share a price with a shelf or receipt photo. Ask for a price too, or answer someone else's request.
  • Earn tokens, daily challenges, streaks and badges. Climb the monthly leaderboard. Swap tokens for supermarket vouchers.
  • Works in English and Arabic (right to left), with a text size setting, and keeps working offline.

For moderators

  • Approve, change or reject each shared price, with the photos next to a checklist.
  • Review flagged prices. A price hides itself after three different people flag it.
  • Warn, suspend or ban a user. Every action is written to an audit log.
  • Manage products and users, approve vouchers, import voucher stock.
  • See analytics and a map of where prices come from. Export CSV and PDF.

What it is built with

Flutter logoFlutterOne app for phones, tablets and the web, in English and Arabic
Dart logoDartThe language Flutter is written in
Node.js logoNode.jsRuns the API: sign-in checks, photo checks and the token counts
Prisma logoPrismaTalks to the database safely, with typed queries
PostgreSQL logoPostgreSQLKeeps the products, prices and users (hosted on Neon)
Firebase logoFirebaseSign-in, photo storage and push alerts
Vercel logoVercelHosts the shopper app and the moderator console as two websites
GitHub Actions logoGitHub ActionsRuns the checks on every change

How everything fits together

The shopper app and the moderator console both talk to one API. The API keeps the data in Postgres, and uses Firebase to know who you are, to store photos and to send alerts. Every photo is cleaned and scanned before anyone sees it.

Diagram: the shopper app and moderator console talk to the API, which uses Postgres, Firebase and the photo checks

Here is the journey of one price, from the shelf to everyone's phone:

Diagram: a shopper shares a photo, it is cleaned and scanned, a moderator checks it, it goes live for 72 hours and the shopper earns tokens

The longer version, with the folders and the code behind each step, is in How it works and How a price travels.

Try it first

The app, step by step

Every screen below is a real picture of the app. Phones are on the left and desktops on the right where both exist. Click a picture to see it full size. Every design, side by side with the file that builds it, is in Screens.

1. Welcome

Welcome screen on desktop: a Dubai Marina photo on the left and sign-in options on the right

Sign in with Google, Apple or a phone number, or look around as a guest. You agree to the privacy policy once, before you start.

On a phone the photo sits on top and the buttons are underneath.

The first time you open the app, a five-slide tutorial shows what it does. You can skip it, and you can watch it again from your profile.

2. Home

Home shows the best prices near you, a daily challenge, and a button to share a price. The search box and the barcode button are always on top.

3. Search

Search on desktop with category and freshness filters on the side

Type a product and pick a category or how fresh the price must be. Sort by lowest price, nearest or freshest. On a desktop the filters sit on the side.

4. One product, every store

Product page on desktop with a table comparing stores

The product page lists every store with its price, how far away it is and how old the price is. The cheapest price is green. A chart shows how the price moved. You can add the item to My list from here.

5. Scan a barcode

Point the camera at a barcode. If the camera does not work, you can type the number instead.

6. The map

Map on desktop with a list of stores beside it

Stores near you appear as pins with their logos. Tap one to see its prices. On a phone the store list slides up from the bottom of the map.

7. My list

My list on desktop with the cheapest basket card and a store comparison

Add the things you plan to buy. DealSouk shows the cheapest store for the whole basket and how much more every other store costs. It also tells you when a price on your list drops.

8. Share a price

Sharing takes four short steps: choose the store, choose the product, enter the price, then add a photo as proof. Nothing is lost if you are offline. It is sent when the connection comes back.

You can also ask for a price. Other shoppers see the request and can answer it, and both of you earn tokens.

9. Rewards

Rewards on desktop: token balance, voucher progress, daily challenge and the leaderboard

Approved prices earn tokens. A bar shows how close you are to the next voucher. Daily challenges, streaks and badges give extra tokens, and the monthly leaderboard shows who shared the most.

10. Profile and settings

Profile on desktop with your stats, vouchers and settings

Your profile shows your level, your tokens, your vouchers and your past prices. Settings let you change the language and the text size, replay the tutorial and read the privacy policy.

On a phone

Five screens from steps 1, 2, 5 and 8 above, left to right. Click a picture to see it full size.

Welcome screen on a phone The five-slide tutorial Home on a phone: search, offers, share a price card, categories and best prices near you Barcode scanner with a frame to line up the barcode
1
Welcome
2
Tutorial
3
Home
4
Scan a barcode
First step of sharing a price: choose the store
5
Share a price

Made for everyone

DealSouk is built for ages 14 to 65.

  • Big targets. Every button is at least 48 pixels tall, so it is easy to hit.
  • Words with colours. A status is never shown with colour alone. It always has a word or a symbol too.
  • Text size. Profile, Settings lets you pick Standard, Large or Extra large. Screens are tested at 160 percent text.
  • Arabic. The whole app flips to right to left, and prices show as ٩٫٥٠ د.إ.
  • Any screen. A bottom bar on phones, a side rail on tablets and a top bar on desktops.

Home in Arabic with the largest text size The map on a tablet with a side rail

The colours, sizes and parts are written down in Design system.

The moderator console

Moderator console on desktop: a sidebar, three counters, the pending list and a review panel

On a desktop the console has a sidebar. On a phone the same sections are in a menu.

  1. Price moderation. Pick a price on the left. On the right you see the photos, a checklist and how reliable this person has been. Approve, edit or reject.
  2. Map density. See where prices come from.
  3. Analytics. How many prices, users and tokens over time.
  4. Voucher queue and stock. Approve voucher requests and import new voucher codes.
  5. System settings, products and users. Change thresholds, manage the catalogue, warn, suspend or ban.

Export CSV copies the current list so you can paste it into a spreadsheet.

New accounts are shoppers. To make someone a moderator, follow Moderator access.

Run it yourself

You need Node 20 for the API and the Flutter SDK for the apps. The short version:

# 1. The API
cd backend
npm install
cp .env.example .env        # then fill in the keys
npx prisma generate
npx prisma migrate dev
npm run dev

# 2. The shopper app (in a second window)
flutter pub get
flutterfire configure
flutter run --dart-define=API_BASE_URL="http://localhost:3000"

# 3. The moderator console
flutter run --dart-define=API_BASE_URL="http://localhost:3000" --dart-define=ADMIN_MODE=true

Every step, every setting and what to do when it fails is in Getting started.

Putting it online

Two websites are built from this one project. They differ by one setting, APP_MODE.

Vercel project Setting Shows
deal-souk APP_MODE=admin (default) The moderator console
deal-souk-shopper APP_MODE=shopper The shopper app

The API runs on Render. Android builds come from GitHub Actions. Publish a release and both .apk files are attached to it. The full checklist, including the one Firebase setting that people forget, is in Deploying.

Your privacy and safety

  • Phone numbers are encrypted in the database.
  • Every photo is stripped of its location data and scanned for viruses before anyone sees it.
  • Every moderator action is written to an audit log. Moderators can be required to use a second sign-in step.
  • Every token change is written in a chain that can be checked later, so tokens cannot be quietly changed.
  • Write requests are rate limited.

Please report a security problem privately. How is in SECURITY.md. The full review is in SECURITY_AUDIT.md and the pre-launch list is in SECURITY_CHECKLIST.md.

Help and more reading

Photo credits

  • Font: Readex Pro, SIL Open Font License, bundled in the app. One family covers Latin and Arabic.
  • Dubai Marina: Norlando Pobre, CC BY 2.0. Vegetable market: Ithra Dubai, CC BY-SA 4.0. Carrefour UAE: CC BY-SA 4.0, Wikimedia Commons. Dubai Creek: public domain. Burj Khalifa and dunes: Wikimedia Commons, free licences (the individual authors still need to be added).
  • The same credits appear in the app under Privacy and Terms.
  • Maps: © Mapbox, © OpenStreetMap contributors.
  • The market photo shows a real person and has no confirmed model release. Replace it before launch.

About

Crowd-sourced supermarket price comparison for Dubai shoppers. Flutter app, admin web portal and Node/Prisma API.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages