5.6 KiB
Certificate Authority & API Management System
A robust, modern platform for managing Root CAs, Intermediate CAs, and Leaf Certificates with an integrated API management system. Built on Laravel 12, Tailwind CSS v4, and Alpine.js.
🚀 Key Features
- CA Management: Securely manage Root and Intermediate CAs.
- Certificate Issuance: Issue and manage Leaf certificates for users.
- API Key System: Advanced API key management with:
- Regeneration: Securely rotate keys with a single click.
- Activity Tracking: Real-time "Last Used" monitoring.
- Public/Private Endpoints: Documentation with interactive tabs and code snippets.
- AJAX-Powered UI: Zero-refresh search, pagination, and status toggles.
- Dynamic Dashboard: Real-time metrics, certificate issuance trends, and server latency monitoring.
- Modern Interactive UI: High-performance dashboard with vibrant metrics and dark mode support.
🛠️ Built With
- Laravel 12: Secure and scalable backend framework.
- Tailwind CSS v4: Modern, utility-first styling.
- Alpine.js: Lightweight reactivity.
- Chart.js: Visual trend analysis.
🚦 Quick Start
1. Requirements
- PHP 8.2+ with the following extensions:
openssl(Required for SSL/TLS operations)zip(Required for certificate bundle downloads)bcmath(Required for large serial number handling)mbstring,xml,curl,ctype,filter(Standard Laravel requirements)
- Node.js 18+ & NPM
- OpenSSL CLI (Ensure it is accessible in your system PATH)
Note
Default PHP installations on Windows (XAMPP/WAMP), Mac (Homebrew), and Linux (apt/yum) often vary. Please ensure the extensions above are enabled in your
php.ini.
2. Setup
Option A: Terminal Access
# Clone and enter
git clone https://github.com/twinpath/app.git
cd app
# Install dependencies
composer install
npm install
# Setup environment
cp .env.example .env
php artisan key:generate
Option B: Manual (No Terminal/Shared Hosting)
- Download: Click the "Code" button on GitHub and select Download ZIP, then extract it to your local computer.
- Dependencies:
- Run
composer installandnpm run buildon your local computer. - Upload the entire project folder to your server via FTP/File Manager, including the
vendorandpublic/builddirectories.
- Run
- Environment:
- Rename
.env.exampleto.envusing your hosting File Manager. - APP_KEY: Since you cannot run
key:generate, visityourdomain.com/key-gen.htmlto generate a secure key, then paste it into theAPP_KEY=field in your.env.
- Rename
3. Database & Migrations
Option A: Terminal Access (Recommended)
php artisan migrate --seed
Option B: Manual Import (Shared Hosting)
If your hosting does not provide terminal access:
- Create a new database via your hosting panel (e.g., cPanel MySQL Wizard).
- Open phpMyAdmin.
- Select your database and go to the Import tab.
- Choose the file
database/install.sqlfrom this project and click Go.- Default Admin:
admin@dyzulk.com - Default Password:
password
- Default Admin:
🚀 Production Deployment
1. Optimize Environment
Update your .env for production:
APP_ENV=production
APP_DEBUG=false
APP_URL=https://yourdomain.com
2. Assets & Storage Link
Terminal Method
npm run build
php artisan storage:link
php artisan optimize
Manual Method (No Terminal)
- Assets: Ensure you have uploaded the
public/buildfolder from your local machine after runningnpm run build. - Storage Link: Create a file named
link.phpin yourpublic/directory with this content:Visit<?php symlink(__DIR__.'/../storage/app/public', __DIR__.'/storage'); echo "Storage link created!";yourdomain.com/link.phpin your browser, then delete the file. - Optimization: To clear cache manually, delete all files inside
storage/framework/views/andbootstrap/cache/(except.gitignore).
Important
Web Server Root: Ensure your domain/subdomain points to the
/publicdirectory of this project, not the root folder.
📡 API Endpoints
Public CA Certificates
GET /api/public/ca-certificates
Returns Root and Intermediate CA certificates in JSON format.
Authenticated Certificates
GET /api/v1/certificates
Retrieves user-specific leaf certificates. Requires X-API-KEY header.
🔄 CI/CD & Automated Deployment
The project includes an automation script for seamless deployment on aaPanel:
1. Script Setup
- Locate
deploy.sh.exampleand rename it todeploy.shon your server. - Edit
deploy.shand provide your specific paths and Telegram credentials. - Make the script executable:
chmod +x deploy.sh.
2. aaPanel Webhook Integration
- In aaPanel, install the Webhook app.
- Create a new Webhook and paste the following command:
/bin/bash /www/wwwroot/your-project-path/deploy.sh - Copy the Webhook URL provided by aaPanel.
3. GitHub Integration
- Go to your GitHub repository Settings > Webhooks.
- Click Add webhook.
- Paste your aaPanel Webhook URL into the Payload URL.
- Set Content type to
application/json. - Select Just the push event and click Add webhook.
Now, every time you push to the main branch, aaPanel will automatically pull the latest code, install dependencies, run migrations, and build assets.
📦 License
Refer to the LICENSE file for details.