How lasitharanathunga/safedeal-escrow-platform- works
SafeDeal is a web escrow platform for freelance contracts. The main user journey is to create or open a contract, coordinate milestone work and file previews, then complete payments as work is approved; the interface also supports account access and contract discussions. The client router connects pages to contract and payment loaders, while the Express app dispatches authentication, contract, file, and payment routes. README capabilities and directory names support the broader workflow, but unsampled handlers do not establish all client-to-server calls or payment-provider details.
Main entry points: App.tsx App router · index.ts Express API · authServices.ts Authentication service · db.ts Application database
Components 23
Client experience
- App router
client/src/App.tsx - Landing and access
client/src/containers/HomePage/LandingPage.tsx - Dashboard
client/src/pages/Dashboard.tsx - Payment completion
client/src/pages/PaymentComplete.tsx - Contract loaders
client/src/dataLoaders/contractLoaders.ts - Payment loader
client/src/dataLoaders/paymentLoaders.ts - API request layer
client/src/fetch/fetchWrapper.ts
Contract workflow
- Contract views
client/src/containers/Dashbord/Contract/Contract.tsx - Contract list
client/src/containers/Dashbord/ContractsList/ContractsList.tsx - Contract creation
client/src/containers/Dashbord/CreateContractDialog.tsx - Milestones and comments
client/src/containers/Dashbord/Contract/ContractTimeline/ContractTimeline.tsx - File exchange
client/src/containers/Dashbord/Contract/FileHandlingComponents/FileUpload.tsx - Payment flow
client/src/containers/Dashbord/Contract/PaymentComponents/Payment.tsx
Server API
- Express API
server/index.ts - Contract routes
server/contract/contractRouts.ts - File handling
server/handleFiles/fileHandler.ts - Payment routes
server/payment/payment.ts
Identity and data
- Authentication routes
server/auth/authRouts.ts - Authentication service
server/services/authServices.ts - User repository
server/repositories/userRepository.ts - Refresh-token repository
server/repositories/refreshTokenRepository.ts - Application database
server/db/db.ts
Other components
- Client or freelancer
Connections 24
- Client or freelancer → App router: uses
- App router → Landing and access: routes to
- App router → Dashboard: routes to
- App router → Contract list: routes to
- App router → Contract views: routes to
- App router → Payment completion: routes to
- App router → Contract loaders: loads contracts
- App router → Payment loader: finishes payment
- Contract loaders → API request layer: requests data
- Payment loader → API request layer: requests data
- Client or freelancer → Contract creation: creates contracts
- Client or freelancer → Milestones and comments: tracks progress
- Client or freelancer → File exchange: exchanges files
- Client or freelancer → Payment flow: pays milestones
- Express API → Authentication routes: dispatches
- Express API → Contract routes: dispatches
- Express API → File handling: dispatches
- Express API → Payment routes: dispatches
- Authentication routes → Authentication service: uses
- Authentication service → User repository: reads and writes
- Authentication service → Refresh-token repository: reads and writes
- User repository → Application database: queries
- Refresh-token repository → Application database: queries
- File handling → Application database: updates milestones