Extra credits and a big big shout out for all the guidence and help, haakon and stavros @ crystallize.com!
Grab the repo, extract it or "git clone (this url).git" and navigate to the folder by
cd next-ornforlag_no-website
when in this folder, you are in the rootfolder and all commands that follow are to be executed from this rootfolder.
1:
npm install
# or
yarn
2:
npm run dev
# or
yarn dev
This will start up the server on http://localhost:3000 for development.
Put all your entry pages here. These are interpreted as separate routes by Next.js.
All your Vercel serverless functions. and Vipps API endpoints for express Checkout
We use the page-components/
directory to hold the actual component content
related to entries in the pages/
directory.
All your shared React components.
UI related components live here. Front end-centric
Enable GraphQL and REST API communication,
Serverless API functions related: Vipps-payments or ' Vipps Hurtigkasse' (https://vipps.no/products):
- createAuthKey,
- fetch accessToken
- generateVippsProperties,
- vippsOrderId,
- vippsData,
- order-normalizers (prepping for data transfer betwen Vipps and PIM)
PIM 3rd party orders and products mangament service(crystallize)
- queries: order-by-id
- createOrder mutations,
- updateOrder mutations, quieries to email automation using sendgrid, cart-validations, host-identifier,
Public resources hosted as static files. icons, logo pictures, badges, svg files and mainifest etc.
There are multiple alternatives for deployments, two of them being Vercel and netlify.com PS! I recomend vercel for nextjs projects as the creators of nextjs is vercel and its hosting is optimized for nextjs.
- Register a Vercel account
- Install vercel
yarn global add vercel
ornpm i -g vercel
- Run
vercel