2026-10-14 16:16:22 +05:30
<!DOCTYPE html>
< html lang = "en" >
< head >
< meta charset = "UTF-8" >
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" >
< title > Cosmos Orbit — Application Platform & Container Runtime</ title >
< link rel = "icon" href = "data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><circle cx='16' cy='16' r='6' fill='%2338bdf8'/><circle cx='16' cy='16' r='12' fill='none' stroke='%2338bdf8' stroke-width='1.5' stroke-dasharray='4 3'/></svg>" >
< 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=JetBrains+Mono:wght@400;500;600&family=Space+Grotesk:wght@400;500;600;700;800&display=swap" rel = "stylesheet" >
< link rel = "stylesheet" href = "/tailwind.css" >
< style >
: root {
--bg-dark : #05070d ;
--bg-card : rgba ( 13 , 19 , 33 , 0.75 );
--border-card : rgba ( 255 , 255 , 255 , 0.08 );
--accent-cyan : #38bdf8 ;
--accent-purple : #a855f7 ;
--accent-green : #10b981 ;
--accent-amber : #f59e0b ;
--accent-red : #ef4444 ;
--text-main : #f1f5f9 ;
--text-dim : #94a3b8 ;
--text-muted : #64748b ;
--font-mono : 'JetBrains Mono' , monospace ;
--font-disp : 'Space Grotesk' , sans-serif ;
}
* { box-sizing : border-box ; margin : 0 ; padding : 0 ; }
body {
background-color : var ( -- bg - dark );
color : var ( -- text - main );
font-family : var ( -- font - disp );
min-height : 100 vh ;
overflow-x : hidden ;
background-image :
radial-gradient ( ellipse at 20 % 0 % , rgba ( 56 , 189 , 248 , 0.08 ) 0 % , transparent 60 % ),
radial-gradient ( ellipse at 80 % 10 % , rgba ( 168 , 85 , 247 , 0.06 ) 0 % , transparent 50 % ),
radial-gradient ( ellipse at 50 % 100 % , rgba ( 15 , 23 , 42 , 0.8 ) 0 % , transparent 80 % );
}
/* Header */
. orbit-header {
height : 64 px ;
display : flex ;
align-items : center ;
justify-content : space-between ;
padding : 0 32 px ;
background : rgba ( 8 , 12 , 22 , 0.7 );
backdrop-filter : blur ( 16 px );
border-bottom : 1 px solid rgba ( 255 , 255 , 255 , 0.06 );
position : sticky ;
top : 0 ;
z-index : 50 ;
}
. brand-link {
display : flex ;
align-items : center ;
gap : 12 px ;
text-decoration : none ;
color : #fff ;
font-weight : 700 ;
font-size : 17 px ;
letter-spacing : -0.02 em ;
}
. brand-badge {
font-family : var ( -- font - mono );
font-size : 10 px ;
padding : 2 px 8 px ;
border-radius : 999 px ;
background : rgba ( 56 , 189 , 248 , 0.12 );
border : 1 px solid rgba ( 56 , 189 , 248 , 0.25 );
color : var ( -- accent - cyan );
text-transform : uppercase ;
letter-spacing : 0.08 em ;
}
. nav-btn {
display : inline-flex ;
align-items : center ;
gap : 8 px ;
padding : 8 px 16 px ;
border-radius : 10 px ;
font-size : 13 px ;
font-weight : 600 ;
text-decoration : none ;
cursor : pointer ;
2026-10-14 16:48:17 +05:30
transition : all 0.25 s cubic-bezier ( 0.16 , 1 , 0.3 , 1 );
2026-10-14 16:16:22 +05:30
border : 1 px solid transparent ;
2026-10-14 16:48:17 +05:30
position : relative ;
2026-10-14 16:16:22 +05:30
}
. nav-btn-ghost {
background : rgba ( 255 , 255 , 255 , 0.04 );
color : var ( -- text - dim );
2026-10-14 16:48:17 +05:30
border : 1 px solid rgba ( 255 , 255 , 255 , 0.09 );
backdrop-filter : blur ( 8 px );
2026-10-14 16:16:22 +05:30
}
. nav-btn-ghost : hover {
2026-10-14 16:48:17 +05:30
background : rgba ( 56 , 189 , 248 , 0.12 );
color : #38bdf8 ;
border-color : rgba ( 56 , 189 , 248 , 0.55 );
transform : translateY ( -2 px );
box-shadow : 0 0 18 px rgba ( 56 , 189 , 248 , 0.35 ), 0 4 px 12 px rgba ( 0 , 0 , 0 , 0.4 );
}
. nav-btn-ghost : active {
transform : translateY ( 0 );
2026-10-14 16:16:22 +05:30
}
. nav-btn-primary {
2026-10-14 16:48:17 +05:30
background : linear-gradient ( 135 deg , #0284c7 0 % , #38bdf8 50 % , #818cf8 100 % );
background-size : 200 % 200 % ;
2026-10-14 16:16:22 +05:30
color : #fff ;
2026-10-14 16:48:17 +05:30
border : 1 px solid rgba ( 255 , 255 , 255 , 0.25 );
box-shadow : 0 4 px 16 px rgba ( 56 , 189 , 248 , 0.35 ), inset 0 1 px 1 px rgba ( 255 , 255 , 255 , 0.4 );
2026-10-14 16:16:22 +05:30
}
. nav-btn-primary : hover {
2026-10-14 16:48:17 +05:30
transform : translateY ( -2 px ) scale ( 1.02 );
box-shadow : 0 0 28 px rgba ( 56 , 189 , 248 , 0.7 ), 0 8 px 25 px rgba ( 0 , 0 , 0 , 0.5 ), inset 0 1 px 2 px rgba ( 255 , 255 , 255 , 0.6 );
background-position : 100 % 100 % ;
}
. nav-btn-primary : active {
transform : translateY ( 0 ) scale ( 0.99 );
2026-10-14 16:16:22 +05:30
}
/* Container & Layout */
. main-wrap {
max-width : 1380 px ;
margin : 0 auto ;
padding : 32 px 32 px 64 px ;
2026-10-14 16:48:17 +05:30
position : relative ;
z-index : 10 ;
2026-10-14 16:16:22 +05:30
}
/* Stats Grid */
. stats-grid {
display : grid ;
grid-template-columns : repeat ( auto - fit , minmax ( 240 px , 1 fr ));
gap : 18 px ;
margin-bottom : 32 px ;
}
. stat-card {
background : var ( -- bg - card );
backdrop-filter : blur ( 12 px );
border : 1 px solid var ( -- border - card );
border-radius : 16 px ;
padding : 20 px 24 px ;
display : flex ;
flex-direction : column ;
gap : 6 px ;
box-shadow : 0 8 px 24 px rgba ( 0 , 0 , 0 , 0.2 );
2026-10-14 16:48:17 +05:30
transition : all 0.3 s cubic-bezier ( 0.16 , 1 , 0.3 , 1 );
}
. stat-card : hover {
border-color : rgba ( 56 , 189 , 248 , 0.35 );
transform : translateY ( -3 px );
box-shadow : 0 16 px 36 px rgba ( 0 , 0 , 0 , 0.4 ), 0 0 24 px rgba ( 56 , 189 , 248 , 0.16 );
2026-10-14 16:16:22 +05:30
}
. stat-label {
font-size : 12.5 px ;
color : var ( -- text - muted );
font-weight : 600 ;
text-transform : uppercase ;
letter-spacing : 0.05 em ;
display : flex ;
justify-content : space-between ;
align-items : center ;
}
. stat-val {
font-size : 28 px ;
font-weight : 800 ;
color : #fff ;
letter-spacing : -0.03 em ;
font-family : var ( -- font - disp );
}
. stat-sub {
font-size : 12 px ;
color : var ( -- text - dim );
}
/* App Cards Grid */
. apps-grid {
display : grid ;
grid-template-columns : repeat ( auto - fill , minmax ( 380 px , 1 fr ));
gap : 20 px ;
}
. app-card {
background : var ( -- bg - card );
border : 1 px solid var ( -- border - card );
border-radius : 18 px ;
padding : 24 px ;
display : flex ;
flex-direction : column ;
gap : 16 px ;
2026-10-14 16:48:17 +05:30
transition : all 0.3 s cubic-bezier ( 0.16 , 1 , 0.3 , 1 );
2026-10-14 16:16:22 +05:30
position : relative ;
overflow : hidden ;
}
. app-card : hover {
2026-10-14 16:48:17 +05:30
border-color : rgba ( 56 , 189 , 248 , 0.45 );
box-shadow : 0 20 px 48 px rgba ( 0 , 0 , 0 , 0.5 ), 0 0 32 px rgba ( 56 , 189 , 248 , 0.2 );
transform : translateY ( -4 px );
2026-10-14 16:16:22 +05:30
}
. app-card-header {
display : flex ;
align-items : flex-start ;
justify-content : space-between ;
gap : 12 px ;
}
. app-name {
font-size : 18 px ;
font-weight : 700 ;
color : #fff ;
letter-spacing : -0.02 em ;
display : flex ;
align-items : center ;
gap : 10 px ;
}
. status-pill {
display : inline-flex ;
align-items : center ;
gap : 6 px ;
padding : 3 px 10 px ;
border-radius : 999 px ;
font-size : 11.5 px ;
font-weight : 700 ;
text-transform : uppercase ;
letter-spacing : 0.05 em ;
}
. status-running {
background : rgba ( 16 , 185 , 129 , 0.15 );
color : #34d399 ;
border : 1 px solid rgba ( 16 , 185 , 129 , 0.3 );
}
. status-building {
background : rgba ( 245 , 158 , 11 , 0.15 );
color : #fbbf24 ;
border : 1 px solid rgba ( 245 , 158 , 11 , 0.3 );
}
. status-stopped {
background : rgba ( 100 , 116 , 139 , 0.15 );
color : #94a3b8 ;
border : 1 px solid rgba ( 100 , 116 , 139 , 0.3 );
}
. status-failed {
background : rgba ( 239 , 68 , 68 , 0.15 );
color : #f87171 ;
border : 1 px solid rgba ( 239 , 68 , 68 , 0.3 );
}
. status-dot {
width : 6 px ;
height : 6 px ;
border-radius : 50 % ;
display : inline-block ;
}
. status-running . status-dot { background : #34d399 ; box-shadow : 0 0 8 px #34d399 ; animation : pulseDot 2 s infinite ; }
. status-building . status-dot { background : #fbbf24 ; animation : pulseDot 1 s infinite ; }
. status-stopped . status-dot { background : #94a3b8 ; }
. status-failed . status-dot { background : #f87171 ; }
@ keyframes pulseDot { 0 %, 100 % { opacity : 1 ; } 50 % { opacity : 0.3 ; } }
. app-meta-row {
display : flex ;
align-items : center ;
gap : 12 px ;
font-size : 12.5 px ;
color : var ( -- text - dim );
font-family : var ( -- font - mono );
}
. app-metrics-grid {
display : grid ;
grid-template-columns : 1 fr 1 fr ;
gap : 10 px ;
background : rgba ( 0 , 0 , 0 , 0.25 );
border : 1 px solid rgba ( 255 , 255 , 255 , 0.04 );
border-radius : 12 px ;
padding : 12 px 16 px ;
}
. metric-box {
display : flex ;
flex-direction : column ;
gap : 3 px ;
}
. metric-box-label {
font-size : 11 px ;
color : var ( -- text - muted );
text-transform : uppercase ;
font-weight : 600 ;
}
. metric-box-val {
font-size : 15 px ;
font-weight : 700 ;
color : #fff ;
font-family : var ( -- font - mono );
}
. app-card-actions {
display : flex ;
align-items : center ;
justify-content : space-between ;
gap : 10 px ;
padding-top : 8 px ;
border-top : 1 px solid rgba ( 255 , 255 , 255 , 0.05 );
}
. btn-sm-action {
padding : 6 px 12 px ;
border-radius : 8 px ;
font-size : 12 px ;
font-weight : 600 ;
display : inline-flex ;
align-items : center ;
gap : 6 px ;
2026-10-14 16:48:17 +05:30
border : 1 px solid rgba ( 255 , 255 , 255 , 0.09 );
2026-10-14 16:16:22 +05:30
background : rgba ( 255 , 255 , 255 , 0.03 );
color : var ( -- text - dim );
cursor : pointer ;
2026-10-14 16:48:17 +05:30
transition : all 0.22 s cubic-bezier ( 0.16 , 1 , 0.3 , 1 );
backdrop-filter : blur ( 4 px );
text-decoration : none ;
2026-10-14 16:16:22 +05:30
}
2026-10-14 16:48:17 +05:30
. btn-sm-action : hover , . btn-sm-action . act-logs : hover , . btn-sm-action . act-rebuild : hover {
background : rgba ( 56 , 189 , 248 , 0.15 );
color : #38bdf8 ;
border-color : rgba ( 56 , 189 , 248 , 0.55 );
transform : translateY ( -2 px );
box-shadow : 0 0 16 px rgba ( 56 , 189 , 248 , 0.45 ), 0 4 px 12 px rgba ( 0 , 0 , 0 , 0.3 );
}
. btn-sm-action . act-restart : hover , . btn-sm-action . act-start : hover {
background : rgba ( 16 , 185 , 129 , 0.18 );
color : #34d399 ;
border-color : rgba ( 16 , 185 , 129 , 0.6 );
transform : translateY ( -2 px );
box-shadow : 0 0 18 px rgba ( 16 , 185 , 129 , 0.45 ), 0 4 px 12 px rgba ( 0 , 0 , 0 , 0.3 );
}
. btn-sm-action . act-stop : hover {
background : rgba ( 245 , 158 , 11 , 0.18 );
color : #fbbf24 ;
border-color : rgba ( 245 , 158 , 11 , 0.6 );
transform : translateY ( -2 px );
box-shadow : 0 0 18 px rgba ( 245 , 158 , 11 , 0.45 ), 0 4 px 12 px rgba ( 0 , 0 , 0 , 0.3 );
}
. btn-sm-action . act-backup : hover {
background : rgba ( 168 , 85 , 247 , 0.2 );
color : #c084fc ;
border-color : rgba ( 168 , 85 , 247 , 0.6 );
transform : translateY ( -2 px );
box-shadow : 0 0 18 px rgba ( 168 , 85 , 247 , 0.45 ), 0 4 px 12 px rgba ( 0 , 0 , 0 , 0.3 );
}
. btn-sm-action . act-open {
color : var ( -- accent - cyan );
border-color : rgba ( 56 , 189 , 248 , 0.3 );
}
. btn-sm-action . act-open : hover {
background : linear-gradient ( 135 deg , rgba ( 2 , 132 , 199 , 0.3 ), rgba ( 56 , 189 , 248 , 0.25 ));
2026-10-14 16:16:22 +05:30
color : #fff ;
2026-10-14 16:48:17 +05:30
border-color : #38bdf8 ;
transform : translateY ( -2 px );
box-shadow : 0 0 22 px rgba ( 56 , 189 , 248 , 0.6 ), 0 4 px 14 px rgba ( 0 , 0 , 0 , 0.35 );
2026-10-14 16:16:22 +05:30
}
. btn-sm-action . danger : hover {
2026-10-14 16:48:17 +05:30
background : rgba ( 239 , 68 , 68 , 0.2 );
2026-10-14 16:16:22 +05:30
color : #f87171 ;
2026-10-14 16:48:17 +05:30
border-color : rgba ( 239 , 68 , 68 , 0.6 );
transform : translateY ( -2 px );
box-shadow : 0 0 18 px rgba ( 239 , 68 , 68 , 0.45 ), 0 4 px 12 px rgba ( 0 , 0 , 0 , 0.3 );
}
. btn-sm-action : active {
transform : translateY ( 0 );
2026-10-14 16:16:22 +05:30
}
/* Modal Styles */
. modal-overlay {
position : fixed ;
inset : 0 ;
background : rgba ( 3 , 7 , 18 , 0.85 );
backdrop-filter : blur ( 12 px );
z-index : 100 ;
display : flex ;
align-items : center ;
justify-content : center ;
padding : 24 px ;
opacity : 0 ;
pointer-events : none ;
transition : opacity 0.25 s ease ;
}
. modal-overlay . open {
opacity : 1 ;
pointer-events : auto ;
}
. modal-dialog {
background : #0b1120 ;
border : 1 px solid rgba ( 255 , 255 , 255 , 0.12 );
border-radius : 20 px ;
width : 100 % ;
max-width : 680 px ;
max-height : 90 vh ;
overflow-y : auto ;
box-shadow : 0 24 px 64 px rgba ( 0 , 0 , 0 , 0.6 );
padding : 32 px ;
display : flex ;
flex-direction : column ;
gap : 24 px ;
}
. modal-title {
font-size : 20 px ;
font-weight : 800 ;
color : #fff ;
letter-spacing : -0.02 em ;
}
. tab-row {
display : flex ;
gap : 8 px ;
border-bottom : 1 px solid rgba ( 255 , 255 , 255 , 0.08 );
padding-bottom : 10 px ;
}
. tab-btn {
background : transparent ;
2026-10-14 16:48:17 +05:30
border : 1 px solid transparent ;
2026-10-14 16:16:22 +05:30
color : var ( -- text - muted );
font-size : 13.5 px ;
font-weight : 600 ;
padding : 6 px 14 px ;
border-radius : 8 px ;
cursor : pointer ;
2026-10-14 16:48:17 +05:30
transition : all 0.2 s cubic-bezier ( 0.16 , 1 , 0.3 , 1 );
}
. tab-btn : hover {
color : #fff ;
background : rgba ( 255 , 255 , 255 , 0.06 );
border-color : rgba ( 255 , 255 , 255 , 0.12 );
transform : translateY ( -1 px );
2026-10-14 16:16:22 +05:30
}
. tab-btn . active {
2026-10-14 16:48:17 +05:30
background : rgba ( 56 , 189 , 248 , 0.15 );
2026-10-14 16:16:22 +05:30
color : var ( -- accent - cyan );
2026-10-14 16:48:17 +05:30
border-color : rgba ( 56 , 189 , 248 , 0.35 );
box-shadow : 0 0 14 px rgba ( 56 , 189 , 248 , 0.25 );
}
. template-card {
background : rgba ( 255 , 255 , 255 , 0.03 );
border : 1 px solid rgba ( 255 , 255 , 255 , 0.08 );
border-radius : 10 px ;
padding : 12 px ;
cursor : pointer ;
transition : all 0.25 s cubic-bezier ( 0.16 , 1 , 0.3 , 1 );
}
. template-card : hover {
background : rgba ( 56 , 189 , 248 , 0.08 );
border-color : rgba ( 56 , 189 , 248 , 0.4 );
transform : translateY ( -2 px );
box-shadow : 0 0 16 px rgba ( 56 , 189 , 248 , 0.25 );
2026-10-14 16:16:22 +05:30
}
. form-group {
display : flex ;
flex-direction : column ;
gap : 8 px ;
}
. form-label {
font-size : 12.5 px ;
font-weight : 600 ;
color : var ( -- text - dim );
}
. form-input {
background : rgba ( 255 , 255 , 255 , 0.04 );
border : 1 px solid rgba ( 255 , 255 , 255 , 0.1 );
border-radius : 10 px ;
padding : 10 px 14 px ;
color : #fff ;
font-size : 13.5 px ;
outline : none ;
transition : border-color 0.2 s ;
width : 100 % ;
}
. form-input : focus {
border-color : var ( -- accent - cyan );
}
/* Live Logs Terminal Viewer */
. terminal-window {
background : #020408 ;
border : 1 px solid rgba ( 255 , 255 , 255 , 0.08 );
border-radius : 14 px ;
padding : 16 px ;
font-family : var ( -- font - mono );
font-size : 12 px ;
line-height : 1.6 ;
color : #e2eaf2 ;
height : 480 px ;
overflow-y : auto ;
white-space : pre-wrap ;
word-break : break-all ;
}
/* Toast */
# toast-container {
position : fixed ;
bottom : 24 px ;
right : 24 px ;
z-index : 200 ;
display : flex ;
flex-direction : column ;
gap : 10 px ;
}
. toast {
background : rgba ( 15 , 23 , 42 , 0.95 );
border : 1 px solid rgba ( 56 , 189 , 248 , 0.3 );
color : #fff ;
padding : 12 px 20 px ;
border-radius : 12 px ;
font-size : 13 px ;
font-weight : 600 ;
box-shadow : 0 8 px 24 px rgba ( 0 , 0 , 0 , 0.5 );
animation : toastIn 0.3 s ease ;
}
@ keyframes toastIn { from { transform : translateY ( 20 px ); opacity : 0 ; } to { transform : translateY ( 0 ); opacity : 1 ; } }
</ style >
</ head >
< body >
2026-10-14 16:48:17 +05:30
< canvas id = "orbitSpaceCanvas" style = "position:fixed;inset:0;pointer-events:none;z-index:0;width:100%;height:100%;" ></ canvas >
2026-10-14 16:16:22 +05:30
<!-- Header -->
< header class = "orbit-header" >
< div style = "display: flex; align-items: center; gap: 20px;" >
< a href = "/" class = "brand-link" >
< svg width = "24" height = "24" viewBox = "0 0 32 32" >< circle cx = "16" cy = "16" r = "6" fill = "#38bdf8" />< circle cx = "16" cy = "16" r = "12" fill = "none" stroke = "#38bdf8" stroke-width = "1.5" stroke-dasharray = "4 3" /></ svg >
Cosmos Orbit
</ a >
< span class = "brand-badge" > Module 03 · App PaaS</ span >
</ div >
< div style = "display: flex; align-items: center; gap: 12px;" >
< a href = "/git" class = "nav-btn nav-btn-ghost" > Forge (Git)</ a >
< a href = "/oort" class = "nav-btn nav-btn-ghost" > Oort (S3)</ a >
< button class = "nav-btn nav-btn-primary" onclick = "openNewAppModal()" >
< svg width = "14" height = "14" fill = "none" stroke = "currentColor" stroke-width = "2.5" viewBox = "0 0 24 24" >< path d = "M12 5v14M5 12h14" /></ svg >
New Application
</ button >
</ div >
</ header >
<!-- Main Container -->
< div class = "main-wrap" >
<!-- Stats Row -->
< div class = "stats-grid" >
< div class = "stat-card" >
< div class = "stat-label" > Applications < span style = "color:var(--accent-cyan);" > Fleet</ span ></ div >
< div class = "stat-val" id = "stat-apps-count" > —</ div >
< div class = "stat-sub" id = "stat-apps-running" > — Running containers</ div >
</ div >
< div class = "stat-card" >
< div class = "stat-label" > Memory Allocation < span style = "color:var(--accent-purple);" > RAM</ span ></ div >
< div class = "stat-val" id = "stat-mem-total" > —</ div >
< div class = "stat-sub" > Across managed services</ div >
</ div >
< div class = "stat-card" >
< div class = "stat-label" > Container Engine < span style = "color:var(--accent-green);" > Docker</ span ></ div >
< div class = "stat-val" style = "font-size:20px; font-family:var(--font-mono); color:#34d399;" > v1.45 API</ div >
< div class = "stat-sub" > Direct socket integration</ div >
</ div >
< div class = "stat-card" >
< div class = "stat-label" > Ingress Gateway < span style = "color:var(--accent-amber);" > Proxy</ span ></ div >
< div class = "stat-val" style = "font-size:20px; font-family:var(--font-mono);" > :4100– :4999</ div >
< div class = "stat-sub" > Dynamic reverse proxy active</ div >
</ div >
</ div >
<!-- Applications Section Header -->
< div style = "display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px;" >
< div >
< h2 style = "font-size: 22px; font-weight: 800; color: #fff; letter-spacing: -0.02em;" > Managed Applications</ h2 >
< p style = "font-size: 13.5px; color: var(--text-dim);" > Live containers deployed from source repositories</ p >
</ div >
< div style = "display: flex; gap: 10px;" >
< button class = "btn-sm-action" onclick = "loadApplications()" >
< svg width = "13" height = "13" fill = "none" stroke = "currentColor" stroke-width = "2" viewBox = "0 0 24 24" >< polyline points = "23 4 23 10 17 10" />< path d = "M20.49 15a9 9 0 11-2.12-9.36L23 10" /></ svg >
Refresh
</ button >
</ div >
</ div >
<!-- Applications Grid Container -->
< div class = "apps-grid" id = "apps-container" >
< div style = "grid-column: 1 / -1; padding: 60px 20px; text-align: center; color: var(--text-muted);" >
Loading your application fleet…
</ div >
</ div >
</ div >
<!-- Modal: New Application Wizard -->
< div class = "modal-overlay" id = "modal-new-app" >
< div class = "modal-dialog" >
< div style = "display: flex; justify-content: space-between; align-items: center;" >
< div class = "modal-title" > Deploy New Application</ div >
< button onclick = "closeNewAppModal()" style = "background:none; border:none; color:var(--text-dim); font-size:18px; cursor:pointer;" > ✕</ button >
</ div >
<!-- Source Selection Tabs -->
< div class = "tab-row" >
< button class = "tab-btn active" id = "tab-btn-forge" onclick = "switchDeployTab('forge')" > Forge Repository</ button >
< button class = "tab-btn" id = "tab-btn-git" onclick = "switchDeployTab('git')" > Custom Git URL</ button >
< button class = "tab-btn" id = "tab-btn-tpl" onclick = "switchDeployTab('templates')" > Starter Templates</ button >
</ div >
< form id = "form-create-app" onsubmit = "submitNewApp(event)" >
<!-- Tab 1: Forge Picker -->
< div id = "tab-content-forge" >
< div class = "form-group" style = "margin-bottom: 16px;" >
< label class = "form-label" > Select from your Forge Repositories</ label >
< select id = "sel-forge-repo" class = "form-input" onchange = "onForgeRepoSelected(this.value)" >
< option value = "" > Loading your repositories…</ option >
</ select >
</ div >
</ div >
<!-- Tab 2: Custom Git -->
< div id = "tab-content-git" style = "display: none;" >
< div class = "form-group" style = "margin-bottom: 16px;" >
< label class = "form-label" > Git Clone URL (HTTPS)</ label >
< input type = "text" id = "inp-git-url" class = "form-input" placeholder = "https://github.com/org/repo.git" >
</ div >
</ div >
<!-- Tab 3: Starter Templates -->
< div id = "tab-content-templates" style = "display: none;" >
< div class = "form-group" style = "margin-bottom: 16px;" >
< label class = "form-label" > Choose a Quick-Start Template</ label >
< div id = "templates-list" style = "display:grid; grid-template-columns: 1fr 1fr; gap:10px;" ></ div >
</ div >
</ div >
<!-- Common Fields -->
< div style = "display: grid; grid-template-columns: 2fr 1fr; gap: 14px; margin-bottom: 16px;" >
< div class = "form-group" >
< label class = "form-label" > Application Name</ label >
< input type = "text" id = "inp-app-name" class = "form-input" required placeholder = "my-web-service" >
</ div >
< div class = "form-group" >
< label class = "form-label" > Branch</ label >
< input type = "text" id = "inp-app-branch" class = "form-input" value = "main" required >
</ div >
</ div >
< div class = "form-group" style = "margin-bottom: 24px;" >
< label class = "form-label" > Environment Variables (optional, KEY=VALUE per line)</ label >
< textarea id = "inp-app-env" class = "form-input" rows = "3" style = "font-family:var(--font-mono); font-size:12px;" placeholder = "NODE_ENV=production DATABASE_URL=postgres://..." ></ textarea >
</ div >
< div style = "display: flex; justify-content: flex-end; gap: 12px;" >
< button type = "button" class = "nav-btn nav-btn-ghost" onclick = "closeNewAppModal()" > Cancel</ button >
< button type = "submit" class = "nav-btn nav-btn-primary" id = "btn-submit-app" > Launch Application</ button >
</ div >
</ form >
</ div >
</ div >
<!-- Modal: Live Logs Viewer -->
< div class = "modal-overlay" id = "modal-logs" >
< div class = "modal-dialog" style = "max-width: 860px;" >
< div style = "display: flex; justify-content: space-between; align-items: center;" >
< div >
< div class = "modal-title" id = "logs-modal-title" > Application Logs</ div >
< div style = "font-size: 12px; color: var(--text-dim); font-family: var(--font-mono);" id = "logs-modal-sub" > Loading…</ div >
</ div >
< div style = "display: flex; gap: 8px;" >
< button class = "btn-sm-action" onclick = "refreshCurrentLogs()" > Refresh</ button >
< button class = "btn-sm-action" onclick = "closeLogsModal()" > ✕ Close</ button >
</ div >
</ div >
< div class = "terminal-window" id = "terminal-output" > Connecting to container stream…</ div >
</ div >
</ div >
< div id = "toast-container" ></ div >
< script >
let currentApps = [];
let activeLogsAppID = null ;
let logsPollInterval = null ;
async function api ( path , opts = {}) {
try {
const res = await fetch ( path , opts );
if ( res . status === 401 ) {
window . location . href = '/oort/login?next=/orbit' ;
return null ;
}
return await res . json ();
} catch ( e ) {
console . error ( 'API Error:' , e );
return null ;
}
}
function toast ( msg , type = 'info' ) {
const c = document . getElementById ( 'toast-container' );
const t = document . createElement ( 'div' );
t . className = 'toast' ;
t . textContent = msg ;
c . appendChild ( t );
setTimeout (() => t . remove (), 3500 );
}
async function loadApplications () {
const data = await api ( '/orbit/api/apps' );
const container = document . getElementById ( 'apps-container' );
if ( ! data || ! data . apps ) {
container . innerHTML = '<div style="grid-column: 1 / -1; padding: 40px; text-align: center; color: var(--text-muted);">Failed to load applications.</div>' ;
return ;
}
currentApps = data . apps ;
updateStats ( currentApps );
if ( currentApps . length === 0 ) {
container . innerHTML = `
<div style="grid-column: 1 / -1; padding: 80px 20px; text-align: center; border: 1px dashed rgba(255,255,255,0.1); border-radius: 20px;">
<svg width="48" height="48" fill="none" stroke="var(--accent-cyan)" stroke-width="1.5" viewBox="0 0 24 24" style="margin: 0 auto 16px;"><circle cx="12" cy="12" r="10"/><path d="M12 8v8M8 12h8"/></svg>
<h3 style="font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 6px;">No Applications Deployed Yet</h3>
<p style="color: var(--text-dim); font-size: 14px; max-width: 420px; margin: 0 auto 20px;">Deploy your first containerized service directly from Forge Git or with a quick-start template.</p>
<button class="nav-btn nav-btn-primary" onclick="openNewAppModal()">Deploy Application</button>
</div>` ;
return ;
}
container . innerHTML = currentApps . map ( app => {
const isRunning = app . status === 'running' ;
const isBuilding = app . status === 'building' ;
const statusClass = `status- ${ app . status } ` ;
const cpuStr = app . live_stats ? ` ${ app . live_stats . cpu_percent . toFixed ( 1 ) } %` : '—' ;
const memStr = app . live_stats ? ` ${ app . live_stats . mem_usage_mb . toFixed ( 0 ) } MB` : '—' ;
return `
<div class="app-card">
<div class="app-card-header">
<div>
<div class="app-name">
${ escapeHTML ( app . name ) }
</div>
<div class="app-meta-row" style="margin-top: 4px;">
<span>branch: ${ escapeHTML ( app . branch || 'main' ) } </span>
<span>·</span>
<span>port : ${ app . exposed_port } </span>
</div>
</div>
<span class="status-pill ${ statusClass } ">
<span class="status-dot"></span>
${ app . status }
</span>
</div>
<!-- Telemetry Box -->
<div class="app-metrics-grid">
<div class="metric-box">
<span class="metric-box-label">CPU Usage</span>
<span class="metric-box-val"> ${ cpuStr } </span>
</div>
<div class="metric-box">
<span class="metric-box-label">Memory</span>
<span class="metric-box-val"> ${ memStr } </span>
</div>
</div>
<!-- Actions -->
<div class="app-card-actions">
<div style="display: flex; gap: 6px;">
2026-10-14 16:48:17 +05:30
<button class="btn-sm-action act-logs" onclick="openAppLogs(' ${ app . app_id } ', ' ${ escapeHTML ( app . name ) } ')">
2026-10-14 16:16:22 +05:30
<svg width="12" height="12" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><polyline points="4 17 10 11 4 5"/><line x1="12" y1="19" x2="20" y2="19"/></svg>
Logs
</button>
${ isRunning ? `
2026-10-14 16:48:17 +05:30
<button class="btn-sm-action act-restart" onclick="appAction(' ${ app . app_id } ', 'restart')">Restart</button>
<button class="btn-sm-action act-stop" onclick="appAction(' ${ app . app_id } ', 'stop')">Stop</button>
2026-10-14 16:16:22 +05:30
` : `
2026-10-14 16:48:17 +05:30
<button class="btn-sm-action act-start" style="color:#34d399;" onclick="appAction(' ${ app . app_id } ', 'start')">Start</button>
<button class="btn-sm-action act-rebuild" onclick="appAction(' ${ app . app_id } ', 'rebuild')">Rebuild</button>
2026-10-14 16:16:22 +05:30
` }
</div>
<div style="display: flex; gap: 6px;">
2026-10-14 16:48:17 +05:30
<button class="btn-sm-action act-backup" title="Backup container snapshot to Oort S3" onclick="backupAppToOort(' ${ app . app_id } ')">
2026-10-14 16:20:32 +05:30
<svg width="12" height="12" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path d="M21 16V8a2 2 0 00-1-1.73l-7-4a2 2 0 00-2 0l-7 4A2 2 0 003 8v8a2 2 0 001 1.73l7 4a2 2 0 002 0l7-4A2 2 0 0021 16z"/></svg>
Backup S3
</button>
2026-10-14 16:48:17 +05:30
<a href=" ${ app . proxy_url } " target="_blank" class="btn-sm-action act-open">
2026-10-14 16:16:22 +05:30
Open App ↗
</a>
<button class="btn-sm-action danger" onclick="deleteApp(' ${ app . app_id } ', ' ${ escapeHTML ( app . name ) } ')">✕</button>
</div>
</div>
</div>
` ;
}). join ( '' );
}
function updateStats ( apps ) {
document . getElementById ( 'stat-apps-count' ). textContent = apps . length ;
const running = apps . filter ( a => a . status === 'running' ). length ;
document . getElementById ( 'stat-apps-running' ). textContent = ` ${ running } Running containers` ;
let totalMem = 0 ;
apps . forEach ( a => {
if ( a . live_stats && a . live_stats . mem_usage_mb ) {
totalMem += a . live_stats . mem_usage_mb ;
}
});
document . getElementById ( 'stat-mem-total' ). textContent = totalMem > 0 ? ` ${ totalMem . toFixed ( 0 ) } MB` : '512 MB' ;
}
function escapeHTML ( str ) {
return ( str || '' ). replace ( /[&<>'"]/g , tag => ({
'&' : '&' , '<' : '<' , '>' : '>' , "'" : ''' , '"' : '"'
}[ tag ] || tag ));
}
async function appAction ( appID , action ) {
toast ( `Executing ${ action } on application…` );
const res = await api ( `/orbit/api/apps/ ${ appID } /action` , {
method : 'POST' ,
headers : { 'Content-Type' : 'application/json' },
body : JSON . stringify ({ action })
});
if ( res && res . success ) {
toast ( `Action ${ action } succeeded.` );
loadApplications ();
} else {
toast ( `Failed to execute ${ action } ` , 'error' );
}
}
async function deleteApp ( appID , name ) {
if ( ! confirm ( `Are you sure you want to tear down and delete ' ${ name } '?` )) return ;
const res = await api ( `/orbit/api/apps/ ${ appID } ` , { method : 'DELETE' });
if ( res && res . success ) {
toast ( `Application ' ${ name } ' removed.` );
loadApplications ();
}
}
2026-10-14 16:20:32 +05:30
async function backupAppToOort ( appID ) {
toast ( 'Snapshotting container and uploading to Oort S3…' );
const res = await api ( `/orbit/api/apps/ ${ appID } /backup-to-oort` , { method : 'POST' });
if ( res && res . success ) {
toast ( `✓ ${ res . message } ` );
} else {
toast (( res && res . error ) || 'Backup failed' , 'error' );
}
}
2026-10-14 16:16:22 +05:30
// Modal handling
function openNewAppModal () {
document . getElementById ( 'modal-new-app' ). classList . add ( 'open' );
loadForgeRepos ();
loadStarterTemplates ();
}
function closeNewAppModal () {
document . getElementById ( 'modal-new-app' ). classList . remove ( 'open' );
}
function switchDeployTab ( tab ) {
document . getElementById ( 'tab-btn-forge' ). classList . toggle ( 'active' , tab === 'forge' );
document . getElementById ( 'tab-btn-git' ). classList . toggle ( 'active' , tab === 'git' );
document . getElementById ( 'tab-btn-tpl' ). classList . toggle ( 'active' , tab === 'templates' );
document . getElementById ( 'tab-content-forge' ). style . display = ( tab === 'forge' ) ? 'block' : 'none' ;
document . getElementById ( 'tab-content-git' ). style . display = ( tab === 'git' ) ? 'block' : 'none' ;
document . getElementById ( 'tab-content-templates' ). style . display = ( tab === 'templates' ) ? 'block' : 'none' ;
}
async function loadForgeRepos () {
const sel = document . getElementById ( 'sel-forge-repo' );
sel . innerHTML = '<option value="">Loading Forge repositories…</option>' ;
const res = await api ( '/orbit/api/forge/repos' );
if ( res && res . repos && res . repos . length > 0 ) {
sel . innerHTML = '<option value="">-- Choose a repository --</option>' +
res . repos . map ( r => `<option value=" ${ r . clone_url || r . html_url } " data-name=" ${ r . name } "> ${ r . name } ( ${ r . default_branch || 'main' } )</option>` ). join ( '' );
} else {
sel . innerHTML = '<option value="">No Forge repositories found. Switch to Custom Git URL.</option>' ;
}
}
function onForgeRepoSelected ( url ) {
if ( ! url ) return ;
const sel = document . getElementById ( 'sel-forge-repo' );
const opt = sel . options [ sel . selectedIndex ];
const name = opt . getAttribute ( 'data-name' );
if ( name ) {
document . getElementById ( 'inp-app-name' ). value = name ;
}
}
async function loadStarterTemplates () {
const list = document . getElementById ( 'templates-list' );
const res = await api ( '/orbit/api/templates' );
if ( res && res . templates ) {
list . innerHTML = res . templates . map ( t => `
2026-10-14 16:48:17 +05:30
<div class="template-card"
2026-10-14 16:16:22 +05:30
onclick="selectTemplate(' ${ escapeHTML ( t . name ) } ', ' ${ t . repo_url } ', ' ${ t . branch } ')">
<div style="font-weight:700; color:#fff; font-size:13px; margin-bottom:4px;"> ${ escapeHTML ( t . name ) } </div>
<div style="font-size:11.5px; color:var(--text-dim); line-height:1.4;"> ${ escapeHTML ( t . description ) } </div>
</div>
` ). join ( '' );
}
}
function selectTemplate ( name , repoURL , branch ) {
document . getElementById ( 'inp-app-name' ). value = name . toLowerCase (). replace ( /[^a-z0-9]/g , '-' );
document . getElementById ( 'inp-git-url' ). value = repoURL ;
document . getElementById ( 'inp-app-branch' ). value = branch ;
switchDeployTab ( 'git' );
toast ( `Selected template: ${ name } ` );
}
async function submitNewApp ( e ) {
e . preventDefault ();
const name = document . getElementById ( 'inp-app-name' ). value . trim ();
const branch = document . getElementById ( 'inp-app-branch' ). value . trim ();
let repoURL = '' ;
const activeTab = document . querySelector ( '.tab-btn.active' ). id ;
if ( activeTab === 'tab-btn-forge' ) {
repoURL = document . getElementById ( 'sel-forge-repo' ). value ;
} else {
repoURL = document . getElementById ( 'inp-git-url' ). value . trim ();
}
if ( ! repoURL ) {
toast ( 'Please select or specify a Git repository URL' , 'error' );
return ;
}
// Parse environment variables
const envText = document . getElementById ( 'inp-app-env' ). value ;
const envVars = {};
envText . split ( '\n' ). forEach ( line => {
line = line . trim ();
if ( line && line . includes ( '=' )) {
const idx = line . indexOf ( '=' );
envVars [ line . slice ( 0 , idx ). trim ()] = line . slice ( idx + 1 ). trim ();
}
});
const btn = document . getElementById ( 'btn-submit-app' );
btn . disabled = true ;
btn . textContent = 'Launching…' ;
const res = await api ( '/orbit/api/apps' , {
method : 'POST' ,
headers : { 'Content-Type' : 'application/json' },
body : JSON . stringify ({
name ,
repo_url : repoURL ,
branch ,
env_vars : envVars
})
});
btn . disabled = false ;
btn . textContent = 'Launch Application' ;
if ( res && res . success ) {
closeNewAppModal ();
toast ( 'Deployment initiated! Streaming build logs…' );
loadApplications ();
openAppLogs ( res . app_id , name );
} else {
toast (( res && res . error ) || 'Failed to create application' , 'error' );
}
}
// Live Logs Viewer
async function openAppLogs ( appID , name ) {
activeLogsAppID = appID ;
document . getElementById ( 'logs-modal-title' ). textContent = ` ${ name } — Container Logs` ;
document . getElementById ( 'logs-modal-sub' ). textContent = `App ID: ${ appID } ` ;
document . getElementById ( 'terminal-output' ). textContent = 'Connecting to log stream…' ;
document . getElementById ( 'modal-logs' ). classList . add ( 'open' );
refreshCurrentLogs ();
if ( logsPollInterval ) clearInterval ( logsPollInterval );
logsPollInterval = setInterval ( refreshCurrentLogs , 2500 );
}
function closeLogsModal () {
document . getElementById ( 'modal-logs' ). classList . remove ( 'open' );
if ( logsPollInterval ) {
clearInterval ( logsPollInterval );
logsPollInterval = null ;
}
activeLogsAppID = null ;
}
async function refreshCurrentLogs () {
if ( ! activeLogsAppID ) return ;
try {
const res = await fetch ( `/orbit/api/apps/ ${ activeLogsAppID } /logs` );
const text = await res . text ();
const win = document . getElementById ( 'terminal-output' );
win . textContent = text || '[ORBIT] No output yet.' ;
win . scrollTop = win . scrollHeight ;
} catch ( e ) {
console . error ( 'Error fetching logs:' , e );
}
}
// Initial boot
loadApplications ();
// Auto refresh fleet telemetry every 8 seconds
setInterval ( loadApplications , 8000 );
2026-10-14 16:48:17 +05:30
// Background ambient particle mesh animation
( function initOrbitSpaceCanvas () {
const cv = document . getElementById ( 'orbitSpaceCanvas' );
if ( ! cv ) return ;
const ctx = cv . getContext ( '2d' );
let w = 0 , h = 0 , pts = [];
let mouse = { x : - 1000 , y : - 1000 , active : false };
function resize () {
w = cv . width = window . innerWidth ;
h = cv . height = window . innerHeight ;
}
window . addEventListener ( 'resize' , resize );
resize ();
for ( let i = 0 ; i < 70 ; i ++ ) {
pts . push ({
x : Math . random () * w ,
y : Math . random () * h ,
vx : ( Math . random () - 0.5 ) * 0.45 ,
vy : ( Math . random () - 0.5 ) * 0.45 ,
r : Math . random () < 0.25 ? 2.2 : 1.2 ,
color : Math . random () > 0.45 ? 'rgba(56,189,248,' : 'rgba(168,85,247,' ,
alpha : 0.25 + Math . random () * 0.5
});
}
window . addEventListener ( 'mousemove' , e => {
mouse . x = e . clientX ;
mouse . y = e . clientY ;
mouse . active = true ;
});
window . addEventListener ( 'mouseleave' , () => { mouse . active = false ; });
function draw () {
ctx . clearRect ( 0 , 0 , w , h );
// Dynamic constellation links
for ( let i = 0 ; i < pts . length ; i ++ ) {
for ( let j = i + 1 ; j < pts . length ; j ++ ) {
const dx = pts [ i ]. x - pts [ j ]. x ;
const dy = pts [ i ]. y - pts [ j ]. y ;
const d = Math . sqrt ( dx * dx + dy * dy );
if ( d < 125 ) {
const a = ( 1 - d / 125 ) * 0.16 ;
ctx . strokeStyle = `rgba(56, 189, 248, ${ a } )` ;
ctx . lineWidth = 0.8 ;
ctx . beginPath ();
ctx . moveTo ( pts [ i ]. x , pts [ i ]. y );
ctx . lineTo ( pts [ j ]. x , pts [ j ]. y );
ctx . stroke ();
}
}
}
// Drifting particles with mouse interaction
for ( const p of pts ) {
p . x += p . vx ;
p . y += p . vy ;
if ( p . x < 0 ) p . x = w ;
if ( p . x > w ) p . x = 0 ;
if ( p . y < 0 ) p . y = h ;
if ( p . y > h ) p . y = 0 ;
if ( mouse . active ) {
const mdx = mouse . x - p . x ;
const mdy = mouse . y - p . y ;
const md = Math . sqrt ( mdx * mdx + mdy * mdy );
if ( md < 150 ) {
const force = ( 1 - md / 150 ) * 0.08 ;
p . x -= ( mdx / md ) * force * 15 ;
p . y -= ( mdy / md ) * force * 15 ;
}
}
ctx . fillStyle = p . color + p . alpha + ')' ;
ctx . beginPath ();
ctx . arc ( p . x , p . y , p . r , 0 , Math . PI * 2 );
ctx . fill ();
}
requestAnimationFrame ( draw );
}
draw ();
})();
2026-10-14 16:16:22 +05:30
</ script >
</ body >
</ html >