Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Commit

Permalink
βž• πŸ”§ πŸ“š ✨ setup next-pwa
Browse files Browse the repository at this point in the history
setup next-pwa

βž• Adding a dependency, πŸ”§ Configuration files, πŸ“š Documentation, ✨ New feature
  • Loading branch information
TimMikeladze committed Dec 29, 2022
1 parent cac865b commit fa92044
Show file tree
Hide file tree
Showing 5 changed files with 532 additions and 21 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# πŸ‡³ πŸš€ 😊
# Next.js + Apollo GraphQL + Joy UI
# πŸ‡³ πŸš€ 😊 Next.js - Apollo GraphQL - Joy UI

Spend more time __building__ instead of _configuring_ your next project.

## πŸšͺ Intro

This is a slightly opinionated starter kit for developing [Next.js](https://nextjs.org/) apps. It uses the [Joy UI](https://mui.com/joy-ui/getting-started/overview/) library from [MUI](https://mui.com/) along with the [Apollo](https://www.apollographql.com/) stack. All [GraphQL](https://graphql.org/) are operations are fully typed with [GraphQL Codegen](https://the-guild.dev/graphql/codegen) and [Zeus](https://github.com/graphql-editor/graphql-zeus). The starter kit also includes a fully functional [authentication system](https://next-auth.js.org/), [localization](https://www.i18next.com/), dark / light mode, and plenty of other goodies for a great developer experience right out of the box.
This is a slightly opinionated starter kit for developing [Next.js](https://nextjs.org/) apps. It uses the [Joy UI](https://mui.com/joy-ui/getting-started/overview/) library from [MUI](https://mui.com/) along with the [Apollo](https://www.apollographql.com/) stack. All [GraphQL](https://graphql.org/) are operations are fully typed with [GraphQL Codegen](https://the-guild.dev/graphql/codegen) and [Zeus](https://github.com/graphql-editor/graphql-zeus). The starter kit also includes a fully functional [authentication system](https://next-auth.js.org/), [localization](https://www.i18next.com/), [PWA](https://github.com/shadowwalker/next-pwa), dark / light mode, PWA support and plenty of other goodies for a great developer experience right out of the box.

> πŸ‘‹ Hello there! Follow me [@linesofcodedev](https://twitter.com/linesofcodedev) or visit [linesofcode.dev](https://linesofcode.dev) for more cool projects like this one.
Expand Down Expand Up @@ -35,6 +34,8 @@ Remaining simple at its core, this project is packed with useful tools that enha
- 🍞 [React Hot Toast]() - The best toast in town. Smoking hot React notifications.
- 🌐 [i18next](https://www.i18next.com/) - The easiest way to translate your NextJs apps.
- πŸ” [Next SEO](https://github.com/garmeeh/next-seo) - The easiest way to add SEO support to your Next.js app.
- πŸ“± [Next PWA](
- https://github.com/shadowwalker/next-pwa) - Zero config PWA plugin for Next.js, with workbox.
- πŸͺ΅ [Axiom logging](https://axiom.co/) - Send structured logs directly from your code and query, stream, & analyze. [Learn more](https://axiom.co/docs/integrations/nextjs).

#### πŸ›  Develop and test
Expand Down Expand Up @@ -128,6 +129,10 @@ To analyze the page bundles of your Next.js app, run the following command:
yarn build:analyze
```

### πŸ“± Progressive Web App

This project is configured to be a PWA out of the box, it just needs a few more steps from you to be production ready. Add your image assets and define your manifest files. Start by following the [instructions here](https://github.com/shadowwalker/next-pwa#step-2-add-manifest-file-example).

## 🎊 Built a project with this starter kit?

That's awesome! Please feel free to open a PR and add your project to the list below.
Expand Down
7 changes: 6 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
});

const withPWA = require('next-pwa')({
dest: 'public',
disable: process.env.NODE_ENV === 'development',
});

const { version } = require('./package.json');

/** @type {import('next').NextConfig} */
Expand All @@ -26,4 +31,4 @@ const nextConfig = {
},
};

module.exports = withBundleAnalyzer(withAxiom(nextConfig));
module.exports = withBundleAnalyzer(withPWA(withAxiom(nextConfig)));
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
"next-auth": "4.18.7",
"next-axiom": "0.16.0",
"next-i18next": "13.0.2",
"next-pwa": "5.6.0",
"next-seo": "5.15.0",
"rate-limiter-flexible": "2.4.1",
"react": "18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const MyApp = ({
<Head>
<meta
name="viewport"
content="initial-scale=1, width=device-width"
content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no, user-scalable=no, viewport-fit=cover"
/>
<title>{t(`pageTitle`)}</title>
</Head>
Expand Down
Loading

1 comment on commit fa92044

@vercel
Copy link

@vercel vercel bot commented on fa92044 Dec 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.