Files
2025-11-30 11:57:22 +01:00

147 lines
4.7 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>SocialBase Extension Installation Guide</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
:root { color-scheme: dark; }
body {
background: #111417;
color: #e8e8ea;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif;
line-height: 1.6;
margin: 0;
padding: 2rem;
}
main { max-width: 980px; margin: 0 auto; }
h1,h2,h3 { color: #f7b3ff; margin-top: 1.5rem; }
code {
background: #1b1f24;
padding: .15rem .35rem;
border-radius: 6px;
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
pre code {
display: block;
background: #1b1f24;
padding: 1rem;
overflow-x: auto;
border-radius: 8px;
}
a { color: #84caff; }
hr { border: 0; border-top: 1px solid #2a2f36; margin: 2rem 0; }
.warning {
background: #4a3a2d;
padding: 1rem;
border-left: 4px solid #ffaa00;
border-radius: 4px;
margin: 1rem 0;
}
</style>
</head>
<body>
<main>
<h1>🚀 SocialBase Extension Installation Guide</h1>
<p>This guide installs the <strong>SocialBase</strong> extension for Paymenter. SocialBase is the foundation extension that provides user profiles, messaging, and social features.</p>
<hr />
<h2>⚡ Quick Install</h2>
<h3>Single Line Install</h3>
<pre><code>php artisan migrate --path=extensions/Others/SocialBase/database/migrations --force && npm run build && php artisan config:clear && php artisan view:clear && php artisan cache:clear && php artisan route:clear</code></pre>
<hr />
<h2>🧱 Step-by-Step Installation</h2>
<h3>1) Prepare</h3>
<pre><code>cd /var/www/paymenter
sudo chown -R www-data:www-data .
sudo chmod -R 755 .</code></pre>
<p>Make sure <code>.env</code> is configured and the site loads.</p>
<h3>2) Upload Extension</h3>
<p>Place the SocialBase folder in <code>extensions/Others/</code>:</p>
<pre><code>extensions/Others/
└── SocialBase/
├── SocialBase.php
├── database/migrations/
├── resources/
├── Admin/
├── Livewire/
├── Models/
└── Policies/</code></pre>
<h3>3) Run Migrations</h3>
<pre><code>php artisan migrate --path=extensions/Others/SocialBase/database/migrations --force</code></pre>
<h3>4) Build Assets</h3>
<p>Using <strong>NPM</strong> (default):</p>
<pre><code>( [ -f package-lock.json ] && npm ci || npm install )
npm run build</code></pre>
<p>Using <strong>Yarn</strong> (optional):</p>
<pre><code>( [ -f yarn.lock ] && yarn install --frozen-lockfile || yarn install )
yarn build</code></pre>
<h3>5) Clear Caches</h3>
<pre><code>php artisan config:clear
php artisan view:clear
php artisan cache:clear
php artisan route:clear</code></pre>
<h3>6) Enable in Admin</h3>
<ol>
<li>Login → <strong>Admin Panel → Extensions → Others</strong></li>
<li>Enable <strong>SocialBase</strong> ✅</li>
<li>Configure settings as needed</li>
</ol>
<div class="warning">
<strong>Note:</strong> SocialBase should be enabled <strong>first</strong> before Reviews or Forum, as they depend on it.
</div>
<h3>7) Configuration</h3>
<ul>
<li><strong>User Profiles</strong>: Avatar/banner settings, profile customization</li>
<li><strong>Messaging</strong>: Private messaging preferences</li>
<li><strong>Social Features</strong>: Comments, reactions, notifications</li>
</ul>
<hr />
<h2>✅ Verify Installation</h2>
<pre><code># Routes contain social features?
php artisan route:list | grep -Ei 'social|profile|message'
# Tables exist?
mysql -u root -p -e "USE paymenter; SHOW TABLES LIKE '%user_profiles%';"
# Frontend rebuilt?
[ -d public/build ] && echo 'Assets built ✔' || echo 'Build missing ✖'</code></pre>
<hr />
<h2>🧯 Troubleshooting</h2>
<ul>
<li><strong>"Extension not visible"</strong> → Clear caches (<code>php artisan view:clear && php artisan cache:clear</code>), then re-check admin panel.</li>
<li><strong>DB errors</strong> → Confirm <code>.env</code> DB credentials, run migrations again.</li>
<li><strong>Styles missing</strong> → Rebuild assets (<code>npm run build</code> or <code>yarn build</code>) and hard refresh the browser.</li>
<li><strong>Permission denied</strong> → Re-apply <code>chown</code>/<code>chmod</code> from Step 1.</li>
</ul>
<hr />
<h2>🎉 Done</h2>
<p>SocialBase is now installed! You can now install Reviews and Forum extensions which depend on this foundation.</p>
</main>
</body>
</html>