Initial Commit

This commit is contained in:
AG
2025-12-20 23:15:29 +02:00
commit 68be2c81b0
7 changed files with 2683 additions and 0 deletions

34
ecosystem.config.js Normal file
View File

@@ -0,0 +1,34 @@
module.exports = {
apps: [
{
name: "ag-home",
script: "server.js",
cwd: "/usr/src/app",
exec_mode: "fork",
},
{
name: "ag-beats",
script: "npm",
args: "start",
cwd: "/usr/src/app/ag-beats",
},
{
name: "ag-ball",
script: "npm",
args: "start",
cwd: "/usr/src/app/ball-shooting",
},
{
name: "gymflow",
script: "dist/index.js",
cwd: "/usr/src/app/gymflow/server",
env: {
NODE_ENV: "production",
APP_MODE: "prod",
PORT: 3003,
DATABASE_URL: "file:./prod.db",
DATABASE_URL_PROD: "file:./prod.db"
}
}
]
};

BIN
favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 478 KiB

10
favicon.svg Normal file
View File

@@ -0,0 +1,10 @@
<svg width="512" height="512" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg">
<defs>
<linearGradient id="prism-gradient" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stop-color="#3b82f6" />
<stop offset="100%" stop-color="#8b5cf6" />
</linearGradient>
</defs>
<rect width="512" height="512" rx="140" fill="#0f172a" />
<path d="M256 120 L400 392 H112 L256 120ZM256 190 L160 360 H352 L256 190Z" fill="url(#prism-gradient)" />
</svg>

After

Width:  |  Height:  |  Size: 479 B

308
index.html Normal file
View File

