Investor Portal / Setup Guide
Full Docs →
✓ Laravel 12 · PHP 8.2+ · SQLite / MySQL · Claude AI

Setup Guide

Complete step-by-step installation guide for the Investor Portal.

System Requirements

Server

  • PHP 8.2 or higher
  • Composer 2.x
  • MySQL 5.7+ or SQLite 3
  • Apache / Nginx / PHP built-in server
  • Node.js is not required

PHP Extensions

  • pdo_sqlite or pdo_mysql
  • mbstring, openssl, tokenizer
  • xml, ctype, json, fileinfo
  • GD or Imagick (image uploads)
  • cURL (for AI API calls)
⚠ No Node.js needed. All CSS/JS loads via CDN — Tailwind, Chart.js, Select2, Quill, Alpine.js. No npm, no webpack, no build step.

Installation

1

Unzip the project

unzip investor-portal.zip
cd investor-portal
2

Install PHP dependencies

composer install
3

Copy environment file

cp .env.example .env
4

Generate application key

php artisan key:generate

Environment Configuration

Open .env and update these values:

KeyExampleNotes
APP_NAMEInvestor PortalShown in emails and title
APP_URLhttps://yourdomain.com/ipNo trailing slash. No /public at end.
APP_ENVproductionUse local for development
APP_DEBUGfalseAlways false in production
DB_CONNECTIONsqliteOr mysql
ANTHROPIC_API_KEYsk-ant-...Optional — only needed for AI features

APP_URL by deployment type

# Local — PHP built-in server
APP_URL=http://localhost:8000

# XAMPP / WAMP subfolder
APP_URL=http://localhost/investor-portal/public

# Shared hosting subfolder
APP_URL=https://yourdomain.com/ip/public

# VPS / dedicated (document root = public/)
APP_URL=https://yourdomain.com

Database Setup

Option A — SQLite (zero config, recommended for quick start)

touch database/database.sqlite
php artisan migrate --seed

Option B — MySQL

Create the database first, then update .env:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=investor_portal
DB_USERNAME=root
DB_PASSWORD=your_password
php artisan migrate --seed
ℹ What --seed does: Creates demo accounts (see Credentials section), seeds 3 sample properties, sets referral percentage to 5%, and adds the AI settings rows. Safe to run on a fresh database only.

Storage Setup

Run once after every deployment:

php artisan storage:setup
✓ What this command does:
  • • Creates public/uploads/properties/ and public/uploads/kyc/
  • • Sets folder permissions to 775
  • • Runs a write test to confirm uploads will work
  • • Prints effective PHP upload limits (upload_max_filesize etc.)
  • • Shows the upload URL base for verification
⚠ No symlinks needed. Files are stored directly in public/uploads/ — instantly web-accessible. Never run php artisan storage:link on this project.

Running the Application

Local development

php artisan serve

Visit http://localhost:8000

After any change to .env or config files

php artisan config:clear
php artisan cache:clear
php artisan view:clear

Production optimisation

php artisan config:cache
php artisan route:cache
php artisan view:cache

Default Login Credentials

⚠ Change all passwords immediately on a live server.
Admin Panel
URL: /admin/login
Email: admin@demo.test
Password: password
Investor Panel
URL: /login
Email: investor@demo.test
Password: password
Series: SI1001
Referred investor demo (to test referral reward system):
Email: investor2@demo.test  |  Password: password  |  Series: SI1002
Referred by SI1001 — approve any investment to see reward auto-created.

AI Features Setup

✦ AI is OFF by default. The system works completely without it. AI features must be explicitly enabled by the admin.
1

Get an Anthropic API key

Visit console.anthropic.com, create an account and generate an API key.

2

Enable from Admin Settings

Go to Admin → Settings → AI Features. Enter your API key and flip the toggle to ON. The key is stored encrypted in the database — no .env editing required.

Alternatively, add to .env as: ANTHROPIC_API_KEY=sk-ant-...
3

Verify it's working

The Admin Dashboard will show the "AI Portal Insights" widget. Click "Analyse Now" — if it responds, everything is configured correctly.

AI Features included (when ON)
Admin Panel
  • ✦ Portal insights widget on dashboard
  • ✦ AI property description generator
  • ✦ Investment risk assessment (pending items)
  • ✦ AI email drafter (KYC review page)
Investor Panel
  • ✦ Floating AI chat advisor (all pages)
  • ✦ Portfolio analysis & scoring
  • ✦ Smart property recommendations
  • ✦ 1 / 3 / 5-year ROI forecast

Shared Hosting Deployment

1

Upload via FTP / File Manager

Upload the entire project to your server (e.g. public_html/ip/).

2

Set APP_URL

APP_URL=https://yourdomain.com/ip/public
3

Run via SSH

composer install --no-dev --optimize-autoloader
php artisan key:generate
php artisan migrate --seed
php artisan storage:setup
php artisan config:cache
php artisan route:cache
4

Fix permissions

chmod -R 775 storage/
chmod -R 775 public/uploads/
chmod -R 775 bootstrap/cache/
ℹ PHP-FPM hosts: The .htaccess PHP upload limits only work with mod_php. For PHP-FPM, set upload_max_filesize and post_max_size in your hosting control panel's PHP settings.

Troubleshooting

Images not uploading or not showing +

1. Run php artisan storage:setup — it diagnoses permissions and prints the upload URL.

2. Verify the URL it prints matches what you expect. If it shows /storage/ instead of /uploads/, run php artisan config:clear.

3. Check APP_URL in .env — do NOT include /public if your document root already points to public/.

4. Test with tinker: echo Storage::disk('public')->url('test.jpg'); — should print APP_URL/uploads/test.jpg.

AI features not working +

1. Check AI is toggled ON in Admin → Settings → AI Features.

2. Verify an API key is saved (the key field should show ••••••••).

3. Confirm the key is valid at console.anthropic.com.

4. Check storage/logs/laravel.log for the exact error message.

5. Ensure php_curl extension is enabled on your server.

500 Server Error after deployment +

1. Set APP_DEBUG=true temporarily to see the real error.

2. Check storage/logs/laravel.log for the full trace.

3. Make sure vendor/ exists — run composer install.

4. Ensure storage/ and bootstrap/cache/ are writable (chmod 775).

Series numbers not showing for existing investors +

Run the migration first, then backfill:

php artisan migrate
php artisan tinker
>>> App\Models\Investor::whereNull('series')->get()->each(fn($i) => $i->update(['series' => App\Models\Investor::generateSeries()]))
Emails not sending +

1. Go to Admin → Settings → Email Settings and configure SMTP credentials there.

2. Use the Send Test Email button to verify before going live.

3. Set delivery to "Log Only" first to confirm the mail system itself is working (check storage/logs/laravel.log).

Reset admin password +
php artisan tinker
>>> App\Models\Admin::first()->update(['password' => bcrypt('your-new-password')])
Need full feature details?

Read the full documentation for feature walkthroughs, tech stack, database schema, and changelog.

View Full Documentation →