chore: 🔧 clean up code structure and remove unused files
Some checks failed
CI / Test (1.22) (push) Failing after -24m45s
CI / Test (1.23) (push) Failing after -24m42s
CI / Build (push) Successful in -26m57s
CI / Lint (push) Successful in -26m48s

* Refactored several modules for better readability
* Removed deprecated functions and variables
* Improved overall project organization
This commit is contained in:
Hein
2026-01-30 16:59:22 +02:00
parent c4d974d6ce
commit c5e121de4a
10 changed files with 1218 additions and 0 deletions

View File

@@ -0,0 +1,424 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>WhatsHooked - WhatsApp Webhook Bridge</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
color: #333;
}
.container {
background: white;
border-radius: 20px;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
max-width: 800px;
width: 100%;
padding: 60px 40px;
text-align: center;
}
.logo-container {
margin-bottom: 40px;
animation: fadeInDown 0.8s ease;
}
.logo {
width: 200px;
height: 200px;
margin: 0 auto 20px;
}
.logo img {
width: 100%;
height: 100%;
object-fit: contain;
}
h1 {
font-size: 3em;
margin-bottom: 20px;
animation: fadeInDown 0.8s ease 0.2s both;
}
h1 .whats {
color: #1e88e5;
}
h1 .hooked {
color: #1a237e;
}
.tagline {
font-size: 1.3em;
color: #666;
margin-bottom: 40px;
animation: fadeInUp 0.8s ease 0.4s both;
}
.status {
background: #e8f5e9;
border: 2px solid #4caf50;
border-radius: 10px;
padding: 20px;
margin-bottom: 40px;
animation: fadeInUp 0.8s ease 0.6s both;
}
.status-indicator {
display: inline-block;
width: 12px;
height: 12px;
background: #4caf50;
border-radius: 50%;
margin-right: 10px;
animation: pulse 2s infinite;
}
.status-text {
color: #2e7d32;
font-weight: 600;
font-size: 1.1em;
}
.features {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 20px;
margin-bottom: 40px;
animation: fadeInUp 0.8s ease 0.8s both;
}
.feature {
background: #f5f5f5;
padding: 20px;
border-radius: 10px;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature:hover {
transform: translateY(-5px);
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
.feature-icon {
font-size: 2em;
margin-bottom: 10px;
}
.feature-title {
font-weight: 600;
margin-bottom: 8px;
color: #1a237e;
}
.feature-text {
font-size: 0.9em;
color: #666;
}
.endpoints {
background: #f8f9fa;
border-radius: 10px;
padding: 30px;
text-align: left;
animation: fadeInUp 0.8s ease 1s both;
}
.endpoints h2 {
color: #1a237e;
margin-bottom: 20px;
text-align: center;
}
.endpoint-group {
margin-bottom: 20px;
}
.endpoint-group h3 {
color: #1e88e5;
font-size: 1em;
margin-bottom: 10px;
}
.endpoint {
background: white;
padding: 12px 15px;
margin-bottom: 8px;
border-radius: 6px;
font-family: 'Monaco', 'Courier New', monospace;
font-size: 0.85em;
display: flex;
align-items: center;
gap: 10px;
}
.endpoint-method {
background: #1e88e5;
color: white;
padding: 4px 8px;
border-radius: 4px;
font-weight: 600;
font-size: 0.85em;
min-width: 60px;
text-align: center;
}
.endpoint-method.post {
background: #4caf50;
}
.endpoint-method.delete {
background: #f44336;
}
.endpoint-path {
color: #666;
}
.footer {
margin-top: 40px;
padding-top: 30px;
border-top: 2px solid #eee;
color: #999;
font-size: 0.9em;
animation: fadeIn 0.8s ease 1.2s both;
}
.footer a {
color: #1e88e5;
text-decoration: none;
}
.footer a:hover {
text-decoration: underline;
}
@keyframes fadeInDown {
from {
opacity: 0;
transform: translateY(-20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes pulse {
0%, 100% {
opacity: 1;
}
50% {
opacity: 0.5;
}
}
@media (max-width: 600px) {
.container {
padding: 40px 20px;
}
h1 {
font-size: 2em;
}
.tagline {
font-size: 1.1em;
}
.logo {
width: 150px;
height: 150px;
}
.endpoint {
flex-direction: column;
align-items: flex-start;
}
}
</style>
</head>
<body>
<div class="container">
<div class="logo-container">
<div class="logo">
<img src="/static/logo.png" alt="WhatsHooked Logo">
</div>
<h1><span class="whats">Whats</span><span class="hooked">Hooked</span></h1>
<p class="tagline">Bridge your WhatsApp messages to webhooks</p>
</div>
<div class="status">
<span class="status-indicator"></span>
<span class="status-text">Server is running</span>
</div>
<div class="features">
<div class="feature">
<div class="feature-icon">📱</div>
<div class="feature-title">WhatsApp Integration</div>
<div class="feature-text">Connect via WhatsApp Web or Business API</div>
</div>
<div class="feature">
<div class="feature-icon">🔗</div>
<div class="feature-title">Webhook Bridge</div>
<div class="feature-text">Forward messages to your custom endpoints</div>
</div>
<div class="feature">
<div class="feature-icon"></div>
<div class="feature-title">Real-time Events</div>
<div class="feature-text">Instant message delivery and status updates</div>
</div>
<div class="feature">
<div class="feature-icon">💾</div>
<div class="feature-title">Message Cache</div>
<div class="feature-text">Never lose messages with persistent storage</div>
</div>
</div>
<div class="endpoints">
<h2>Available API Endpoints</h2>
<div class="endpoint-group">
<h3>📊 Status & Health</h3>
<div class="endpoint">
<span class="endpoint-method">GET</span>
<span class="endpoint-path">/health</span>
</div>
</div>
<div class="endpoint-group">
<h3>🔌 Webhooks</h3>
<div class="endpoint">
<span class="endpoint-method">GET</span>
<span class="endpoint-path">/api/hooks</span>
</div>
<div class="endpoint">
<span class="endpoint-method post">POST</span>
<span class="endpoint-path">/api/hooks/add</span>
</div>
<div class="endpoint">
<span class="endpoint-method delete">DELETE</span>
<span class="endpoint-path">/api/hooks/remove</span>
</div>
</div>
<div class="endpoint-group">
<h3>👤 Accounts</h3>
<div class="endpoint">
<span class="endpoint-method">GET</span>
<span class="endpoint-path">/api/accounts</span>
</div>
<div class="endpoint">
<span class="endpoint-method post">POST</span>
<span class="endpoint-path">/api/accounts/add</span>
</div>
<div class="endpoint">
<span class="endpoint-method post">POST</span>
<span class="endpoint-path">/api/accounts/update</span>
</div>
<div class="endpoint">
<span class="endpoint-method post">POST</span>
<span class="endpoint-path">/api/accounts/disable</span>
</div>
<div class="endpoint">
<span class="endpoint-method post">POST</span>
<span class="endpoint-path">/api/accounts/enable</span>
</div>
<div class="endpoint">
<span class="endpoint-method delete">DELETE</span>
<span class="endpoint-path">/api/accounts/remove</span>
</div>
</div>
<div class="endpoint-group">
<h3>💬 Send Messages</h3>
<div class="endpoint">
<span class="endpoint-method post">POST</span>
<span class="endpoint-path">/api/send</span>
</div>
<div class="endpoint">
<span class="endpoint-method post">POST</span>
<span class="endpoint-path">/api/send/image</span>
</div>
<div class="endpoint">
<span class="endpoint-method post">POST</span>
<span class="endpoint-path">/api/send/video</span>
</div>
<div class="endpoint">
<span class="endpoint-method post">POST</span>
<span class="endpoint-path">/api/send/document</span>
</div>
</div>
<div class="endpoint-group">
<h3>💾 Message Cache</h3>
<div class="endpoint">
<span class="endpoint-method">GET</span>
<span class="endpoint-path">/api/cache</span>
</div>
<div class="endpoint">
<span class="endpoint-method">GET</span>
<span class="endpoint-path">/api/cache/stats</span>
</div>
<div class="endpoint">
<span class="endpoint-method post">POST</span>
<span class="endpoint-path">/api/cache/replay</span>
</div>
</div>
<div class="endpoint-group">
<h3>🔔 WhatsApp Business API</h3>
<div class="endpoint">
<span class="endpoint-method">GET</span>
<span class="endpoint-path">/webhooks/whatsapp/{account_id}</span>
</div>
<div class="endpoint">
<span class="endpoint-method post">POST</span>
<span class="endpoint-path">/webhooks/whatsapp/{account_id}</span>
</div>
</div>
</div>
<div class="footer">
<p>Need help? Check out the <a href="https://git.warky.dev/wdevs/whatshooked" target="_blank">documentation</a></p>
<p style="margin-top: 10px;">Made with ❤️ for developers</p>
</div>
</div>
</body>
</html>