Skip to content

Commit 6cf8925

Browse files
Make the app Progressive Web Application (PWA) - closes #2
1 parent f2df292 commit 6cf8925

17 files changed

+5918
-450
lines changed

app/layout.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ type RootLayoutProps = {
2121
export default function RootLayout({ children }: RootLayoutProps) {
2222
return (
2323
<html lang="en">
24+
<link rel="manifest" href="/manifest.json" />
2425
<body className="bg-slate-900">
2526
<ApolloProvider>
2627
<TopNav />

next.config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,10 @@ const nextConfig = {
1414
output: "standalone",
1515
};
1616

17-
module.exports = nextConfig;
17+
const withPWA = require("next-pwa")({
18+
dest: "public",
19+
});
20+
21+
module.exports = withPWA({
22+
nextConfig,
23+
});

package-lock.json

Lines changed: 3097 additions & 449 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"formik": "^2.4.5",
3434
"graphql": "^16.6.0",
3535
"next": "^14.1.1",
36+
"next-pwa": "^5.6.0",
3637
"react": "^18.2.0",
3738
"react-dom": "^18.2.0",
3839
"react-github-btn": "^1.4.0",

public/icons/icon-128x128.png

17.5 KB
Loading

public/icons/icon-144x144.png

18.8 KB
Loading

public/icons/icon-152x152.png

19.8 KB
Loading

public/icons/icon-192x192.png

25.4 KB
Loading

public/icons/icon-384x384.png

66.2 KB
Loading

public/icons/icon-512x512.png

96.3 KB
Loading

public/icons/icon-72x72.png

11.9 KB
Loading

public/icons/icon-96x96.png

13.5 KB
Loading

public/manifest.json

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"name": "Ditectrev",
3+
"short_name": "Practice Exams Platform by Ditectrev",
4+
"description": "Practice Exams Platform developed by Ditectrev's Community.",
5+
"theme_color": "#3f51b5",
6+
"background_color": "#fafafa",
7+
"display": "standalone",
8+
"orientation": "any",
9+
"scope": ".",
10+
"start_url": ".",
11+
"icons": [
12+
{
13+
"src": "/icons/icon-72x72.png",
14+
"sizes": "72x72",
15+
"type": "image/png"
16+
},
17+
{
18+
"src": "/icons/icon-96x96.png",
19+
"sizes": "96x96",
20+
"type": "image/png"
21+
},
22+
{
23+
"src": "/icons/icon-128x128.png",
24+
"sizes": "128x128",
25+
"type": "image/png"
26+
},
27+
{
28+
"src": "/icons/icon-144x144.png",
29+
"sizes": "144x144",
30+
"type": "image/png"
31+
},
32+
{
33+
"src": "/icons/icon-152x152.png",
34+
"sizes": "152x152",
35+
"type": "image/png"
36+
},
37+
{
38+
"src": "/icons/icon-192x192.png",
39+
"sizes": "192x192",
40+
"type": "image/png"
41+
},
42+
{
43+
"src": "/icons/icon-384x384.png",
44+
"sizes": "384x384",
45+
"type": "image/png"
46+
},
47+
{
48+
"src": "/icons/icon-512x512.png",
49+
"sizes": "512x512",
50+
"type": "image/png"
51+
}
52+
]
53+
}

public/sw.js

Lines changed: 107 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/sw.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)