How simplemarkcoin/laraapp works
1. What this repo is
- This is a Laravel-based trading/investment platform with three main experiences: a public marketing site, a customer dashboard, and an admin back office.
- The domain model centers on deposits, withdrawals, investment plans, subscriptions, KYC, referrals, signals, and trading accounts.
2. Request entry and route boundaries
- Routing is split by audience: routes/web.php for public pages, routes/user/web.php for customer flows, routes/admin/web.php for admin flows, plus routes/api.php, routes/botman.php, and routes/channels.php.
- That separation is reinforced by middleware such as admin checks, IP blocking, KYC gating, and two-factor verification.
3. Presentation layer
- The app uses Blade views heavily, with a large number of page-specific templates under resources/views.
- There are two UI patterns: traditional server-rendered pages and Livewire-driven interactive components in app/Http/Livewire with matching views under resources/views/livewire.
- Theme assets are substantial: themes/dashly appears to be the primary dashboard theme, while dash/ and temp/custom/ hold additional/static asset bundles and legacy template material.
4. Authentication and account security
- Auth is handled with Laravel Fortify/Jetstream, extended by custom controllers for login, registration, password reset, profile updates, and account deletion.
- Security features include two-factor auth, password confirmation, email verification, browser-session management, and a custom old-password rule.
- Admin authentication is separated from user authentication, with its own login/reset controllers and redirect middleware.
5. Core domain data
- The Eloquent models show the business objects the app is built around: User, Admin, Deposit, Withdrawal, Kyc, Plans, User_plans, CryptoAccount, Asset, Notification, Settings, Theme, Task, Ipaddress, and related transaction tables.
- The domain suggests a ledger-like flow where user actions create transactions, which then drive status updates, notifications, and admin review screens.
6. Customer workflows
- Customer controllers cover deposits, withdrawals, transfers, profile management, subscriptions, memberships/courses, trading/investment plans, crypto exchange/payment flows, social login, and verification.
- Livewire components such as new deposit, crypto payment, crypto withdrawal, investment plan selection, and signal subscription indicate multi-step, interactive customer journeys.
- KYC is a gate in the user journey, enforced by middleware and application requests.
7. Admin back office
- Admin controllers are organized around operational domains: managing users, admins, deposits, withdrawals, assets, plans, subscriptions, KYC applications, IP addresses, topups, trading payments, and cache clearing.
- There are dedicated admin settings areas for app configuration, payment methods, referral rules, subscription rules, and currency configuration.
- Admin views mirror these operations with lists, detail pages, and action screens for approval/review workflows.
8. Payments and external financial services
- The repo integrates multiple gateways and finance APIs through config files and traits: Paystack, Flutterwave, CoinPayment/CoinPayments, Binance API, and BitPay-related config.
- Payment-related controllers and Livewire components split by method, which suggests the payment adapter is a major architectural boundary.
- These integrations feed deposit, withdrawal, top-up, and crypto transaction flows.
9. Signals, chat, and notifications
- There is a Botman chatbot layer with its own controller and conversation class, likely used for guided signal or support interactions.
- Notifications are implemented through Laravel notifications and mailables for registration, welcome, deposit/withdrawal status, ROI updates, two-factor codes, and forex signals.
- This creates an event-driven edge around the core transaction system: user/admin actions trigger emails and app notifications.
10. Background/automation and platform services
- AutoTaskController, queued mail/notification classes, and console kernel support suggest scheduled or asynchronous automation for payouts, ROI, end-of-plan handling, and similar operational tasks.
- Broadcasting and queue configs are present, so the app is prepared for async delivery and possibly real-time updates even if the exact channels are modestly used.
11. Persistence and data import
- The app uses standard Eloquent persistence against a relational database; app/Imports/UsersImport.php indicates bulk user import.
- Update SQL scripts under update/ and the presence of many model classes imply schema-driven business data with periodic versioned database updates.
12. Cross-cutting structure
- Providers such as SettingsServiceProvider, FortifyServiceProvider, JetstreamServiceProvider, and TelescopeServiceProvider wire framework services into the app.
- Middleware and observers encapsulate cross-cutting rules like admin access, KYC enforcement, IP blocking, and user lifecycle behavior.
- The overall architecture is a classic Laravel monolith with strong feature-based separation by audience and business function, plus a heavy theme layer for presentation.
Main entry points: Admin Admin controllers · Models Models · User User controllers · views Blade views
Components 25
Routes
Audience-separated HTTP and realtime entrypoints.
- Public routes · Public marketing and guest-facing web routes.
routes/web.php - User routes · Customer dashboard and account flows.
routes/user/web.php - Admin routes · Back-office administration routes.
routes/admin/web.php - API routes · API endpoints and token-related access.
routes/api.php - Bot routes · Botman webhook and conversation routes.
routes/botman.php - Broadcast channels · Broadcasting channel authorization rules.
routes/channels.php
HTTP layer
Controllers, middleware, requests, and auth actions.
- Public controllers · Home, front page, and general site controllers.
app/Http/Controllers - User controllers · Customer actions for deposits, withdrawals, transfers, subscriptions, profiles, verification, and exchange/payment flows.
app/Http/Controllers/User - Admin controllers · Operational controllers for users, finance, plans, KYC, settings, and trading admin.
app/Http/Controllers/Admin - Auth actions · Fortify/Jetstream hooks for create, update, reset, profile, and delete flows.
app/Actions - Middleware · Admin auth, KYC gating, IP blocking, 2FA, and redirect guards.
app/Http/Middleware - Livewire comps · Interactive user/admin workflows for deposits, crypto, plans, signals, and back-office tools.
app/Http/Livewire
Domain
Eloquent models, repositories, rules, observers, and imports.
- Models · Core business entities such as users, admins, deposits, withdrawals, plans, KYC, assets, notifications, and settings.
app/Models - Rules & observers · Cross-cutting validation and lifecycle behavior.
app/Rules - User repo · Repository abstraction and implementation for user data access.
app/Repositories/User - Bulk import · User import pipeline for bulk population.
app/Imports/UsersImport.php
UI layer
Blade views, Livewire components, layouts, and themes.
- Blade views · Server-rendered views for public, user, admin, auth, email, and profile experiences.
resources/views - Livewire views · Matching Blade templates for Livewire components.
resources/views/livewire - Dashly theme · Primary dashboard theme assets and templates.
themes/dashly - Legacy assets · Additional dashboard and legacy frontend bundles.
dash
Services
Integrations, mail, notifications, automation, and providers.
- Payments & APIs · Gateway traits and config for payment and crypto integrations.
config - Mail & notifications · Mailables and notifications for deposits, withdrawals, ROI, verification, and signals.
app/Mail - Botman layer · Bot controller and conversation handling.
app/Http/Controllers/Botman - Automation · Console kernel and auto-task controller for scheduled or asynchronous work.
app/Console/Kernel.php - Providers · Framework bootstrapping for auth, routes, broadcasting, settings, and debugging tools.
app/Providers
Connections 30
- Public routes → Public controllers: dispatches · Public web requests reach frontend and site controllers.
- User routes → User controllers: dispatches · Customer routes map to account and trading workflows.
- Admin routes → Admin controllers: dispatches · Admin routes map to operational controllers.
- API routes → Auth actions: auth/API · API endpoints rely on auth and token handling.
- Bot routes → Botman layer: dispatches · Bot routes enter the chatbot layer.
- Broadcast channels → Providers: broadcast auth · Channel authorization is wired through broadcasting services.
- Public controllers → Blade views: renders · Public controllers render site pages.
- User controllers → Blade views: renders · User controllers render dashboard and account pages.
- Admin controllers → Blade views: renders · Admin controllers render back-office screens.
- User controllers → Livewire comps: uses · Customer journeys use interactive Livewire components.
- Admin controllers → Livewire comps: uses · Admin tools also use Livewire for operations.
- Auth actions → Providers: wired by · Fortify and Jetstream actions are registered through providers.
- Middleware → User routes: guards · KYC, 2FA, and IP checks protect user flows.
- Middleware → Admin routes: guards · Admin access controls protect back-office routes.
- User controllers → Models: mutates · Customer actions create deposits, withdrawals, plans, and profile data.
- Admin controllers → Models: reviews · Admin actions approve and manage core records.
- Admin controllers → Rules & observers: applies · Admin operations depend on validation and lifecycle hooks.
- User repo → Models: accesses · Repository abstraction wraps user persistence.
- Bulk import → Models: loads · Bulk import populates user records.
- Livewire views → Livewire comps: pairs with · Livewire components are backed by matching views.
- Dashly theme → Blade views: skins · Theme templates and assets feed the rendered UI.
- Legacy assets → Blade views: supports · Legacy/static bundles support older frontend pages.
- Payments & APIs → User controllers: supports · Gateway integrations power deposits, withdrawals, and crypto flows.
- Payments & APIs → Admin controllers: supports · Admins configure and monitor payment adapters.
- Mail & notifications → Models: emits for · Mail and notifications follow transaction and account events.
- Automation → Models: automates · Scheduled work updates plans, ROI, payouts, and account states.
- Providers → Auth actions: boots · Providers register auth, Jetstream, Fortify, and app services.
- Providers → Middleware: registers · Providers and kernels wire middleware into the app.
- Botman layer → Mail & notifications: notifies · Bot-driven interactions can trigger messaging.
- Livewire comps → Payments & APIs: calls · Interactive payment components invoke gateway traits/config.