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)
Installation
Unzip the project
unzip investor-portal.zip
cd investor-portal
Install PHP dependencies
composer install
Copy environment file
cp .env.example .env
Generate application key
php artisan key:generate
Environment Configuration
Open .env and update these values:
| Key | Example | Notes |
|---|---|---|
| APP_NAME | Investor Portal | Shown in emails and title |
| APP_URL | https://yourdomain.com/ip | No trailing slash. No /public at end. |
| APP_ENV | production | Use local for development |
| APP_DEBUG | false | Always false in production |
| DB_CONNECTION | sqlite | Or mysql |
| ANTHROPIC_API_KEY | sk-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
--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
- • Creates
public/uploads/properties/andpublic/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
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
Referred by SI1001 — approve any investment to see reward auto-created.
AI Features Setup
Get an Anthropic API key
Visit console.anthropic.com, create an account and generate an API key.
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.
.env as: ANTHROPIC_API_KEY=sk-ant-...
Verify it's working
The Admin Dashboard will show the "AI Portal Insights" widget. Click "Analyse Now" — if it responds, everything is configured correctly.
- ✦ Portal insights widget on dashboard
- ✦ AI property description generator
- ✦ Investment risk assessment (pending items)
- ✦ AI email drafter (KYC review page)
- ✦ Floating AI chat advisor (all pages)
- ✦ Portfolio analysis & scoring
- ✦ Smart property recommendations
- ✦ 1 / 3 / 5-year ROI forecast
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')])
Read the full documentation for feature walkthroughs, tech stack, database schema, and changelog.
View Full Documentation →