




/trading-frontend/
│
├─ public/
│   ├─ index.html
│   └─ favicon.ico
│
├─ src/
│   ├─ assets/                 # Images, fonts, icons
│   │   └─ logo.png
│   │
│   ├─ components/             # All reusable components
|   |   ├─ CardDepositModal.tsx
│   │   ├─ Navbar.tsx                   # this is the top navigation bar that has links to deposit, withdraw, chat, history, profile and other modals. all the modals you see in the components folder are pop-up's that appear when a link is clicked.
│   │   ├─ Sidebar.tsx                  # first section of the trading sidebar
│   │   ├─ TradingChart.tsx              # second section of the trading sidebar
|   |   ├─ CryptoDepositModal.tsx
|   |   ├─ CryptoWithdrawModal.tsx
|   |   ├─ DepositModal.tsx
|   |   ├─ HistoryModal.tsx
|   |   ├─ LiveChatModal.tsx
|   |   ├─ MpesaDepositModal.tsx
|   |   ├─ MpesaWithdrawModal.tsx
|   |   ├─ NotificationModal.tsx
|   |   ├─ ProtectedRoutetsx
|   |   ├─ ReferralModal.tsx
|   |   ├─ TradePaneltsx                 # third section of trading sidebar
|   |   ├─ UserMenuModal.tsx
|   |   ├─ WithdrawModal.tsx
│   │   └─ TradePanel.tsx
│   │
│   ├─ context/                # React Context for state
│   │   ├─ AuthContext.tsx     # comes with session for user_id, fullName, email to the frontend.
│   │   └─ BalanceContext.tsx  # fetches balance from backend
│   │
│   ├─ pages/                  # Screens/Pages
│   │   ├─ Login.tsx
│   │   ├─ Register.tsx
│   │   ├─ ResponsibleTrading.tsx           # just react page for giving users warnings on excessive gambling
│   │   └─ Dashboard.tsx                    # the main trading dashboard that includes the navbar, all the pop-up modals and the 3 trading sections.
│   │
│   | 
│   ├─ settings/                 # these are the pages where the user updates his profiles, passwords and enables 2fa.
│   │   ├─ Password.tsx
│   │   ├─ SettingsLayout.tsx
│   │   ├─ TwoFA.tsx
│   │   ├─ Verify.tsx
│   │   └─ Profile.tsx    
│   │
│   ├─ styles/                 # styling for ui
│   │   ├─ auth.css              # for register and login pages only
│   │   └─ theme.css              # for the rest of the project
│   │
│   │
│   ├─ App.tsx
│   ├─ main.tsx
│   └─ index.tsx
│
├─ package.json
├─ tsconfig.json
└─ vite.config.ts              # Or webpack config







trading-backend/
│
├── config/
│   └── db.php                  # Database connection
│
├── auth/
│   ├── register.php
│   ├── logout.php
│   ├── check_session.php              # checks session in the dashboard
│   └── login.php
│
|
├── chat/
│   ├── uploads/
│   ├── upload_file.php        # this uploads files only from the chat modal
│   └── get_messages.php
|
├── chat-server/
│   ├── node_modules/
│   └── server.js              # this is a script that is run inside the the chat-server folder using the command "node server.js" so that it can open the websocket in order the client can chat with the support team
|
|
├── trading-server/             #this is where i run the script and bumbers are generated nonstop.
│   ├── node_modules/
│   └── server.js 
|
├── cron/
│   └── tron_watcher.php
|
├── notifications/
│   └── get_notifications.php       # this fetches payment notifications from saved_cards table
│
├── payments/                        # this folder is only for making payments and withdrawing money
│   ├── crypto_withdraw.php
│   ├── card_deposit.php
│   ├── daraja_c2b.php
│   ├── daraja_b2c.php
│   ├── check_crypto_status.php
│   ├── check_stk.php
│   ├── create_crypto_deposit.php
│   ├── get_history.php
│   ├── mpesa_deposit.php
│   ├── mpesa_withdraw_result.php
│   ├── mpesa_withdraw_timeout.php
│   ├── mpesa_withdraw.php
│   ├── paypal_deposit.php
│   └── callback.php
│
├── referrals/
│   └──  get_referral.php
|
|
├── settings/
│   ├── check_2fa.php
│   ├── check_verification.php
│   ├── disable_2fa.php
│   ├── enable_2fa.php
│   ├── generate_2fa.php
│   ├── get_profile.php
│   ├── submit_verification.php
│   ├── update_password.php
│   ├── update_profile.php
│   └──  update_avater.php
|
|
├── uploads/               # this folder is for uploading photos from settings
│   ├── avaters/
│   └──  kyc/
|
|
└── user/
   └──  balance.php          # this fetches balance from table users in the column balance
  





