A personal portfolio built with Next.js 16 and Sanity CMS β live at ver41.com
- π¬ Animated hero: the name rises word by word, the text fades in from a blur, the social links pop in one after another, and the portrait floats inside a turning gradient ring and leans toward the mouse. Everything honours
prefers-reduced-motion. - π Recent projects carousel on the home page: newest first, three at a time, a new set every five seconds. It holds still while hovered, focused or off screen, has prev / pause / next buttons, and never turns by itself for visitors who ask for reduced motion.
- ποΈ Projects:
/projectslists every project newest first. Each project page has a screenshot slider (swipe, arrows, β β keys, thumbnails, captions), a rich-text write-up and related projects. - π§© Tech stacks: projects grouped by technology, with a page per stack at
/tech-stacks/[slug]. - βοΈ Contact form: messages are saved as
messagedocuments in Sanity through/api/contact. - ποΈ Embedded Sanity Studio at
/studio. - π SEO: per-page metadata, Open Graph and Twitter cards, JSON-LD,
sitemap.xml,robots.txtand a web manifest. - π Dark mode with
next-themes, and π Vercel Analytics.
| Area | Packages |
|---|---|
| Framework | Next.js 16.4.6 (App Router, Turbopack), React 19.3 |
| Language | TypeScript 5.9 |
| Styling | Tailwind CSS 3.4 with the typography and forms plugins |
| UI | @headlessui/react 2.2, next-themes 0.4 |
| CMS | Sanity 5.31, next-sanity 12.4, @sanity/image-url 2.2 |
| Content | @portabletext/react 6.2, date-fns 4.4 |
| Analytics | @vercel/analytics 1.6 |
| Package manager | pnpm 12.23.0 |
my-portfolio/
βββ app/
β βββ (site)/ # The public site
β β βββ components/ # Hero portrait, projects carousel, project gallery, cards, navβ¦
β β βββ projects/ # /projects and /projects/[slug]
β β βββ tech-stacks/ # /tech-stacks and /tech-stacks/[slug]
β β βββ contact/ # Contact page
β β βββ admin/ # Link to the Studio
β β βββ layout.tsx
β β βββ page.tsx # Home page
β βββ (studio)/studio/[[...index]]/ # Embedded Sanity Studio
β βββ api/contact/route.ts # Saves contact messages to Sanity
β βββ schemas/ # Sanity schemas: profile, project, category, message
β βββ types/ # Shared TypeScript types
β βββ utils/ # Sanity client, image URLs, Portable Text components, constants
β βββ layout.tsx # Root layout (fonts, theme, analytics)
β βββ globals.css
β βββ sitemap.ts, robots.ts, manifest.ts
β βββ not-found.tsx
βββ public/ # Static images and social icons
βββ sanity-project/ # Standalone Studio (older schemas, see below)
βββ sanity.config.ts # Config of the embedded Studio
βββ sanity.types.ts # Generated Sanity types (`pnpm typegen`)
βββ next.config.ts
βββ tailwind.config.ts # Theme, colours and animations
βββ pnpm-workspace.yaml # pnpm settings: allowed build scripts, dependency overrides
βββ vercel.json # Vercel install and build commands
βββ package.json
- Node.js 20.9 or newer (22 LTS recommended)
- pnpm 12.23.0 β pinned in
package.json. With Corepack enabled (corepack enable) the pinned version runs automatically. pnpm 10 and older cannot read this lockfile. - A Sanity project (sanity.io, free)
-
Clone and install
git clone https://github.com/OthyTenk/my-portfolio.git cd my-portfolio pnpm install -
Configure the environment
cp .env.example .env.local
Variable Purpose NEXT_PUBLIC_SANITY_PROJECT_IDSanity project ID NEXT_PUBLIC_SANITY_DATASETDataset, e.g. productionNEXT_PUBLIC_SANITY_API_VERSIONAPI version date, e.g. 2026-01-17SANITY_API_TOKENA token with write access; only the contact form uses it. Keep it out of the repo. -
Allow the Studio's origin in Sanity
In sanity.io/manage β your project β API β CORS origins, add
http://localhost:3000(and later your production URL) with credentials allowed. Without it/studioasks you to register the studio instead of loading. -
Run it
pnpm dev
- Site: http://localhost:3000
- Studio: http://localhost:3000/studio
| Command | What it does |
|---|---|
pnpm dev |
Development server |
pnpm build |
Production build |
pnpm start |
Serve the production build |
pnpm typegen |
Regenerate sanity.types.ts from the schemas |
pnpm lint |
Currently broken: Next.js 16 removed next lint, and .eslintrc.json predates ESLint 9's flat config. Use tsc --noEmit. |
Everything on the site is edited in the Studio:
- Profile β name, headline, bio (Portable Text), photo, email and social links. The home page uses the first profile.
- Project β title, slug, short overview, description (Portable Text with images), main image, gallery (extra screenshots with alt text and a caption, shown in the slider after the main image), live link, tech-stack categories and date (sorts the lists, newest first).
- Category β a technology, optionally under a parent group (e.g. React.js under Framework & library), with an icon.
- Message β written by the contact form.
sanity-project/ holds a standalone Studio with an older copy of the schemas (no project description or gallery). The embedded Studio at /studio uses app/schemas and is the one to edit content with.
- Colours, fonts and animations:
tailwind.config.ts. The hero and carousel animations (reveal-up,blur-in,pop-in,portrait-in,float,drift,spin-slow,shine,slide-in-left/right) are defined there. - Global styles and dark mode:
app/globals.cssand thedark:variants in components. - Site URL used in metadata and the sitemap:
app/utils/constants.ts.
pnpm auditreports no known vulnerabilities.pnpm-workspace.yamlholds the dependency overrides that patch vulnerable packages pinned deep in Sanity's CLI, styled-components and the Tailwind typography plugin; each one has a comment saying why. (pnpm 11+ no longer reads thepnpmfield ofpackage.json.)- pnpm 12's supply-chain defaults are on: a package version published less than a day ago is not installed, and dependency build scripts only run when listed under
allowBuilds.
The site is deployed on Vercel.
- Import the repository in Vercel. Next.js is detected automatically.
- Add the four environment variables above to the Vercel project.
- Add the production URL to the Sanity project's CORS origins (with credentials) so
/studioworks there.
vercel.json runs the install and build with pnpm 12.23.0 via npx, because the pnpm bundled with Vercel's build image cannot read a pnpm 12 lockfile. When you change packageManager in package.json, change the version in vercel.json too.
- Fork the repository
- Create a branch (
git checkout -b feat/amazing-feature) - Commit your changes
- Push the branch and open a pull request
See CONTRIBUTING.md and the Code of Conduct.
MIT β see LICENSE.
OkDo β GitHub @OthyTenk Β· ver41.com
Questions or problems: open an issue. Security reports: see SECURITY.md.
