Skip to content

Commit c72faa9

Browse files
authored
Merge pull request #671 from Moh-dakai/feat/pwa-support
feat: add PWA support with offline caching and install prompt
2 parents f750829 + 57c72f6 commit c72faa9

20 files changed

Lines changed: 13264 additions & 12474 deletions

frontend/index.html

Lines changed: 35 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,35 @@
1-
<!DOCTYPE html>
2-
<html lang="en">
3-
<head>
4-
<meta charset="UTF-8" />
5-
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
6-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>Stellar Goal Vault</title>
8-
<script>
9-
(function() {
10-
const THEME_KEY = 'stellar-goal-vault-theme';
11-
const storedTheme = localStorage.getItem(THEME_KEY);
12-
const systemTheme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
13-
const theme = storedTheme || systemTheme;
14-
document.documentElement.setAttribute('data-theme', theme);
15-
})();
16-
</script>
17-
</head>
18-
<body>
19-
<div id="root"></div>
20-
<script type="module" src="/src/main.tsx"></script>
21-
</body>
22-
</html>
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<!-- PWA: theme color for browser chrome on Android/iOS -->
6+
<meta name="theme-color" content="#1a1a2e" />
7+
<!-- PWA: viewport and mobile web app settings -->
8+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
9+
<meta name="mobile-web-app-capable" content="yes" />
10+
<!-- iOS PWA settings -->
11+
<meta name="apple-mobile-web-app-capable" content="yes" />
12+
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
13+
<meta name="apple-mobile-web-app-title" content="Goal Vault" />
14+
<!-- PWA icons -->
15+
<link rel="apple-touch-icon" href="/apple-touch-icon.svg" />
16+
<link rel="icon" type="image/svg+xml" href="/icon-192.svg" />
17+
<!-- SEO / share -->
18+
<meta name="description" content="Campaign management and funding dashboard for the Stellar ecosystem" />
19+
<title>Stellar Goal Vault</title>
20+
<!-- Inline theme detection to avoid FOUC — runs before React hydrates -->
21+
<script>
22+
(function() {
23+
const THEME_KEY = 'stellar-goal-vault-theme';
24+
const storedTheme = localStorage.getItem(THEME_KEY);
25+
const systemTheme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
26+
const theme = storedTheme || systemTheme;
27+
document.documentElement.setAttribute('data-theme', theme);
28+
})();
29+
</script>
30+
</head>
31+
<body>
32+
<div id="root"></div>
33+
<script type="module" src="/src/main.tsx"></script>
34+
</body>
35+
</html>

frontend/lighthouserc.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"performance",
1010
"accessibility",
1111
"best-practices",
12-
"seo"
12+
"seo",
13+
"pwa"
1314
],
1415
"skipAudits": [
1516
"unsized-images"
@@ -24,7 +25,8 @@
2425
"categories:performance": ["error", { "minScore": 0.8 }],
2526
"categories:accessibility": ["error", { "minScore": 0.9 }],
2627
"categories:best-practices": ["error", { "minScore": 0.9 }],
27-
"categories:seo": ["warn", { "minScore": 0.9 }]
28+
"categories:seo": ["warn", { "minScore": 0.9 }],
29+
"categories:pwa": ["error", { "minScore": 0.9 }]
2830
}
2931
}
3032
}

0 commit comments

Comments
 (0)