This is a Next.js project bootstrapped with create-next-app
.
January 2024: The package sharp 0.33.2
requires Node-API v9, including Node.js (^18.17.0 or >= 20.3.0), Deno and Bun. Unfortunately the versions of Node.js available on Vercel are not compatible with the lates version of this package. So we are still using sharp 0.32.6
for now.
- taint
- Create to do list?
Link the project to Vercel for local development
pnpm dlx vercel link
pnpm dlx vercel env pull
Or with npx
:
npx vercel link
npx vercel env pull
Get the environment variables from Vercel, while the project is not linked to it.
export VERCEL_ENV_PULL_TOKEN=m1t...
export VERCEL_ORG_ID=team_...
export VERCEL_PROJECT_ID=prj_...
npx --yes -- vercel env pull --environment=production --yes --token $VERCEL_ENV_PULL_TOKEN .env.local
pnpm dlx vercel env pull --environment=production --yes --token $VERCEL_ENV_PULL_TOKEN .env.local
{ unstable_noStore } from next/cache
- https://youtu.be/RBM03RihZVs?si=TrzTyxvnXPqB0sLy&t=733<Suspense />
{ params, searchParams }
- https://youtu.be/RBM03RihZVs?si=Dlwq-O59a6qF3PKC&t=798
- Next.js 14
- Vercel
- Typescript
- Sass (removed in late 2024)
- Tailwind
- ShadCN/UI
- React
- React-hook-form
- Zod
- Next-themes
- MongoDB
- Mongoose
- Auth.js v.4 | Auth.js v.5
- Resend
- Google reCaptcha @react-google-recaptcha-v3
- Unified, remark, rehype, hyphen.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx
. The page auto-updates as you edit the file.
This project uses next/font
to automatically optimize and load Inter, a custom Google Font.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
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.
How do I use a Cloudflare domain with Vercel?
Rebuild and run the app with docker compose
.
docker compose build && docker compose up -d
References:
- https://nextjs.org/docs/app/building-your-application/deploying#docker-image
- https://github.com/vercel/next.js/tree/canary/examples/with-docker
References:
- Unified Readme.md: https://github.com/unifiedjs/unified | #processorProcessSyncFile
- Syntax Highlighting in use: https://www.tybarho.com/articles/adding-a-copy-button-mdx-code-snippets
- Plugins list: https://github.com/rehypejs/rehype/blob/main/doc/plugins.md#using-plugins
- Custom plugin [easy]: https://unifiedjs.com/explore/package/remark-directive/
- Rehype video: https://unifiedjs.com/explore/package/rehype-video/ | https://github.com/jaywcjlove/rehype-video/tree/main
- Cloudflare CDN breaks the uploading of some files to Minio. So it is disabled for
minio-share.metalevel.cloud
. Ref: https://stackoverflow.com/questions/77343759/minio-403-forbidden-head-request-using-saveas-filesaver-js
Backup of the database and Cloudflare's object storage.
# scripts/dump-mongo-db.sh .env.local
doppler run -- scripts/dump-mongo-db.sh
doppler run -- scripts/aws-shell/objStorage-metadata-dump.sh
doppler run -- scripts/aws-shell/objStorage-sync.sh
doppler run -- scripts/aws-shell/objStorage-copy.sh
doppler run -- pnpm exec tsx scripts/aws/index-copy-r2-minio.ts
This just stops working.
doppler run -- pnpm exec ts-node --skip-project scripts/aws/index-copy-r2-minio.ts
- Liner gradient Google:
linear-gradient(90deg,#ea473a 6%,#ffc619 38%,#4f8df5 70%,#19a261)