Go to file
Thiago Chaves 532394f181 Switch to single-page vanilla React app, add PWA support
Story time

Too much time was spent trying to get Next.js to build the app
as a PWA. Maybe I've been trying to do this at an unlucky time
when something somewhere in the dependency stack leading up to
next-pwa is only temporarily broken.

At this point enough hours have been spent thorough the project
getting this or that and that to play nice with Next.js, and the
benefits to this project were at best questionable.

When next-pwa didn't deliver a PWA experience with the promised
"zero configuration" setup, and even failed to do so with a lot
of fiddling around and following several issue discussions in
its repo I thought back at all the other nuisances stemming from
trying to get Next.js to play nice in the app's context and
decided it was time for it to go.

Writing this frankenstein of a commit that forces the project
from its Next.js structure into more-or-less the structure of a
vanilla create-react-app project felt like a breeze compared to
any more time spent reading github issues lingering unanswered
or bumping into Stack Overflow threads from a time when none
of the answers are right any longer. Some top answers in Stack
Overflow don't even look like they were ever right.

I don't like the big component switch that I wrote to replace
the seemingly elegant app routing from Next.js. The new app
routing I wrote is a kludge designed to minimize the amount of
code fixes I'd need to do when it came to navigation, but I am
glad to no longer parse numbers out of URLs, put dynamic() calls
in nearly every page, use wrapper Link and Image components so
Next.js can do some magic and a few other problems that right
now I forget. I also appreciate the smaller bundle.

This isn't some content publishing app, full of meaningful URLs
to be shared over the net with other users. There's really only
the skeleton of the app with a few very simple views to navigate
to and then there's the local data generated by the user that the
app just hosts locally.
2022-08-10 01:36:26 +03:00
.husky Add auto-prettifying git hook 2022-08-10 00:20:31 +03:00
.storybook Switch to single-page vanilla React app, add PWA support 2022-08-10 01:36:26 +03:00
public Switch to single-page vanilla React app, add PWA support 2022-08-10 01:36:26 +03:00
src Switch to single-page vanilla React app, add PWA support 2022-08-10 01:36:26 +03:00
.eslintrc.json Switch to single-page vanilla React app, add PWA support 2022-08-10 01:36:26 +03:00
.gitignore Switch to single-page vanilla React app, add PWA support 2022-08-10 01:36:26 +03:00
.prettierignore Add prettier tool, prettify code 2022-08-10 00:20:31 +03:00
.prettierrc.json Add prettier tool, prettify code 2022-08-10 00:20:31 +03:00
LICENSE Initial commit 2022-08-10 00:20:21 +03:00
package.json Switch to single-page vanilla React app, add PWA support 2022-08-10 01:36:26 +03:00
README.md Initial commit from Create Next App 2022-08-10 00:20:31 +03:00
tsconfig.json Initial commit from Create Next App 2022-08-10 00:20:31 +03:00
yarn.lock Switch to single-page vanilla React app, add PWA support 2022-08-10 01:36:26 +03:00

This is a Next.js project bootstrapped with create-next-app.

Getting Started

First, run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying pages/index.tsx. The page auto-updates as you edit the file.

API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.ts.

The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.