The API and admin dashboard I built for a Saudi real-estate investment platform: verified investors, a wallet, investments and returns paid on a schedule.
Sanad is a real-estate investment platform in Saudi Arabia. Investors verify their identity through Absher, top up a wallet, buy units in income-generating properties and receive their returns in the same wallet. As a part-time full-stack engineer, I built its API and its admin dashboard.
Sanad at a glanceInvestorsInvestor appWebsiteOperations teamAdmin dashboardthe API · one back endInvestor APIWebsite APIAdmin APIinvestors andadmins sign inseparatelymore than ten domains,each behind a contractSecurityUsersBanksOpportunitiesRolesSettingsContentLocationsFinance · wallet ledgerInvestments & returnsAbsheridentity verificationPayment gatewaysonline paymentsSMScodes and confirmations;in testing, a team chatthe money pathsare covered by testsDatabaseQueue for messages
Three front ends share one API, and the money lives in two domains at its centre.
The wallet ledgerone investor’s wallet, oldest movement firstmovementwhere it movesbalance afterDeposit+bank account to walletInvestment−wallet to investmentFees−wallet to investmentReturn+returns to walletWithdrawal−wallet to bank accounteach movement pointsto the one before it,and carries the balanceafter itthe database writes thelink and the balanceitself, on every movementthe wallet’s balance isalways its last movementevery movement also reads as one line, in Arabic or English
Each movement points to the one before it, so a balance is always the end of a chain.
The application never writes a balance: it only adds movements, and the database keeps every wallet in step with them.
Investing in one stepInvestorpicks the unitsenters the codesent by SMSone transaction · all or nothingchecksthe code is rightthe investor is verifiedthe opportunity is openenough units are leftwithin the investor’s limitsthe wallet covers it allchangesreservethe unitsrecord theinvestmentdebit thewallet + feesconfirmationby SMSunits and moneyalways changetogetherif any check fails, nothing changes,and the investor is told why
Every check runs before anything changes, and every change happens together.
Returns for every investoran opportunity’s lifeSoonAvailableOfferingcompleteProfitdistributionLiquidationcompleteCompletedinvestors buy unitsreturns are paid1 · A return plana fixed amount or a percentagepaid once, monthly or yearlybetween a start and end dateit can change until thefirst period is paid2 · A schedule1234…each period’s return,split per unit sold3 · Paying a periodan admin confirms their passwordand records a profit or a losseach investor gets units × shareone transaction, one ledger row each
The plan is set once; paying a period is one confirmed action that pays every investor.