Socialink — Full Stack Social Platform
A PHP-powered social network stack. This comprehensive guide covers all aspects of Socialink, a modern Laravel-based social networking platform.
License
Purchase codeSocialink follows a purchase-code-first licensing model. Keep your Envato (or marketplace) purchase code ready for installation and support.
- Sign in to your marketplace account and open Downloads.
- Download the License certificate & purchase code (PDF or text).
- Copy the purchase code and keep it secure; you will need it during installation or when opening support tickets.
- For re-installs, revoke old domains in your licensing portal before activating a new domain.
Support eligibility
- Valid purchase code
- Active support window
- Production URL registered in your profile
- Server meets minimum requirements
System Requirements
Runtime checklistServer stack
- • Apache or Nginx with HTTPS
- • PHP 8.2+ with
mysqli,mbstring,curl,gd,fileinfo,zip - • MySQL 8+ or MariaDB 10.5+
- • PHP settings:
allow_url_fopen=On,memory_limit ≥ 256M,max_upload_filesize ≥ 64M - • Recommended: OPcache enabled and tuned for production
Optional services
- • Redis for sessions/queues
- • Node-compatible queue workers for broadcasts
- • SSL required for calls, push, and mobile builds
- • Cron for scheduled tasks (
php artisan schedule:run)
Installation
Step-by-step-
Prepare serverPHP 8.2+, MySQL 8+, git/zip available, HTTPS ready.
-
Create databaseCreate DB + user with full privileges and UTF8MB4 collation.
CREATE DATABASE socialink CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; CREATE USER 'socialink_user'@'%' IDENTIFIED BY 'strong_password'; GRANT ALL ON socialink.* TO 'socialink_user'@'%'; -
Upload codeCopy files to the server. Keep document root at
public/. -
Set permissionsMake storage/cache writable for the web user.
chmod -R 775 storage bootstrap/cache chown -R www-data:www-data storage bootstrap/cache -
ENV bootstrapCopy ENV and set app/db/mail/queue/storage keys.
cp .env.example .env php artisan key:generate -
Install dependencies
composer install --no-dev --optimize-autoloader -
Run migrations & seeds
php artisan migrate --seed -
Link storage
php artisan storage:link -
Optimize & cache
php artisan config:cache php artisan route:cache php artisan view:cache -
Configure web server & HTTPSPoint vhost to
public/, enable SSL, and force HTTPS. -
Finalize admin setupLogin as admin, upload branding (favicon/og-image/logo), set policies, and enable required modules.
-
Run installer wizard (if enabled)The wizard validates requirements, license (purchase code), DB, and admin user creation. If it fails to write config, ensure
storageis writable and retry after clearing the DB. -
Supervisor (queues/websockets)Keep workers alive with Supervisor (recommended in production).
[program:socialink-queue] command=php /path/to/artisan queue:work --daemon --sleep=3 --tries=3 directory=/path/to autostart=true autorestart=true redirect_stderr=true stdout_logfile=/var/log/supervisor/socialink-queue.log [program:socialink-websockets] command=php /path/to/artisan websockets:serve directory=/path/to autostart=true autorestart=true redirect_stderr=true stdout_logfile=/var/log/supervisor/socialink-ws.log
Permissions
- •
storage/→ 775 - •
bootstrap/cache/→ 775 - • Optional uploads:
public/storagesymlink viaphp artisan storage:link
Web root
Ensure document root is the public/ directory to prevent
exposing source files.
Web server (Apache)
<VirtualHost *:80>
ServerName socialink.local
DocumentRoot /path/to/public
<Directory /path/to/public>
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Enable mod_rewrite and restart Apache.
Web server (Nginx)
server {
listen 80;
server_name socialink.local;
root /path/to/public;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
Add SSL server block and redirect HTTP → HTTPS in production.
Post-install checklist
- • Create/confirm admin credentials.
- • Upload favicon, og-image, and brand colors.
- • Set upload extensions and size limits per type.
- • Configure public mode and registration throttles.
- • Enable cron:
* * * * * php /path/to/artisan schedule:run - • Start workers:
php artisan queue:work --daemon
PHP ini (recommended)
memory_limit = 512M
upload_max_filesize = 128M
post_max_size = 128M
max_execution_time = 120
Restart PHP-FPM/Apache after changes.
Background processes
- • Cron:
* * * * * php /path/to/artisan schedule:run - • Queue:
php artisan queue:work --daemonunder Supervisor. - • Websockets (if enabled): run your WS server under Supervisor.
Ensure logs rotate; restart workers after deploy.
Installer tips
- • If config write fails, ensure
storage/writable. - • Clear DB and retry if wizard halted midway.
- • Confirm
APP_URLmatches final domain (affects OAuth). - • Use UTF8MB4 collation to avoid emoji errors.
- • Keep a copy of your purchase code for support/updates.
VPS Installation (Ubuntu/Debian)
SSH AccessStep 1: Update System & Install Dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install -y software-properties-common
sudo add-apt-repository ppa:ondrej/php -y
sudo apt update
sudo apt install -y php8.2 php8.2-fpm php8.2-mysql php8.2-mbstring php8.2-xml php8.2-curl php8.2-zip php8.2-gd php8.2-bcmath php8.2-intl
sudo apt install -y nginx mysql-server composer git unzip redis-server
Step 2: Configure MySQL
sudo mysql_secure_installation
sudo mysql -u root -p
# In MySQL prompt:
CREATE DATABASE socialink CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'socialink_user'@'localhost' IDENTIFIED BY 'strong_password_here';
GRANT ALL PRIVILEGES ON socialink.* TO 'socialink_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Step 3: Upload & Configure Application
cd /var/www
sudo mkdir socialink
sudo chown -R $USER:$USER /var/www/socialink
cd socialink
# Upload your files via SCP/SFTP or extract zip
unzip socialink.zip # if using zip file
# OR
git clone your-repository-url .
# Set permissions
sudo chown -R www-data:www-data /var/www/socialink
sudo chmod -R 755 /var/www/socialink
sudo chmod -R 775 /var/www/socialink/storage
sudo chmod -R 775 /var/www/socialink/bootstrap/cache
Step 4: Configure Laravel
cp .env.example .env
nano .env # Edit database credentials
composer install --no-dev --optimize-autoloader
php artisan key:generate
php artisan migrate --seed
php artisan storage:link
php artisan config:cache
php artisan route:cache
php artisan view:cache
Step 5: Configure Nginx
sudo nano /etc/nginx/sites-available/socialink
# Add this configuration:
server {
listen 80;
server_name your-domain.com www.your-domain.com;
root /var/www/socialink/public;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options "nosniff";
index index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
error_page 404 /index.php;
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.(?!well-known).* {
deny all;
}
}
# Enable site and restart Nginx
sudo ln -s /etc/nginx/sites-available/socialink /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl restart nginx
Step 6: Setup SSL with Certbot
sudo apt install -y certbot python3-certbot-nginx
sudo certbot --nginx -d your-domain.com -d www.your-domain.com
Step 7: Setup Queue Worker & Cron
# Create supervisor config
sudo nano /etc/supervisor/conf.d/socialink-worker.conf
# Add:
[program:socialink-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/socialink/artisan queue:work --sleep=3 --tries=3
autostart=true
autorestart=true
user=www-data
numprocs=2
redirect_stderr=true
stdout_logfile=/var/www/socialink/storage/logs/worker.log
# Start supervisor
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl start socialink-worker:*
# Add cron job
sudo crontab -e -u www-data
# Add this line:
* * * * * cd /var/www/socialink && php artisan schedule:run >> /dev/null 2>&1
cPanel Installation
Shared HostingStep 1: Create Database via cPanel
- Login to cPanel and open MySQL Database Wizard
- Create database named:
cpanel_socialink - Create user with strong password
- Grant ALL PRIVILEGES to the user
- Note down: database name, username, and password
Step 2: Upload Files
- Upload the Socialink zip file using File Manager
- Extract to a temporary directory (e.g.,
socialink_temp) - Move all files from
socialink_temptopublic_html - Important: The
publicfolder contents should be inpublic_html
Step 3: Fix File Structure
public_html/should contain: index.php, .htaccess, assets, etc.public_html/../(parent dir) should have: app, bootstrap, config, vendor, etc.
# Via SSH (if available):
cd public_html
mv public/* .
mv public/.htaccess .
rmdir public
# Update index.php paths from:
require __DIR__.'/../vendor/autoload.php';
# to:
require __DIR__.'/../../vendor/autoload.php';
Step 4: Configure Environment
- Rename
.env.exampleto.envusing File Manager - Edit
.envfile and update:APP_URL=https://yourdomain.com DB_DATABASE=cpanel_socialink DB_USERNAME=your_cpanel_db_user DB_PASSWORD=your_db_password
Step 5: Install Dependencies (via SSH)
cd ~/public_html/..
composer install --no-dev --optimize-autoloader
php artisan key:generate
php artisan migrate --seed
php artisan storage:link
php artisan config:cache
php artisan route:cache
Step 6: Set Permissions
# Via SSH:
chmod -R 755 ~/public_html
chmod -R 775 ~/public_html/../storage
chmod -R 775 ~/public_html/../bootstrap/cache
# Via File Manager:
# Select storage and bootstrap/cache folders
# Click Permissions and set to 775
Step 7: Setup Cron Job
- In cPanel, go to Cron Jobs
- Add new cron job with timing:
* * * * * - Command:
/usr/bin/php /home/username/public_html/../artisan schedule:run >> /dev/null 2>&1 - Replace
/home/username/with your actual home path
Step 8: SSL Certificate
- In cPanel, go to SSL/TLS Status
- Enable AutoSSL for your domain (free Let's Encrypt)
- Or install custom SSL certificate if you have one
- Update APP_URL in .env to use
https://
Configuration
ENV referenceCore keys
APP_NAME=Socialink
APP_ENV=production
APP_URL=https://socialink.example.com
APP_DEBUG=false
DB_HOST=127.0.0.1
DB_DATABASE=socialink
DB_USERNAME=socialink_user
DB_PASSWORD=strong_password
Always restart PHP-FPM (or your web server) after ENV changes.
Media & queues
QUEUE_CONNECTION=redis
BROADCAST_DRIVER=log
CACHE_DRIVER=redis
SESSION_DRIVER=redis
FILESYSTEM_DISK=local
MEDIA_MAX_UPLOAD_MB=64
Switch FILESYSTEM_DISK to s3,
gcs, or do when offloading media.
Mail (SMTP sample)
MAIL_MAILER=smtp
MAIL_HOST=smtp.yourhost.com
MAIL_PORT=587
MAIL_USERNAME=postmaster@yourhost.com
MAIL_PASSWORD=your_password
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=no-reply@yourdomain.com
MAIL_FROM_NAME="Socialink"
After saving, run php artisan config:clear and send a
test email from admin.
Caching & performance
- • Use Redis for cache/session/queue for best realtime performance.
- • Enable route/view/config cache in production.
- • Set heartbeat intervals in admin to tune realtime checks.
- • Use a CDN for
public/storageor S3 assets.
Queues & broadcasting
QUEUE_CONNECTION=redis
BROADCAST_DRIVER=pusher
PUSHER_APP_ID=your-app-id
PUSHER_APP_KEY=your-key
PUSHER_APP_SECRET=your-secret
PUSHER_HOST=127.0.0.1
PUSHER_PORT=6001
PUSHER_SCHEME=http
Match these with your websocket server config. For production, run behind HTTPS and WSS.
Logging
- • Default channel:
stack→ daily files instorage/logs. - • Reduce noise by lowering heartbeat log level.
- • Rotate logs with logrotate or cloud logging sinks.
- • Mask secrets in logs; avoid logging access tokens.
File Structure
What lives whereApplication
app/Http/Controllers— backend controllersapp/Models— Eloquent modelsroutes/web.php— web routesroutes/api.php— API routes
Frontend & assets
resources/views— Blade templatespublic/assets— compiled JS/CSSresources/js|sass— sourcespublic/storage— user uploads (symlink)
Config & storage
config/*.php— app settingsdatabase/migrations— schemastorage/logs— logsstorage/app— private files
Feature Set
Core modulesFeeds & Profiles
Timeline posts, reactions, comments, mentions, hashtags, media galleries, and custom privacy per post.
Messaging
Real-time chat with receipts, typing indicators, media sharing, and moderation controls.
Monetization
Memberships, wallet funding, paywall content, and ads placements across feed, search, and messaging.
Payments
GatewaysEnable or disable gateways from the admin billing panel. Common callback pattern:
{base}/payments/{provider}/callback.
Supported
- • Stripe (cards, wallets, 3DS)
- • PayPal (Checkout)
- • Flutterwave
- • Paystack
- • Coinbase Commerce
- • Razorpay
Best practices
- • Use webhooks for wallet top-ups and subscriptions.
- • Lock currency to your marketplace region.
- • Store secrets in
.env, not in the database. - • Run test mode before switching live keys.
Webhooks (examples)
- • Stripe:
{base}/payments/stripe/webhook - • PayPal:
{base}/payments/paypal/webhook - • Paystack:
{base}/payments/paystack/webhook - • Flutterwave:
{base}/payments/flutterwave/webhook
Whitelist your IP/firewall to let gateways reach these endpoints.
Testing tips
- • Use gateway test keys and test cards first.
- • Verify webhook signature/secret to avoid spoofed events.
- • Check wallet balance and subscription status after callbacks.
- • Retry failed webhook deliveries (idempotent handlers recommended).
Cloud Storage
Media offloadSupported
- • Amazon S3
- • Google Cloud Storage
- • DigitalOcean Spaces
- • Wasabi
- • Backblaze B2
- • Cloudflare R2
Generic ENV
FILESYSTEM_DISK=s3
AWS_ACCESS_KEY_ID=...
AWS_SECRET_ACCESS_KEY=...
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=socialink-media
After switching, run php artisan config:clear and
php artisan storage:link.
Pathing
- • Uploads organized by year/month/type (like reference docs).
- • Use CDN in front of bucket for faster delivery.
- • Prefer private buckets + signed URLs for sensitive media.
- • Enable CORS for images/video if your CDN uses a different domain.
Google Cloud Storage
FILESYSTEM_DISK=gcs
GCS_PROJECT_ID=...
GCS_BUCKET=socialink-media
GCS_KEY_FILE=/path/to/key.json
Grant Storage Object Admin; keep key file outside web root.
DigitalOcean Spaces
FILESYSTEM_DISK=do
DO_SPACES_KEY=...
DO_SPACES_SECRET=...
DO_SPACES_REGION=nyc3
DO_SPACES_BUCKET=socialink-media
Use CDN endpoint for public access; enforce HTTPS.
Cloudflare R2
FILESYSTEM_DISK=r2
R2_ACCOUNT_ID=...
R2_ACCESS_KEY_ID=...
R2_SECRET_ACCESS_KEY=...
R2_BUCKET=socialink-media
R2_PUBLIC_URL=https://cdn.example.com
Set public URL for asset links; prefer signed URLs for private media.
S3 CORS (example)
[
{
"AllowedHeaders": ["*"],
"AllowedMethods": ["GET", "PUT", "POST", "DELETE"],
"AllowedOrigins": ["*"],
"ExposeHeaders": [],
"MaxAgeSeconds": 3000
}
]
CDN tips
- • Set long cache-control headers for media.
- • Invalidate only changed paths when deploying brand assets.
- • Use custom domain (CNAME) for consistent cookies/policies.
SMS
OTP & alertsProviders
- • Twilio
- • BulkSMS
- • Infobip
- • MSG91
Setup
- • Add API keys in admin > SMS settings.
- • Verify sender IDs where required.
- • Enable OTP for sign-up, password reset, and 2FA as needed.
- • Test with sandbox numbers before going live.
Match reference flows: configure heartbeats and rate limits to avoid blocking.
Twilio ENV (example)
SMS_DRIVER=twilio
TWILIO_SID=ACxxxxxxxx
TWILIO_TOKEN=your_token
TWILIO_FROM=+1234567890
Delivery tips
- • Use region-appropriate sender IDs/templates.
- • Avoid sending OTP more than 3–5 times per hour per user.
- • Log message SID/ID for debugging delivery with the provider.
- • Fallback to email if SMS is delayed in some regions.
Push Notifications
Firebase (FCM)Channels
- • Firebase Cloud Messaging for web push
- • FCM for mobile apps
- • Timeline notifications for feed/messaging
Setup (FCM)
- • In Firebase console, create project & enable Cloud Messaging.
- • Download Web push cert (VAPID) or use FCM SDK key.
- • Add FCM server key and sender ID in admin > notifications.
- • Host
firebase-messaging-sw.jsat site root if required by your frontend. - • Serve site over HTTPS and test with a pilot audience first.
- • For mobile, include FCM config in the app bundle (Android/iOS).
Minimal web service worker
importScripts('https://www.gstatic.com/firebasejs/10.12.1/firebase-app-compat.js');
importScripts('https://www.gstatic.com/firebasejs/10.12.1/firebase-messaging-compat.js');
firebase.initializeApp({
apiKey: '...',
authDomain: '...',
projectId: '...',
messagingSenderId: '...',
appId: '...'
});
const messaging = firebase.messaging();
Troubleshooting
- • Ensure notifications permissions granted in browser.
- • Verify FCM key/sender ID match environment.
- • Check service worker served from root and correct scope.
- • Clear caches after changing the service worker.
Video & Audio Calls
Twilio · LiveKit · AgoraPrerequisites
- • SSL enabled on the domain
- • TURN/STUN credentials (if using custom servers)
- • Provider keys (Twilio/LiveKit/Agora)
Callback URLs
Match the reference: enable provider webhooks for call status where available. Use HTTPS endpoints and validate signatures.
Live Streaming
AgoraEnable live streaming via Agora (mirroring the reference docs). Provide App ID and App Certificate in admin, and ensure tokens are generated per session.
- • Enforce HTTPS and secure tokens.
- • Configure bandwidth caps and recording if needed.
- • Integrate moderation hooks to stop streams that violate policy.
Integrations
Add-onsGoogle Suite
- • Maps (geolocation in posts)
- • Vision (image safety)
- • reCAPTCHA / Turnstile
- • Translate (auto captions)
Media & Fun
- • Giphy / Tenor for GIF picker
- • OpenGraph link previews
- • Safe-search filters
Analytics
- • Google Analytics / Tag Manager
- • Custom pixels from admin widgets
- • Search ads placements across feed/search/messaging
Realtime & Presence
EngagementChannels
- • In-app alerts (feed, messages, mentions)
- • Email via SMTP or transactional providers
- • Web push (VAPID) with optional Firebase
- • SMS for OTP via Twilio/MSG91
Realtime
- • Broadcasting via Pusher-compatible drivers or internal WebSocket server.
- • Presence channels for chat typing/online status.
- • Interval heartbeats configurable in admin settings.
For production, run queue workers and websocket server under a supervisor to keep events flowing.
Mobile Apps
Android · iOSBuild with your preferred stack (Flutter/React Native). Use the Socialink REST APIs and enable OAuth clients for mobile redirect URIs.
- • Enable CORS for mobile origins.
- • Use HTTPS endpoints only.
- • Configure push keys (FCM/APNS) under admin > notifications.
- • For deep links, use
{base}/connect/{provider}with universal links/app links.
Flutter App Setup Guide
iOS & AndroidPrerequisites
- Flutter SDK 3.6.0 or higher
- Android Studio with Android SDK
- Xcode (for iOS, Mac only)
- Firebase account
- Backend server configured
# Verify Flutter installation
flutter doctor
# Get dependencies
flutter pub get
Step 1: Firebase Configuration
1.1 Create Firebase Project
- Go to Firebase Console
- Click "Add Project" and enter project name
- Enable/disable Analytics (optional)
- Create project
1.2 Add Android App
- Click "Add app" → Android icon
- Enter package name:
com.yourcompany.yourapp - Download
google-services.json - Place at:
android/app/google-services.json
1.3 Add iOS App
- Click "Add app" → iOS icon
- Enter bundle ID:
com.yourcompany.yourapp - Download
GoogleService-Info.plist - Place at:
ios/Runner/GoogleService-Info.plist
1.4 Enable Firebase Services
- Email/Password
- Google Sign-In
- Facebook Login
- Apple Sign-In (iOS)
- Cloud Firestore
- Cloud Messaging (FCM)
- Storage
1.5 Update Firebase Options
Edit lib/firebase_options.dart:
static const FirebaseOptions android = FirebaseOptions(
apiKey: 'YOUR_ANDROID_API_KEY',
appId: 'YOUR_ANDROID_APP_ID',
messagingSenderId: 'YOUR_SENDER_ID',
projectId: 'your-project-id',
storageBucket: 'your-project-id.firebasestorage.app',
);
static const FirebaseOptions ios = FirebaseOptions(
apiKey: 'YOUR_IOS_API_KEY',
appId: 'YOUR_IOS_APP_ID',
messagingSenderId: 'YOUR_SENDER_ID',
projectId: 'your-project-id',
storageBucket: 'your-project-id.firebasestorage.app',
iosClientId: 'YOUR_IOS_CLIENT_ID',
iosBundleId: 'com.yourcompany.yourapp',
);
Step 2: Package Name Configuration
2.1 Android Package Name
Update android/app/build.gradle:
android {
namespace = "com.yourcompany.yourapp"
defaultConfig {
applicationId = "com.yourcompany.yourapp"
}
}
Update MainActivity.kt:
package com.yourcompany.yourapp
import io.flutter.embedding.android.FlutterFragmentActivity
class MainActivity: FlutterFragmentActivity()
com/example/socialink_app/ to com/yourcompany/yourapp/
2.2 iOS Bundle Identifier
- Open
ios/Runner.xcworkspacein Xcode - Select "Runner" in project navigator
- In "General" tab, update "Bundle Identifier" to:
com.yourcompany.yourapp - Update app name in
Info.plist
Step 3: Backend & API Configuration
3.1 Configure Server URL
Edit lib/util/app_config.dart:
static const String _baseUrl = 'https://your-server-url.com';
3.2 OpenAI API (AI Image Generation)
static const String aiApiKey = 'sk-proj-YOUR_OPENAI_API_KEY';
Get from: OpenAI Platform
Step 4: Payment Gateway Setup
Stripe
Edit lib/util/stripe_config.dart:
static const String publishableKey = 'pk_test_YOUR_KEY';
static const String secretKey = 'sk_test_YOUR_KEY';
Get Keys →
PayPal
Edit lib/util/paypal_config.dart:
static const String clientId = 'YOUR_CLIENT_ID';
static const bool isTestMode = true;
Get Keys →
Flutterwave
Edit lib/util/flutterwave_config.dart:
static const String publicKey = 'FLWPUBK_TEST_YOUR_KEY';
Get Keys →
Step 5: Agora Setup (Live Streaming)
- Sign up at Agora Console
- Create new project and get App ID
- Update in these files:
# lib/features/live_stream/live_stream_view.dart
const appId = "YOUR_AGORA_APP_ID";
# lib/features/spaces/space_detail/space_detail_cubit.dart
const String kAgoraAppId = "YOUR_AGORA_APP_ID";
Step 6: Android Configuration
6.1 Generate Keystore
keytool -genkey -v -keystore upload-keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias your-key-alias
6.2 Configure key.properties
Create android/key.properties:
storePassword=your_keystore_password
keyPassword=your_key_password
keyAlias=your-key-alias
storeFile=upload-keystore.jks
6.3 Google Sign-In Setup
Add to AndroidManifest.xml:
<meta-data
android:name="com.google.android.gms.auth.GOOGLE_SIGN_IN_SERVER_CLIENT_ID"
android:value="YOUR_WEB_CLIENT_ID.apps.googleusercontent.com" />
Step 7: iOS Configuration
7.1 Configure Signing
- Open
ios/Runner.xcworkspacein Xcode - Select "Runner" target
- Go to "Signing & Capabilities"
- Select your Team (Xcode manages provisioning automatically)
7.2 Apple Sign-In
- In Xcode, select "Runner" target
- Go to "Signing & Capabilities"
- Click "+ Capability"
- Add "Sign in with Apple"
Step 8: Building the App
Android Build
# Debug
flutter run
# Release APK
flutter build apk --release
# App Bundle (Play Store)
flutter build appbundle --release
Output: build/app/outputs/
iOS Build
# Build
flutter build ios --release
Then in Xcode:
- Product → Archive
- Distribute App
- Upload to App Store Connect
Common Issues & Solutions
FirebaseOptions are not configuredSolution: Update
lib/firebase_options.dart with actual credentials
from Firebase console.
build.gradle(namespace & applicationId)MainActivity.kt- Firebase console &
google-services.json
flutter clean
flutter pub get
cd ios && pod install && cd ..
flutter build apk --release
Pre-Launch Checklist
- All API keys configured
- Firebase properly set up
- Package names updated
- App name and icons updated
- Keystore configured (Android)
- Signing configured (iOS)
- Backend URL configured
- Payment gateways tested
- Agora streaming tested
- Tested on real devices
- Privacy policy added
- Release builds successful
Maintenance
OpsBackups
- • Daily DB dumps with encryption.
- • Media backups per provider (S3 lifecycle rules recommended).
- • Test restores monthly.
Housekeeping
- •
php artisan schedule:runvia cron. - •
php artisan queue:work --daemonunder supervisor. - • Rotate logs and clear caches each deploy (
php artisan optimize:clear).
Backup commands (examples)
mysqldump -u user -p socialink | gzip > /backups/socialink-$(date +%F).sql.gz
php artisan media:backup # if you have a custom media backup command
aws s3 sync /backups s3://your-backup-bucket/socialink/
Disaster recovery
- • Keep offsite copies of DB + media.
- • Document restore steps and test quarterly.
- • Ensure encryption keys and
.envbackups are stored securely.
Security
Hardening- • Enforce HTTPS and HSTS.
- • Rate-limit login and OTP endpoints.
- • Keep dependencies updated; run
composer auditin CI. - • Restrict admin routes by IP if possible.
- • Use signed URLs for media when offloading to public buckets.
- • Disable directory listing on the web server.
- • Allow only required upload extensions; scan uploads when possible.
- • Keep
.envoutside VCS and secure backups with encryption.
Updates & Upgrade
ReleasesZero-downtime flow
- Put site in maintenance mode:
php artisan down. - Backup DB and
.env. - Pull new release or upload update package.
- Run:
composer install --no-dev --optimize-autoloader. - Run:
php artisan migrate --force. - Clear caches:
php artisan optimize:clear. - Rebuild caches:
php artisan config:cache && php artisan route:cache. - Restart queue/websocket supervisors.
- Bring site up:
php artisan up.
After update
- • Verify homepage, login, and uploads.
- • Test payments in sandbox mode.
- • Confirm webhooks still firing (wallet/subscriptions).
- • Check cron and workers are running.
- • Clear browser cache if UI assets changed.
Troubleshooting
Common fixesInstaller/config issues
- • 500 error after install → check
storage/logs/laravel.log. - • ENV not applied → run
php artisan config:clear. - • Redirect loop → ensure
APP_URLand HTTPS config match. - • Storage 403 → confirm
php artisan storage:linkand web server allows symlinks. - • Migrations failing → verify DB user permissions and charset
utf8mb4.
Feature-specific
- • Social login failing → verify redirect URIs and app is published.
- • Payments not updating → check webhooks and queue worker status.
- • Push not received → HTTPS required; verify VAPID/FCM keys.
- • Calls/live stream not connecting → ensure SSL and correct TURN/Agora keys.
- • Media not showing from CDN → confirm CORS, cache headers, and correct CDN domain.
Support
Help desk- • Open a ticket with purchase code, domain, and issue details.
- • Include server specs and recent logs for faster triage.
- • For installation help, provide temporary admin access (optional).
- • Community FAQs and comprehensive guides available for all features.
Response windows depend on support plan. Keep credentials rotated after assistance.
FAQ
CommonChangelog
RecentInitial Release
- Initial commit
- Complete Laravel 12 social networking platform
- Full-featured mobile app support (Flutter)
- Comprehensive documentation
Social Logins
OAuth callbacksConfigure provider apps with your domain and redirect URIs. Replace
{base}with your site URL (shown below). These steps mirror the reference docs flow, adapted to Socialink endpoints.{base}/connect/facebook{base}/connect/google{base}/connect/twitter{base}/connect/linkedin{base}/connect/appleFacebook
developers.facebook.com→ App Domains & Site URL = your domain.{base}/connect/facebook.Google
console.cloud.google.comcreate OAuth consent + Web client.{base}/connect/google.X (Twitter)
{base}/connect/twitter.LinkedIn
developer.linkedin.com.{base}/connect/linkedin.r_emailaddress,r_liteprofile.Apple
{base}/connect/apple.