# Abdelrahman Sami Freelance Flutter and full-stack developer in Egypt Your app, shipped end to end. Available for freelance projects Cairo, Egypt Available for projects in Egypt and the Gulf. Languages: Arabic and English. ## Services - Mobile apps: Flutter apps for Android and iOS, from the first screen to Google Play, with push notifications, maps, payments and offline-friendly flows. - Web platforms & dashboards: Next.js and React front-ends on a real backend: sign-in, roles, admin panels, reports and exports your team will actually use. - SaaS & e-commerce: Multi-tenant products with subscriptions and online payment through Kashier, built to run without me. - AI features: Vision, OCR and fine-tuned language models wired into your product, not left in a notebook. ## How we work - Brief: You answer a short questionnaire on Brieflet, my own brief platform: users, must-haves, budget, deadline. Nothing gets lost in chat threads. - Plan & design: Screens, data model and a fixed timeline with milestones, agreed before any code is written. - Build: Weekly demos on a live staging link, so you see progress every week and can steer early. - Launch & support: Store release, deployment and monitoring, and I stay on for fixes after launch. ## Contact and hiring - [Email: as0144549@gmail.com](mailto:as0144549@gmail.com) - [WhatsApp: +20 109 745 7086](https://wa.me/201097457086) - [Phone: +20 109 745 7086](tel:+201097457086) - [GitHub](https://github.com/abdelrahman-abozarifa04) - [LinkedIn](https://www.linkedin.com/in/abdelrahman-sami-866886248/) ## [Jaylak](https://abdelrahman-sami.vercel.app/projects/jaylak) Multi-Category Delivery Platform Food, pharmacy and grocery delivery for Ashmoun, Menoufia — a production platform I built end to end as six apps in one monorepo: a NestJS API, an admin operations dashboard, a merchant order PWA, a bilingual (AR/EN) landing site, and Flutter customer and driver apps. Every write that touches money or order state goes through the API, while clients read directly from Supabase behind row-level security on every table, over 60 ordered migrations. The API covers order dispatch to drivers, a money ledger with merchant settlements and reconciliation, promo codes and merchant offers, a weekly driver leaderboard with bonuses, phone-OTP sign-up through a signed SMS webhook, and idempotency keys on every money call. The admin dashboard runs a shared role matrix with TOTP-protected staff accounts; the landing site at jaylak.app pairs a 3D hero with GSAP and Lenis scroll motion. Releases ship through staged, rollback-ready deploy scripts, dependency and secret scanning in CI, and Shorebird code push for the mobile apps. - Client: Jaylak · Ashmoun, Menoufia - Role: Sole engineer: product, architecture, backend, web, mobile and DevOps ### The problem A local delivery business needed food, pharmacy and grocery ordering with real money flowing through it: merchants, drivers, settlements and promotions, not a demo. ### What I built - Six apps in one pnpm monorepo: NestJS API, admin dashboard, merchant PWA, bilingual landing site, and Flutter customer and driver apps - Every write that touches money or order state goes through the API with idempotency keys; clients read Supabase behind row-level security on every table - A money ledger with merchant settlements and reconciliation, promo codes, merchant offers and a weekly driver leaderboard - Phone-OTP sign-up through a signed SMS webhook, and TOTP-protected staff accounts with a shared role matrix - Staged, rollback-ready deploys, dependency and secret scanning in CI, and Shorebird code push for the mobile apps ### Results - 6 apps in production - 60+ ordered DB migrations - AR/EN bilingual, full RTL - Live jaylak.app ### Stack - NestJS - Next.js - Supabase (Postgres + RLS) - Flutter - TypeScript - pnpm Monorepo - React Three Fiber - GSAP - Docker - Vercel - [Live demo](https://jaylak.app/) ## [Tabaliy](https://abdelrahman-sami.vercel.app/projects/tabaliy) SaaS Inventory Management Platform Live SaaS inventory command center for Egyptian retailers — real-time stock, batch & expiry tracking, and barcode scanning across warehouses, in Arabic and English, with Kashier subscription billing built in. - Client: Egyptian retailers - Role: Full-stack engineer: product through deployment ### The problem Retailers track stock in notebooks and spreadsheets, lose money on expired batches, and can't pay for software with the payment methods they actually use. ### What I built - Multi-tenant SaaS: every shop is isolated, with its own warehouses, batches and expiry dates - Barcode scanning and real-time stock across warehouses - Subscription billing through Kashier, with signed webhooks and one locked transaction per payment - A fully bilingual Arabic / English interface ### Results - Kashier subscription billing - AR/EN bilingual - SaaS multi-tenant - Live tabaliy.xyz ### Stack - React - Supabase - Barcode Scanning - Kashier Payments - Bilingual (AR/EN) - [Live demo](https://tabaliy.xyz/) ## [Rakni](https://abdelrahman-sami.vercel.app/projects/rakni) Smart IoT Parking & Booking App Graduation project (Grade: A+). Real-time smart parking reservation & navigation for the Egyptian market — bilingual Gemini Vision OCR for license plates, live occupancy sync with physical camera sensors over a Django REST API, polyline map routing, animated 2D indoor navigation, and FCM notifications. - Client: Graduation project · ERU - Role: Lead developer: mobile, AI and backend integration ### The problem Drivers in Egyptian cities circle for parking with no idea where a free spot is, and parking operators have no live view of occupancy. ### What I built - Bilingual Gemini 2.5 Vision OCR reads Arabic and English license plates - Live occupancy synced from physical camera sensors over a Django REST API - Polyline map routing and animated 2D indoor navigation - Reservations with FCM notifications, on the web and in a native Flutter app ### Results - A+ graduation grade - IoT real camera sensors - 2 platforms: web + Flutter - Live rakni.xyz ### Stack - Flutter - Dart - Firebase - Django REST API - Google Maps SDK - Gemini 2.5 Vision API - CustomPaint - [Live demo](https://rakni.xyz/) - [Source](https://github.com/abdelrahman-abozarifa04/rakni_v2) ## [Jaylak — Mobile](https://abdelrahman-sami.vercel.app/projects/jaylak-mobile) Flutter Customer & Driver Apps The two Flutter apps behind Jaylak, sharing one in-house package for theme, brand marks drawn with CustomPainter, widgets, an API client with idempotency keys, money formatting and maps. Customers sign in by phone OTP, browse shops and menus, build a basket, check out cash on delivery, follow their driver live on the map, and hand over a 4-digit delivery code at the door, with a wallet, reviews and push notifications. Drivers run shifts with background location, receive order offers over FCM and realtime, confirm deliveries by code, and track their wallet, history and weekly leaderboard. Both apps ship in Egyptian Arabic with full RTL — the customer app is on Google Play, and iPhone users run the same app as a web build with web push. - Client: Jaylak · customers & drivers - Role: Flutter engineer: both apps and their shared package ### The problem Customers and drivers in a small Egyptian city needed fast, Arabic-first apps that run on budget Android phones, and on iPhone without waiting for the App Store. ### What I built - One shared package for theme, CustomPainter brand marks, widgets, the API client with idempotency keys, money formatting and maps - Customer app: phone OTP, shops and menus, basket, cash on delivery, live driver tracking on the map and a 4-digit delivery code at the door - Driver app: shifts with background location, order offers over FCM and realtime, delivery confirmation by code, wallet and weekly leaderboard - iPhone users run the same app as a web build with web push ### Results - 2 Flutter apps - Play customer app on Google Play - iOS web app with web push - RTL Egyptian Arabic ### Stack - Flutter - Dart - Supabase - Firebase Cloud Messaging - Google Maps - Dio - Shorebird - RTL / Arabic - [Live demo](https://jaylak.app/) - [Google Play](https://play.google.com/store/apps/details?id=app.jaylak.customer) - [iOS web app](https://app.jaylak.app/) ## [Brieflet](https://abdelrahman-sami.vercel.app/projects/brieflet) Client Questionnaire & Brief Platform The platform I use before every freelance project: I create a project, define its questions, and send the client a public link with a 6-character access code. Answers land in Postgres and read back as a clean brief, exported on demand as .txt or .xlsx, with a Telegram ping on every submission. Whole question sets import from a spreadsheet in a single Postgres transaction, access codes are bcrypt-hashed, failed attempts are rate-limited per IP in the database, and every table runs forced RLS with no client grants — nothing reaches the data without an admin session or a verified code. - Client: My own product · used on every freelance project - Role: Solo: design, build and operations ### The problem Freelance projects go wrong when requirements live in scattered WhatsApp messages. I needed one place where clients answer structured questions before any work starts. ### What I built - Projects, sections and six question types, shared with the client as a public link and a 6-character access code - Answers autosave, then read back as a clean brief, exported as .txt or .xlsx - Whole question sets import from a spreadsheet in a single Postgres transaction - bcrypt-hashed access codes, per-IP rate limiting in Postgres, and forced RLS with no client grants - A Telegram ping on every submission ### Results - 6 question types - bcrypt hashed access codes - XLSX import & export - Live in daily use ### Stack - Next.js 15 - TypeScript - Supabase - Server Actions - SheetJS - Telegram Bot API - [Live demo](https://brieflet-neon.vercel.app/) ## [Pest Detection & Advisory](https://abdelrahman-sami.vercel.app/projects/pest-detection) Vision + Fine-Tuned LLM Multimodal pipeline combining a custom YOLOv11 model (96 pest classes) with a fine-tuned Phi-3 Mini SLM for automated expert treatment advice — scan a crop, get an instant diagnosis and an LLM-guided treatment plan. - Client: Agriculture · AI research - Role: AI engineer: model training and the app around it ### The problem Farmers can't identify crop pests quickly, and generic advice doesn't fit the exact pest on the exact crop. ### What I built - A custom YOLOv11 model trained on 96 pest classes - Phi-3 Mini fine-tuned with QLoRA and Unsloth to write treatment plans - One flow: scan a crop, get a diagnosis and an LLM-guided treatment plan ### Results - 96 pest classes - YOLOv11 custom-trained - Phi-3 fine-tuned SLM - Live web demo ### Stack - YOLOv11 - Phi-3 Mini - QLoRA - Unsloth - Roboflow - [Live demo](https://pest-detection-llm.vercel.app/) ## [Nabea](https://abdelrahman-sami.vercel.app/projects/nabea) Smart Education Assistant AI-powered education platform that reads student engagement and behavioral signals in real time — attendance, sentiment, and participation dashboards that help instructors act before students disengage. ### Stack - AI Analytics - Behavioral Insights - Education Platform - Bilingual (AR/EN) - [Live demo](https://ict-website-bice.vercel.app/) ## [ITI Admission Prep](https://abdelrahman-sami.vercel.app/projects/iti-prepare) Exam Prep Platform for ITI Admission Community-built prep hub for ITI's admission process — IQ, English, and Track exam simulators, curated study materials, and a live progress dashboard that counts down to exam day. ### Stack - Web Platform - Exam Simulation - Progress Analytics - Bilingual (AR/EN) - [Live demo](https://iti-preparation-guide.vercel.app/) ## [Rakni — Mobile](https://abdelrahman-sami.vercel.app/projects/rakni-mobile) Native Flutter App for Smart Parking The native mobile face of Rakni — nearby parking search, spot reservations, favourites, and booking history, built in Flutter and wired to the same live occupancy backend as the web platform. ### Stack - Flutter - Dart - Firebase - Provider - CustomPaint - [Live demo](https://rakni-v2-web.vercel.app/) - [APK](https://drive.google.com/file/d/1cCqqKrQAjgZb2Aa_JRdxqeIyPpwoMaJP/view?usp=sharing) - [Screen record](https://drive.google.com/file/d/1g4DEnu1iVm0eiKd5CnGsI5Wbwkf2JMSn/view?usp=drivesdk) ## [Vehicle Detection & Counting](https://abdelrahman-sami.vercel.app/projects/vehicle-detection) Real-Time Computer Vision Real-time pipeline that detects and tracks vehicles — cars, trucks, buses, motorcycles — crossing a virtual counting line in highway surveillance footage, assigning each one a persistent ID and rendering annotated, count-overlaid video output for traffic and congestion analysis. ### Stack - Python - OpenCV - Background Subtraction - Object Tracking - [Source](https://github.com/abdelrahman-abozarifa04/Vehicle-Detection-Counting) ## [Speech Emotion Recognition](https://abdelrahman-sami.vercel.app/projects/ser-system) Audio Signal Processing Extracts MFCCs, Chroma, and Mel-Spectrogram features from speech audio with Librosa, then classifies the speaker's emotional state — happy, sad, angry, neutral — using Scikit-Learn classifiers, with feature-distribution plots and a confusion matrix for evaluation. ### Stack - Librosa - Scikit-Learn - MLPClassifier - Random Forest - [Source](https://github.com/abdelrahman-abozarifa04/Speech-Emotion-Recognition) # A delivery app where every order nets to zero: building Jaylak's money ledger Jaylak is a food, pharmacy and grocery delivery platform in Ashmoun, Menoufia. Most customers pay cash at the door. Some pay by bank transfer before the driver leaves. Some pay part of the total with wallet coins. Some orders use a promo code, and the merchant pays for part of that discount. Some merchants deliver with their own driver, and some customers pick up at the counter. Every one of those cases moves money between four parties: the merchant, the driver, the customer and the platform. If I had put a `balance` column on each of them and updated it in the API, I would have to trust that every code path added and subtracted correctly forever. I did not want to trust that. So Jaylak has a double-entry ledger, and one rule that nothing is allowed to break. ## The rule: every order nets to zero When an order is delivered, the API writes one row per money movement into `ledger_entries`: | party | direction | reason | |---|---|---| | merchant | credit | `order_items` | | merchant | debit | `commission` | | driver | debit | `cash_collected` | | driver | credit | `delivery_fee` | | platform | credit | `platform_earnings` | `credit` means the platform owes that party. `debit` means the party owes the platform. On a normal cash order the driver owes the cash they collected, the merchant is owed the items minus commission, the driver is owed their delivery earnings, and the platform keeps the rest. Add the credits, subtract the debits, and the result must be exactly zero. The service checks that right after the insert, inside the same database transaction: ```ts async function insertBalanced(tx, orderId, entries) { const posted = await tx`insert into ledger_entries ${tx(entries)} returning direction, amount`; const net = posted.reduce( (sum, row) => sum + (row.direction === 'credit' ? 1 : -1) * piastres(row.amount), 0, ); if (net !== 0) throw new Error(`Ledger for order ${orderId} does not balance: ${net} piastres`); } ``` If the numbers do not balance, the error rolls back the whole delivery. The order stays undelivered and nobody's balance moves. A bug shows up as a loud failure on one order, not as a quiet drift in hundreds of balances that someone finds at the end of the month. ## Money is an integer The first bug in most money code is `0.1 + 0.2`. Jaylak never does arithmetic on floats. Every amount is converted to **piastres** (1 EGP = 100 piastres) and every percentage to hundredths of a percent, as plain integers: ```ts // "125.50" -> 12550. Throws on anything that is not a decimal with at most two places. export const piastres = (value: number | string): Piastres => parseHundredths(value, 'money'); ``` Percentages round half away from zero, the same way PostgreSQL's `round()` does, so the API and the database never disagree by one piastre about a commission. ## One rule, many payment shapes The real value of the zero-sum rule shows up when the business adds a new way to pay. Each new case is just a different set of rows that still has to sum to zero: - **Prepaid transfer to the merchant.** Nobody collects cash at the door. The merchant holds the whole total and hands the driver the delivery fee at pickup, so the merchant owes the platform the total minus that fee, and the driver owes the fee. - **Wallet coins.** The part paid from the wallet is a customer debit (`wallet_spend`). Whoever collects (driver, merchant or transfer) collects only the rest. Every other row is unchanged. - **Pickup or the shop's own driver.** No Jaylak driver is involved. The merchant holds the whole total and owes the platform its commission and fees. - **Promo codes.** The merchant's share of the discount is its own `promo_discount` debit, so the platform does not quietly absorb it. When wallet coins came later, the cash and transfer rows stayed exactly as they were. Wallet coins added one row type, and the balance check proves on every delivery that the other cases still add up. ## Freeze the numbers on the order A ledger is only as good as the amounts it reads. If a merchant changes their commission rate on Tuesday, an order placed on Monday must still settle at Monday's rate. Jaylak copies every amount onto the order when it is placed (items total, delivery fee, commission, the merchant's share of the discount, driver earnings, wallet amount), and the ledger only reads those frozen copies. ## Never post the same money twice Drivers lose signal. Phones retry. A driver tapping "Delivered" on a weak connection can send the request twice, and the second one must not pay anyone twice. Every endpoint that creates money or order state requires an `Idempotency-Key` header: a fresh UUID per user action, reused on every retry of that action. The key is inserted **in the same transaction** as the write it protects: ```sql insert into idempotency_keys (key, user_id, route, request_hash) values ($1, $2, $3, $4) on conflict (user_id, route, key) do nothing returning key; ``` - No row returned means another request already claimed this key. The API returns the stored response instead of running the write again. - Two requests that arrive at the same moment both try to insert. One wins and the other waits on the uncommitted row, then replays the winner's response. - If the write fails, the key rolls back with it, so a failed request never burns its key. - The key is stored with a SHA-256 hash of the request body. The same key with a different body is rejected, so a client bug cannot reuse one key for two different payouts. ## Corrections are new rows, not edits Ledger rows are never edited or deleted. A wrong charge is fixed with an **adjustment**: a new entry tied to the same order and party. Only the owner can post one, and every adjustment is written to the audit log. The history shows what happened and what fixed it. The only field that changes later is `settlement_id`. When a merchant or driver is paid out, their unsettled entries for that period are attached to one settlement with a gross, a deduction and a net. The index on `(party, party_id) where settlement_id is null` makes "what do we still owe this merchant?" a cheap query. ## What I would tell you before you build one 1. **Write the zero-sum check before the second payment method.** It costs a few lines and it catches the bugs you have not written yet. 2. **Keep money in integers from the first request.** Converting a live system later is painful. 3. **Freeze prices on the order.** A ledger that reads current prices settles yesterday's orders at today's rates. 4. **Make retries safe in the database, not in the client.** The idempotency key has to live in the same transaction as the write, or a crash between the two brings back the double payment. 5. **Append, never edit.** The day a merchant disputes a payout, the full history is the only thing that ends the argument. None of this is clever. It is a set of boring rules, and the database enforces each one, so every order in Jaylak's history adds up to zero. # One payment, two months: hardening Kashier subscriptions in a multi-tenant SaaS Tabaliy is a multi-tenant inventory SaaS for Egyptian shops: warehouses, batches, expiry dates and barcode scanning. Shops pay a monthly or yearly subscription through **Kashier**, an Egyptian payment gateway. The customer pays on Kashier's hosted page, and Kashier tells us about it in two ways: 1. A **browser redirect** back to our site with a signed query string. 2. A **server-to-server webhook** with a signed JSON body. The first version handled both in two Supabase Edge Functions, and each one did the obvious thing: read the payment row, and if it is still `pending`, mark it paid and extend the shop's plan. It worked in every test. Then I audited it like an attacker would, and found that "it works" and "it is safe to take money with" are two different bars. ## 1. Both callbacks arrive in the same second The redirect and the webhook routinely land within a second of each other. Both functions read the row, both saw `pending`, and both extended the billing period. **One payment, two months.** The fix was to move the decision out of the edge functions and into one Postgres function, `finalize_kashier_payment()`, which runs in a single transaction and locks the payment row first (`select ... for update`). It only activates on the transition `pending | failed → success`. Whichever callback loses the race waits on the lock, then sees `success` and returns `already_processed`. ## 2. Never trust the amount in the callback The paid amount in a callback came from outside. The one figure that never left our control is the price we stored when **we** created the checkout session, from our own pricing table on the server. The function compares the two, and any amount or currency mismatch moves the payment to a `review` status. It never activates. Plan, billing cycle and tenant also come from the stored row, never from the order ID string the callback sends back. ## 3. Unknown order IDs never activate anything If no payment row exists for an order ID, then our server never issued that checkout. The function does not activate a plan for it. It records a `review` row when it can identify the tenant, and the call is logged. ## 4. Check the signature on a fixed set of fields Kashier signs the webhook with HMAC-SHA256. The tempting bug is to build the signed string from whatever fields the payload contains. Then a forged payload simply leaves out the fields it cannot control. The verifier signs a **fixed** list of fields taken from Kashier's documentation: ```ts const EXPECTED_SIGNATURE_KEYS = ["merchantOrderId", "amount", "currency", "status", "transactionId"]; ``` The comparison is constant-time. A plain `!==` returns at the first wrong character, which tells an attacker how much of a forged signature was right. Read the signed set carefully. The `event` field is **not** in it, and only `data.status` is. An early version treated `event: "refund"` as a refund, so anyone holding a genuine signed `SUCCESS` payload could relabel it as a refund and expire a paying shop. Now only the signed status (`REFUNDED` or `VOIDED`) decides a refund. ## 5. Fail closed on test mode An unset or misspelled `KASHIER_MODE` used to fall back to `test` without a word. In production that creates sandbox checkouts whose callbacks then activate **real** plans. Now the mode must be exactly `live` or `test`, or the function refuses to run. The mode is also stored on the payment row, and a callback whose mode does not match the session we issued goes to `review`. ## 6. Pin the redirect URL The page Kashier sends the payer back to used to come from the request body. Anyone with a login could create a genuine checkout on our merchant account that sent the payer to their own site afterwards. That is a real payment page with our branding, handing the customer to an attacker. The redirect is now checked against an allowlist of our own origins. The same audit found that any team member, a read-only `viewer` included, could start a checkout. Billing is now limited to the owner and to members with billing permission. ## 7. Refunds have to take the time back Before the audit, any webhook after `success` was ignored, so a refunded shop kept its paid period. `refund_kashier_payment()` now marks the payment `refunded` and, **if that payment is still the one that set the shop's current period**, expires the subscription. If a later payment has already moved the period, it leaves the shop alone and flags the refund for manual review. I chose "expire" over "pull the end date back one period" on purpose. It is simpler, and it can never leave paid time in place after a refund. The trade-off is written down in the migration, and the previous end date is saved so an operator can restore it by hand. ## The bonus bug: upgrades that stacked The activation function used to add the new period on top of the current end date. That is right for a renewal. On a plan change it let a shop buy one year of the cheap plan, then one month of the top plan, and get **thirteen months** of the top plan. Now a renewal of the same plan extends from the later of now and the current end date, and a plan change starts from now. ## What I took from it - **Put the money decision in the database.** Edge functions are stateless and run in parallel. A row lock in one transaction is the simplest way to make two callbacks agree. - **Trust only what you stored.** Price, plan, tenant and mode come from your row, never from the callback. - **Know exactly which fields are signed.** Anything outside the signature is user input. - **Fail closed.** A missing secret or mode should stop the function, not quietly pick a default. - **Unclear cases go to review.** A `review` status and a human beat an automatic guess with someone's money. None of these were in the happy-path tests. I found them by asking, for every line, "what if someone sends this on purpose?" That question is the most useful part of payment work. # Fixing a Flutter app without waiting for Google Play: setting up Shorebird the careful way Jaylak has two Flutter apps: one for customers and one for drivers. When a driver app has a bug at 8 pm on a Friday, waiting a day or more for a store review is not a small problem. Orders are still coming in. **Shorebird** adds code push to Flutter. You build your store release with Shorebird, and later you can send a **patch**, new Dart code, that installed copies download in the background and run on the next launch. No store review is needed for Dart-only changes. A system that can change code on every user's phone in minutes is also a system that can break every user's phone in minutes. So the work was not "add the package". The work was making a patch hard to send by accident and easy to take back. > Where this stands: both Android apps have signed Shorebird baselines registered and verified on an > emulator in CI, and the patch workflow is merged. A real patch on a physical device, with a > rollback, is the next step. This post is about the setup, not a war story about patches. ## Decision 1: two apps, two identities, two keys The customer and driver apps are separate Shorebird apps with separate IDs. Each one has its **own patch signing key**. The public key is built into the baseline release, and the private key never goes into the repo. It lives in an encrypted local store and in GitHub environment secrets, and only the release environments can read it. A signed patch means a leaked Shorebird token is not enough to push code. Without the private key the app rejects the patch. And with separate keys, a customer-app patch cannot reach drivers by mistake. ## Decision 2: every patch goes to staging first The patch workflow has four separate operations, and each one does one thing: | Operation | What it does | |---|---| | `validate` | tests and a dry-run build, uploads nothing | | `stage` | uploads a signed patch to the **staging** track only | | `promote` | moves **that same patch** to `stable`, without rebuilding it | | `rollback` | stops serving a patch and records what users should fall back to | `promote` is the important one. It never rebuilds, because a rebuild is a different binary from the one you tested. It takes the patch ID, the source commit and the device test record, checks that all three belong to the same app, platform and release, and then promotes that exact patch. "Promote the latest patch" is not an option on purpose. ## Decision 3: pin everything a patch depends on A Shorebird patch has to match the release it patches, so the workflow pins every input: - The **Flutter version** of each baseline is fixed and recorded (3.41.2 here), not "whatever CI has today". - The **Shorebird CLI version** is pinned too. Pinning the GitHub Action to a commit is not enough, because the action downloads a CLI on its own. - The **source commit** is a reviewed SHA, never a branch that can move while the job runs. - The **production config** comes from the stored release config, not from a dev file or a secret that changed since the baseline. ## Decision 4: the app never waits for the updater Updates download in the background on the default `stable` track. There is no "updating…" screen, and the app is never force-restarted in the middle of an order or a delivery. For debugging, the app reads the current patch number **locally**, with a 250 ms timeout, and adds it to every Sentry event: ```dart Future readCodePushPatchTag({PatchIdentityReader? reader}) async { try { final source = reader ?? _RuntimePatchReader(); if (!source.isAvailable) return 'unavailable'; // web, debug, or no Shorebird engine final number = await source.readCurrentNumber().timeout(const Duration(milliseconds: 250)); return number?.toString() ?? 'base'; } on Object { return 'unknown'; } } ``` It never calls the network, never downloads anything and never blocks startup. When a crash report comes in, I can see whether the phone was running the store release (`base`) or patch 3, which is the first question you ask once code push exists. Web and debug builds never create the updater, so the normal Flutter workflow is unchanged. ## What the setup actually caught - **A full disk, not a broken build.** The first Android release failed on CI. The cause was the runner running out of disk during Gradle/R8. Shorebird was fine. Freeing space fixed it. - **Windows security policy.** Windows Application Control blocked part of Shorebird's Dart tooling locally. I did not weaken the policy. Release builds run on Linux in GitHub Actions. - **Emulator noise.** The first startup checks showed ANR dialogs from the launcher. I gave the emulator more memory, skipped the Google setup wizard and added a check that the app window really has focus. After that, both apps passed the startup check without a rebuild. - **iOS is a separate project.** iOS signing, distribution profiles and a real iPhone are not set up yet, so iOS is deferred instead of half-configured. Each app on each platform gets its own release record, because the same version number does not mean the same patch on both. ## If you are about to add code push 1. **Sign your patches from the first baseline.** You cannot add the public key to installs that already exist. 2. **Stage, then promote the exact same patch.** Never rebuild between testing and release. 3. **Pin Flutter, the CLI and the source commit.** A patch built on a different toolchain is a gamble. 4. **Know which patch crashed.** Put the patch number in your crash reports before you need it. 5. **Practice the rollback before the emergency.** A rollback you have never run does not count as a plan. Code push does not replace store releases. Native changes, new permissions and new plugins still go through Google Play. What it gives you is a fast, signed and reversible way to fix Dart bugs while orders keep coming in. # عبد الرحمن سامي مطوّر Flutter ومنصات ويب في مصر أطوّر تطبيقك من الفكرة لحد الإطلاق. متاح لمشاريع فريلانس القاهرة، مصر متاح للمشاريع في مصر والخليج. اللغات: العربية والإنجليزية. ## الخدمات - تطبيقات موبايل: بطوّر تطبيقات Flutter لـ Android وiOS، من أول شاشة لحد النشر على Google Play. بضيف الإشعارات والخرائط والدفع أونلاين حسب احتياج المشروع، وبراعي إن التطبيق يشتغل كويس مع النت الضعيف. - منصات ويب ولوحات تحكم: ببني منصات بـ Next.js وReact، وبجهّز لفريقك تسجيل الدخول والصلاحيات ولوحة الإدارة والتقارير وإمكانية تصدير البيانات. - SaaS ومتاجر إلكترونية: ببني منصات SaaS ومتاجر تقدر تديرها بنفسك، مع اشتراكات لأكتر من عميل ودفع أونلاين عن طريق Kashier. - الذكاء الاصطناعي في التطبيقات: بضيف لتطبيقك ميزات زي قراءة النص من الصور بـ OCR والتعرّف على العناصر فيها، أو أدمج نماذج لغة مدرّبة على بياناتك. ## خطوات الشغل - نفهم طلبك: بتجاوب على استبيان قصير على Brieflet عن فكرة المشروع، ومين هيستخدمه، وإيه المطلوب، والميزانية والميعاد. كل التفاصيل بتبقى في مكان واحد. - التخطيط والتصميم: بنتفق على الشاشات والبيانات ومواعيد كل مرحلة قبل ما أبدأ التنفيذ. - التنفيذ: كل أسبوع ببعت لك لينك لنسخة تجريبية عشان تتابع اللي اتنفّذ وتقولّي على أي تعديل بدري. - الإطلاق والدعم: بنشر المشروع على المتاجر أو السيرفر حسب نوعه، وبتابع معاك بعد الإطلاق لو ظهر عطل. ## تواصل معي - [البريد الإلكتروني: as0144549@gmail.com](mailto:as0144549@gmail.com) - [WhatsApp: +20 109 745 7086](https://wa.me/201097457086) - [التليفون: +20 109 745 7086](tel:+201097457086) - [GitHub](https://github.com/abdelrahman-abozarifa04) - [LinkedIn](https://www.linkedin.com/in/abdelrahman-sami-866886248/)