Portfolio / Projects / SooQna

SooQna

سوقنا

A marketplace for smart electronics in Bahrain, where the listings are checked by AI and the money waits in escrow.

ActiveSenior projectPrices in BHDEnglish and Arabic
Category
Marketplace, 11 kinds of smart device
Built with
Flutter, Supabase, Google Gemini
Course
ITCS498 Senior Project, University of Bahrain, 2025 to 2026
Team
Mahdi Haji and two teammates, supervised by Dr. AbdulFattah Salman

Summary

Buying a used phone should not need a leap of faith.

General classifieds list everything from cars to jobs and leave trust to the two people involved. SooQna narrows the scope to smart devices and builds trust into the flow: photos are checked before they appear, payment sits in escrow until the buyer is happy, and ratings only unlock after a real deal.

PhonesLaptopsTabletsSmart watchesGamingAudioCamerasTVsSmart homeAccessoriesComputer parts
Home feedHome feed in the light theme

Listings and AI checks

Every photo is checked before anyone sees it.

When a seller posts, the text goes through a moderation check for scams, spam and prohibited items, and each photo is sent to a vision model that decides whether it really shows a smart device, whether it is safe, and whether it is clear enough. Pick a photo to see the check run.

Listing checkExample output
  1. Check the file: size up to 20 MB, and the real type from its first bytes (JPEG, PNG or WebP)
  2. Screen the title and description for scams and spam
  3. Ask the vision model about device type, safety and clarity
  4. Upload the photo and mark it validated

Model verdict


                

  • Only photos marked validated are ever shown in the feed, so a rejected image never leaks into search.
  • The key for the AI service lives in a server function. The app never holds it.
  • If the AI service is over quota or down, the check fails open, so sellers are not blocked by an outage.
  • Listings can be fixed price or an auction, with a payment option of cash, card, or either.
Create post formProduct detail

Auctions and wallet

Bidding holds your money. Being outbid gives it back.

Every bid reserves that amount in your wallet, so a winning bidder can always pay. When someone outbids you, the hold is released immediately. Try it against two rival bidders who each have a hidden limit. Set an auto-bid ceiling and the system keeps raising your bid for you.

PlayStation 6 console, 2TBLive auction
41:16:53
BD 925.000Leading: mahdawe
BD
BD

Wallet

Total (BD)1,240.50
Available (BD)1,240.50
In escrow (BD)0.00

Ledger

    • A bid must beat the current highest, and your available balance must cover it. With an auto-bid, it must cover the ceiling.
    • Quick buttons raise by 1, 5 or 10 BHD, and a database function validates each bid against the current highest.
    • When the auction ends, a server function converts the winner's hold, pays the seller and marks the item sold.
    • The price, bids and timer update live on every phone watching the auction.
    Auction detailMy bidsWallet

    Offers and checkout

    A deal is not done until the buyer has tried the item.

    Buyers can buy now, make an offer in private chat, or bid. Whatever the route, paying through the app puts the money in escrow, and there is a two-day inspection window before it reaches the seller.

    AgreeOffer accepted, or buy now. The wallet must cover the price.
    EscrowThe amount is held. The item is marked sold.
    InspectThe buyer has two days to try the item.
    ReleaseConfirm, or let the period pass, and the seller is paid.
    DisputeOpen a complaint with photos. An admin refunds in full, in part, or rejects.
    • Cash or card. Cash deals show a clear disclaimer about who is responsible. Card payments use the wallet, which can be topped up and withdrawn.
    • Offers inbox shows pending, accepted and rejected offers to the seller, and the buyer's own sent offers.
    Offers inboxMy purchasesPayment disputes (admin)

    Chat and trust

    Reputation you can only earn by completing deals.

    • Chat per listing. Photos, replies to a message, read receipts, and times shown in Bahrain time. The chat list loads in two requests however many chats there are.
    • Ratings. One to five stars and a comment, one rating per pair of users, and only after a completed transaction. A database trigger keeps each user's average up to date.
    • Profiles and follows. Public profiles show listings, followers and rating. Notifications are typed and colour-coded: offers, bids, follows, refunds, ratings, sponsorships.
    • Reports and complaints. Anyone can report an item, a user or a transaction. Complaints can include evidence photos.
    • Feed that learns. Views, saves, offers and purchases shape the recommended items, with trending as the fallback.
    Chat with a sellerSeller profileNotifications

    AI assistants

    Ask about an item, or ask what price to set.

    The shopping assistant does not guess. When a question sounds like a product question, in English or Arabic, the app first looks up matching live listings by category, price range and condition, and gives the model that data to answer from.

    • Ask AI on a listing. Starts a chat that already knows the item's title, price and description.
    • Sellers can ask what price to put on their own item.
    • Support assistant answers how-to questions with suggestion chips, such as how to create a listing or buy an item.
    • History. Chats are saved as sessions you can reopen, and can include images.
    AI assistant answering about an itemAI chat historySupport assistant

    Sponsors, roles and admin

    Three kinds of account, and an admin who can step in.

    RoleWhat they do
    UserBrowse as a guest, or sign in to buy, sell, bid, chat and rate.
    CompanyA business account that signs in through the same screens and uses the same app.
    AdminA separate dashboard: reports, payment disputes, sponsorship requests, user management and analytics.
    • Sponsored listings. Users and companies can sponsor a listing. Pick a package, pay from the wallet, and optionally upload a banner within the size and duration limits. An admin approves it, and banners are shuffled so no sponsor always sits first.
    • Disputes. Admins review the evidence and release a full refund, a partial refund or reject the claim.
    SponsorshipsAdmin dashboardUser management

    How it is built

    No server of our own: the app talks to Supabase.

    Screens call services, and services call Supabase tables, database functions, realtime channels and storage. The only server-side code is a handful of small edge functions that call Gemini for chat, support and moderation. Flutter's own state is enough: three providers handle theme, language and the unread badges, and everything else is local to the screen.

    115Dart files, about 59k lines
    ~20database tables
    2languages, with right-to-left layout
    4AI edge functions in use
    FlutterDartProviderSupabasePostgreSQLRealtimeStorageEdge Functions (Deno)Google GeminiGitHub Actions
    Honest status. Automated tests are minimal: the repository has a single widget test. The hand-written translation table and the service layer are tidy but not covered by tests.
    Home in ArabicDetail in the light themeWallet in Arabic

    Team

    A senior project for the Department of Computer Science, College of Information Technology, University of Bahrain, academic year 2025 to 2026. All screens on this page are the real app, rendered with demo data and generated illustrations.

    AS
    Dr. AbdulFattah Mahmood Abdulrazzaq SalmanProject supervisor
    MH
    Mahdi HajiFull-stack developer
    HS
    Hussain Ali Abdulhussain ShughulFull-stack developer
    AA
    Abdulaziz Abdulhadi Mohamed AlsakranFull-stack developer