UoaWDCC / uasc-web

Project with the University of Auckland Snowsports Club Website & Booking System. Established in 2023.
https://uasc.co.nz
6 stars 2 forks source link

Migrate project to nextjs #592

Closed bcho892 closed 3 months ago

bcho892 commented 3 months ago

Migration to NEXT.JS

This is a big change, but hopefully it makes this project more future-proof and serves the client better.

What's going to happen to /client?

We will still keep the folder temporarily, however we will rename uasc-next to client and completely get rid of the old vite app once the new version is stable. #593

Next.js config

We are using Next.js 14.2 with app router. App router seems to work pretty well with what we have (good amount of static content and SPA)

What changing to next.js does is:

We likely do not need to use API routes, but there is the option should we require it

Deployment changes

Due to the free-tier limits on netlify we need to be conservative when building. For this reason all builds on netlify should only be for changes to production. For credentials to the account please contact relevant WDCC execs. This will likely be given the uasc.co.nz domain

Deployments to staging will remain on https://uasc-ceebc.web.app/ as a statically built next.js site.

Differences with the vite app

Apart from the page structure, one can pretty much keep writing "normal" react. The only exception is if you want to dynamically fetch data.

One thing to note is that there will be no react-router-dom anymore, and you will have to look at the alternatives from next/navigation (not to be confused with next/router which should not be used.

netlify[bot] commented 3 months ago

Deploy Preview for uasc-staging ready!

Name Link
Latest commit 69b6c65ef055b41d6376eba315aa5c3ba6a321c5
Latest deploy log https://app.netlify.com/sites/uasc-staging/deploys/6688ecd313a1530008f44872
Deploy Preview https://deploy-preview-592--uasc-staging.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

Lighthouse
1 paths audited
Performance: 38
Accessibility: 93
Best Practices: 83
SEO: 91
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

github-actions[bot] commented 3 months ago

Visit the preview URL for this PR (updated for commit 8612b75):

https://uasc-ceebc--pr592-270-frontend-migrate-pcmnmop1.web.app

(expires Sat, 13 Jul 2024 10:44:12 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 36296ceaed1d43e92e7d5e81a72a7bd987560bfa