A full-featured Laravel 12 web application for managing real estate investor relationships — property listings, fractional investments, KYC verification, return payments, referral rewards, and built-in Claude AI advisor.
Overview
Investor Portal is a complete real estate investment management platform built with Laravel 12. It provides two fully isolated panels — Admin for managing the business, and Investor for tracking portfolios — plus an optional AI layer powered by Anthropic Claude that can be switched on or off entirely from the Admin Settings page.
- ✦ Manage properties with multi-image upload
- ✦ Record & approve investor investments
- ✦ Distribute return payments
- ✦ Approve/disapprove KYC documents
- ✦ Track & pay out referral rewards
- ✦ Configure SMTP email settings (no .env)
- ✦ Toggle AI features on/off platform-wide
- ✦ Dashboard with portfolio overview & chart
- ✦ Browse, filter, sort & invest in properties
- ✦ Image slider with zoom on property pages
- ✦ Track investment & approval status
- ✦ Upload KYC documents
- ✦ Referral link & earnings tracker
- ✦ Floating AI chat advisor (when enabled)
Key Features
Tech Stack
| Layer | Technology | Notes |
|---|---|---|
| Framework | Laravel 12 | PHP 8.2+, slim bootstrap-based config |
| Frontend CSS | Tailwind CSS 3 (CDN) | No npm / build step required |
| AI Provider | Anthropic Claude API | Optional — toggleable from Admin UI |
| UI Interactivity | Alpine.js 3 (CDN) | Dropdowns, modals, toggles |
| Charts | Chart.js 4 (CDN) | Bar charts on dashboards |
| Rich Text Editor | Quill.js 1.3 (CDN) | Property description editor |
| Searchable Select | Select2 4.1 (CDN) | Investor dropdowns in admin forms |
| Database | SQLite 3 / MySQL 5.7+ | SQLite default (zero-config) |
| File Storage | Laravel Filesystem (local) | Direct to public/uploads/ — no symlinks |
| Authentication | Laravel Auth (2 guards) | Separate admin + investor sessions |
| Laravel Mail (DB-configurable) | SMTP/Sendmail/Log, set from Admin UI |
AI Overview & Master Toggle
A single switch in Admin → Settings → AI Features controls all 8 AI features simultaneously. When OFF: every AI widget is hidden from both panels, and all /ai/* routes return HTTP 403 — enforced server-side via middleware, not just hidden in the UI.
| Setting | Where | Storage |
|---|---|---|
| AI Enabled (on/off) | Admin → Settings → AI Features | Database (settings table) |
| Anthropic API Key | Admin → Settings → AI Features, or .env | Encrypted in database, or env fallback |
The API key is encrypted using Laravel's Crypt facade before being saved — it is never stored or displayed in plain text once saved.
Admin AI Features
Dashboard widget — click "Analyse Now" for an AI-generated executive summary covering platform health, today's priorities, and a growth insight, based on live metrics.
In the Add/Edit Property form, fill name, address, price, ROI — click "Generate with AI" and a marketing-ready description populates the rich-text editor.
Every pending investment row has an AI icon button — opens a modal with Risk Level (Low/Medium/High), rationale, and a recommendation before you approve.
On the KYC review page, describe an email's purpose and AI drafts a complete, personalised email (subject + body) using that investor's portfolio context.
Investor AI Features
A floating chat button on every investor page. The AI has full context of the investor's portfolio, KYC status, and available properties — multi-turn conversation with session history.
One click scores the portfolio out of 10, lists strengths and gaps, gives a top recommendation, and projects 12-month earnings — all with specific numbers.
AI compares the investor's existing holdings against all available properties and recommends the top 2 matches, each with a match score (1–10) and a specific reason.
Projects returns over 1, 3, and 5 years from current approved investments, plus an AI-generated insight specific to the investor's numbers.
Admin — Dashboard
- • 4 KPI cards: Total Investment, Monthly Returns Paid, Total Profit Paid, Active Properties
- • AI Portal Insights widget (when AI enabled)
- • 6-month bar chart of return payments issued
- • Pending actions panel with live counts (KYC, investments, referral payouts)
- • Recent Investments table — fully responsive, shows investor name + series number
Admin — Property Management
- • Add / Edit properties — name, address, price, ROI %, rich-text description (Quill editor)
- • ✦ AI "Generate with AI" button writes the description from the other fields (when AI enabled)
- • Multiple image upload per property; delete individual images from edit page
- • Toggle Active/Inactive — deactivated properties disappear from investor browse page instantly
- • Icon action buttons: Edit (blue), Toggle (amber), Delete (red) with confirmation
- • Responsive table — Address and Price columns hide on small screens, shown inline instead
Admin — Record Investments
- • Manually record an investment for any investor against any property
- • Investor-submitted requests require admin approval or rejection
- • ✦ AI Risk Assessment icon on pending rows — opens a modal with Low/Medium/High risk rating + recommendation
- • Investor dropdown uses Select2 — searchable by name or series number
- • Approving an investment auto-triggers the referral reward if the investor was referred
- • Responsive table — Property, Date, Source and Active status columns adapt to screen size
Admin — Return Payments
- • Record actual return payments (amount, payment date, transaction ID, remarks)
- • Toggle Active/Inactive to control visibility in the investor's view
- • Investor dropdown is Select2-searchable (name + series number)
- • Investors see these as "Returns Received" — separate from the AI-estimated ROI figure
Admin — KYC Approvals
- • List of all investors who submitted documents with overall KYC status + series number
- • Detail view shows every document with image preview or PDF link
- • Approve or Disapprove each document individually, with an optional remark visible to the investor
- • ✦ AI Email Drafter available on this page to message the investor about their KYC status
- • Overall status flow: not_submitted → pending → approved / disapproved
Admin — Referral Rewards
- • Payout summary grouped by referrer, showing total pending amount owed per investor
- • Detail table: Referrer, Referred Investor, Investment, % Applied, Amount, Status
- • "Mark Paid" action records the payout timestamp
- • Filter by status (Pending / Paid)
- • Rewards created automatically via
InvestmentObserveron approval — zero manual work
Admin — Settings
✦ AI Features
Master toggle for all 8 AI features. Enter and save the Anthropic API key (encrypted in DB).
Referral Percentage
% of an approved investment credited as referral reward. Example: 5% on ₹1,00,000 = ₹5,000.
Email / SMTP
Switch SMTP / Sendmail / Log-only. Test email button to verify instantly.
Investor — Dashboard
- • 4 KPI cards: Total Investment, Est. Monthly Return (ROI-based), Total Returns Earned (actual), Active Properties
- • Est. Monthly Return = Σ(approved investment × property ROI%) ÷ 12 — what to expect, not what's been paid
- • 6-month bar chart of actual returns received
- • ✦ AI Portfolio Analysis card — score, strengths, risks, 12-month projection
- • ✦ AI ROI Forecast card — 1/3/5-year projections with AI insight
- • ✦ AI Recommendations — top 2 matched properties with reasons
- • Featured Properties — bottom row of 3 cards, status + ROI badges on image, funded progress bar
Investor — Browse Properties
- • Filter bar: text search (name/address), ROI filter (5/8/10/12/15%+), sort (newest, ROI high/low, price high/low)
- • Card design: status badge top-left on image, ROI badge bottom-right on image, funded progress bar, price + Invest Now button
- • Detail page: image slider with thumbnails, swipe support, fullscreen zoom lightbox, ROI calculator, invest form
Investor — My Investments
- • Responsive table: Property, Amount, Date, Transaction ID, Approval Status, Active Status
- • Submit investment requests from the property detail page (admin approves)
- • Statuses: Pending Approved Rejected
Investor — KYC Verification
- • Upload multiple documents at once (JPG, PNG, PDF — max 10MB each)
- • Each document shows status + admin remarks if disapproved
- • Overall KYC status shown in sidebar
- • View/download each uploaded document
Investor — Referral Program
- • Unique referral code + shareable link (
?ref=CODE) auto-generated on signup - • One-click copy for code and link
- • People Referred list with join date
- • Reward History — every earned reward with property name, amount, paid/pending status
- • Total Earned and Pending Payout balances shown prominently
Authentication System
| Feature | Admin | Investor |
|---|---|---|
| Login URL | /admin/login | /login |
| Guard | admin | investor |
| Model | App\Models\Admin | App\Models\Investor |
| Register | Not available (seeded) | /register (public, accepts ?ref=CODE) |
| Redirect on login | /admin/dashboard | /investor/dashboard |
Responsive Design
Every table in the system scrolls horizontally inside its own container on small screens — the page itself never scrolls sideways.
| Technique | Purpose |
|---|---|
overflow-x-hidden on <body> | Prevents the whole page from scrolling sideways |
min-w-0 on the main flex column | Lets the table wrapper's own scroll take over instead of expanding the layout |
overflow-x-auto + min-w-[Xpx] on each table | Table scrolls inside its card only |
hidden sm/md/lg:table-cell on lower-priority columns | Less essential data hides on small screens, key info shown as a sub-line instead |
Database Schema
| Table | Purpose | Key Columns |
|---|---|---|
| admins | Admin accounts | name, email, password |
| investors | Investor accounts | series, name, email, phone, address, status, referral_code, referred_by |
| properties | Investment properties | name, slug, address, price, roi, description, status |
| property_images | Property photos | property_id, image_path |
| investments | Investment records | investor_id, property_id, amount, invested_date, approval_status, status, source |
| return_payments | Returns paid to investors | investor_id, amount, payment_date, transaction_id, status |
| kyc_documents | KYC uploaded files | investor_id, file_path, original_name, status, remarks |
| referral_rewards | Referral reward credits | referrer_id, referred_investor_id, investment_id, amount, percentage_applied, status, paid_at |
| settings | Key-value config store | key, value — referral_percentage, ai_enabled, anthropic_api_key, mail_* |
File Structure
investor-portal/
├── app/
│ ├── Console/Commands/StorageSetupCommand.php # php artisan storage:setup
│ ├── Http/
│ │ ├── Controllers/
│ │ │ ├── Admin/ # All admin controllers + AiController
│ │ │ ├── Auth/Admin/ # Admin login / password reset
│ │ │ ├── Auth/Investor/ # Investor login / register / reset
│ │ │ └── Investor/ # All investor controllers + AiController
│ │ └── Middleware/AiEnabled.php # Blocks /ai/* routes when AI is off
│ ├── Models/ # Admin, Investor, Property, Investment…
│ ├── Observers/InvestmentObserver.php # Auto-creates referral rewards on approval
│ ├── Providers/AppServiceProvider.php # Registers observer, mail config, AI flag
│ └── Services/
│ ├── AiService.php # Wraps Anthropic API calls
│ └── MailSettingsService.php # Applies DB mail config at runtime
├── database/
│ ├── migrations/ # 11 migration files
│ └── seeders/DatabaseSeeder.php # Demo data + credentials
├── docs/
│ ├── setup-guide.html # This setup guide
│ └── documentation.html # This documentation
├── public/
│ ├── uploads/
│ │ ├── properties/ # Property images stored here
│ │ └── kyc/ # KYC documents stored here
│ ├── logo.png # Your logo — replace to rebrand
│ ├── landing.html # Marketing landing page
│ └── .htaccess # Upload limits (Apache)
├── resources/views/
│ ├── admin/ai/ # Admin AI widget partials
│ ├── investor/ai/ # Investor AI widget partials
│ ├── admin/ · investor/ · auth/ # All Blade views
│ ├── layouts/ # guest, dashboard, admin, investor
│ └── partials/ # badge, stat-card, icon, action-icon
├── routes/
│ ├── web.php # All routes (admin + investor + AI)
│ └── console.php
└── .env.example
Branding & Customisation
Logo
Replace public/logo.png with your own logo. It's referenced via asset('logo.png') in both layout files — update once, applies everywhere.
App Name
Set APP_NAME="Your Company" in .env — used in emails, browser titles, and the mail "from" name fallback.
Colours
The navy/gold palette is defined in the Tailwind config block inside layouts/guest.blade.php and layouts/dashboard.blade.php — change the hex values there.
Landing Page
public/landing.html is a standalone marketing page you can customise and use for ad campaigns — fully self-contained, no Laravel dependency.
Default Login Credentials
| Role | URL | Password | Series | |
|---|---|---|---|---|
| Admin | /admin/login | admin@demo.test | password | — |
| Investor 1 | /login | investor@demo.test | password | SI1001 |
| Investor 2 | /login | investor2@demo.test | password | SI1002 |
Investor 2 was referred by Investor 1 (SI1001) — use this pair to test the referral reward flow end-to-end.
Changelog
php artisan storage:setup commandBuilt with Laravel 12 · Tailwind CSS · Claude AI · Chart.js · Quill · Select2
View Setup Guide →