@@ -0,0 +1,308 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="AG Home - Your personal hub for high-performance web applications and tools.">
<title>AG Home | Application Gateway</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap" rel="stylesheet">
<link rel="icon" type="image/svg+xml" href="favicon.svg">
<style>
:root {
--bg-color: #0f172a;
--card-bg: rgba(30, 41, 59, 0.7);
--text-primary: #f8fafc;
--text-secondary: #94a3b8;
--accent-beats: #f97316;
--accent-ball: #3b82f6;
--accent-unisono: #a855f7;
--accent-gymflow: #10b981;
--glass-border: rgba(255, 255, 255, 0.1);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Outfit', sans-serif;
background-color: var(--bg-color);
background-image:
radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 40%),
radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.15) 0%, transparent 40%);
color: var(--text-primary);
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
overflow-x: hidden;
padding: 2rem;
}
header {
text-align: center;
margin-bottom: 4rem;
animation: fadeInDown 0.8s ease-out;
}
h1 {
font-size: clamp(2.5rem, 8vw, 4rem);
font-weight: 700;
background: linear-gradient(to right, #60a5fa, #a855f7, #ec4899);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
margin-bottom: 0.5rem;
letter-spacing: -0.02em;
}
header p {
font-size: 1.2rem;
color: var(--text-secondary);
font-weight: 300;
}
nav {
width: 100%;
max-width: 1000px;
}
ul {
list-style: none;
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 2rem;
width: 100%;
}
li {
animation: fadeInUp 0.8s ease-out forwards;
opacity: 0;
display: flex;
flex: 0 1 260px;
}
li:nth-child(1) {
animation-delay: 0.1s;
}
li:nth-child(2) {
animation-delay: 0.2s;
}
li:nth-child(3) {
animation-delay: 0.3s;
}
li:nth-child(4) {
animation-delay: 0.4s;
}
.app-card {
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
padding: 2.5rem;
background: var(--card-bg);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border: 1px solid var(--glass-border);
border-radius: 24px;
text-decoration: none;
color: inherit;
transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
position: relative;
overflow: hidden;
text-align: center;
width: 100%;
height: 100%;
}
.app-card::before {
content: '';
position: absolute;
top: -30px;
left: 50%;
width: 140%;
height: 40px;
background: radial-gradient(ellipse at center, var(--accent-color) 0%, transparent 70%);
transform: translateX(-50%) translateY(0);
transition: transform 0.4s ease, opacity 0.4s ease;
pointer-events: none;
opacity: 0;
z-index: 1;
}
.app-card:hover {
transform: translateY(-10px);
border-color: rgba(255, 255, 255, 0.2);
box-shadow:
0 20px 40px rgba(0, 0, 0, 0.4),
inset 0 0 20px -5px var(--accent-color);
}
.app-card:hover::before {
opacity: 0.4;
transform: translateX(-50%) translateY(12px);
}
.icon-wrapper {
width: 64px;
height: 64px;
background: rgba(255, 255, 255, 0.05);
border-radius: 16px;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 1.5rem;
font-size: 2rem;
transition: transform 0.3s ease;
overflow: hidden;
padding: 12px;
}
.app-icon {
width: 100%;
height: 100%;
object-fit: contain;
filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
}
.app-card:hover .icon-wrapper {
transform: scale(1.1) rotate(5deg);
}
.app-name {
font-size: 1.5rem;
font-weight: 600;
margin-bottom: 0.5rem;
}
.app-desc {
font-size: 0.9rem;
color: var(--text-secondary);
line-height: 1.4;
}
/* Branding Colors */
.beats {
--accent-color: var(--accent-beats);
}
.ball {
--accent-color: var(--accent-ball);
}
.unisono {
--accent-color: var(--accent-unisono);
}
.gymflow {
--accent-color: var(--accent-gymflow);
}
@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);
}
}
@media (max-width: 640px) {
body {
padding: 1rem;
}
header {
margin-bottom: 2rem;
}
li {
flex: 1 1 100%;
}
}
</style>
</head>
<body>
<header>
<h1>AG Home</h1>
<p>Application Gateway</p>
</header>
<nav>
<ul>
<li>
<a href="https://beats.aglink.duckdns.org/" target="_blank" rel="noopener noreferrer"
class="app-card beats">
<div class="icon-wrapper">
<img src="/ag-beats/src/favicon.svg" alt="" class="app-icon"
onerror="this.parentElement.innerHTML='🎵'">
</div>
<div class="app-name">Beat Machine</div>
<p class="app-desc">Expressive rhythm and sound synthesizer</p>
</a>
</li>
<li>
<a href="https://2d-ball.aglink.duckdns.org/" target="_blank" rel="noopener noreferrer"
class="app-card ball">
<div class="icon-wrapper">
<img src="https://2d-ball.aglink.duckdns.org/favicon.ico" alt="" class="app-icon"
onerror="this.parentElement.innerHTML='🏀'">
</div>
<div class="app-name">Ball Shooting</div>
<p class="app-desc">Physics-based arcade challenge</p>
</a>
</li>
<li>
<a href="https://unisono.aglink.duckdns.org/" target="_blank" rel="noopener noreferrer"
class="app-card unisono">
<div class="icon-wrapper">
<img src="https://unisono.aglink.duckdns.org/logo.svg" alt="" class="app-icon"
onerror="this.parentElement.innerHTML='🎹'">
</div>
<div class="app-name">Unisono</div>
<p class="app-desc">Find ways to connect with your group</p>
</a>
</li>
<li>
<a href="https://gymflow.aglink.duckdns.org" target="_blank" rel="noopener noreferrer"
class="app-card gymflow">
<div class="icon-wrapper">
<img src="https://gymflow.aglink.duckdns.org/assets/favicon-BhmDZJJj.svg" alt=""
class="app-icon" onerror="this.parentElement.innerHTML='💪'">
</div>
<div class="app-name">GymFlow</div>
<p class="app-desc">AI-powered fitness and workout tracker</p>
</a>
</li>
</ul>
</nav>
</body>
</html>

2291
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

6
package.json Normal file
View File

@@ -0,0 +1,6 @@
{
"dependencies": {
"express": "^5.1.0",
"pm2": "^6.0.8"
}
}

34
server.js Normal file
View File

@@ -0,0 +1,34 @@
const express = require('express');
const path = require('path');
const http = require('http'); // Changed from https to http
const app = express();
const port = 3000; // This is the port your container listens on internally
// --- SSL/TLS Certificate code removed ---
// Nginx Proxy Manager handles HTTPS, so the app only needs to listen for HTTP.
// Serve static files from the current directory (which is /usr/src/app due to volume mapping)
app.use(express.static(path.join(__dirname)));
// Route for the root URL, serving index.html
app.get('/', (req, res) => {
res.sendFile(path.join(__dirname, 'index.html'), (err) => {
if (err) {
console.error('Error sending index.html:', err);
res.status(404).send('File not found or other server error.');
}
});
});
// Create an HTTP server using the Express app
const httpServer = http.createServer(app);
// Start the HTTP server on the internal container port (3000)
httpServer.listen(port, () => {
console.log(`HTTP Server running on port ${port} inside the container.`);
console.log(`Access this via Nginx Proxy Manager at https://apps.aglink.duckdns.org/`);
});
// Optional: Implement a handler to trust proxies (like Nginx)
// to correctly identify the client IP, though often not strictly necessary for simple routing.
// app.set('trust proxy', 1);