Skip to content
Maiz27Public

About

The 2nd iteration of my portfolio website: a Next.js + Sanity Turborepo where every project ships a code-backed, annotated case study.

Topics

Resources

Stars

12 stars

Watchers

1 watching

Forks

Repository files navigation

Portfolio Monorepo

This repository contains the source code for my personal portfolio website, built with Next.js, Tailwind CSS, and Sanity. The project is structured as a monorepo using pnpm workspaces and is managed with Turborepo.

Portfolio Website Overview

Table of Contents

Introduction

This project is proof of work: long-form, first-person case studies grounded in real code, with snippets linked back to their repositories. Rather than a services-and-pricing template, it's built to show how I think while I ship — decisions, dead ends, and trade-offs — with interactive annotated code as the centerpiece. It's open-source, easily customizable, and deployable, with a Next.js frontend and a Sanity CMS backend for content management.

Project Structure

This monorepo is organized using pnpm workspaces and Turborepo. The workspaces are located in the apps and packages directories:

  • apps/web: The Next.js frontend application.
  • apps/studio: The Sanity CMS studio for content management.
  • packages/*: Shared packages and utilities, including @v2/sanity-schemas for type-safe Sanity content.
  • scripts/ (gitignored, local to the owner's machine): the content pipeline. scripts/case-studies/ holds one authoring file per case study plus a Portable Text DSL that pushes to Sanity drafts only; scripts/visuals/ holds the reproducible Playwright shot list that produces every plate and figure image. The rules for both live in scripts/case-studies/HANDOFF.md and scripts/visuals/README.md.

Content rules

The site renders what Sanity holds, and the authoring scripts are the source of truth for the case studies, so a few rules keep the two in step:

  • Code is quoted, never edited. Every snippet is copied verbatim from the real repository file it links to (elisions only via // ...), and every annotation match must occur in that code. Prose can be rewritten; code cannot. Re-audit a case study after its project repository changes.
  • Drafts only. Scripts write drafts.<id>; publishing happens in Studio after review, which can be done on the real site through draft preview (see apps/web/README.md).
  • Every case study is a showcase. The hero "plate" is composed from the project's gallery in order: a landscape main screen, a portrait phone shot, then two landscape details, all fresh captures. The plate carries no label or caption. Body figures sit where the prose refers to them and never repeat a plate tile. apps/web/README.md documents the rendering rules; PRODUCT.md the visual ones.
  • Voice. First person, plain, honest about mistakes; straight apostrophes, no em dashes. Describe the work, not who typed it.

Getting Started

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/Maiz27/v2.git
    cd v2
  2. Install dependencies from the root directory:

    pnpm install
  3. Set up environment variables:

    • For the web app, copy .env.example to .env in apps/web and provide your Sanity project details.
    • For the Sanity studio, please refer to the detailed instructions in the studio README.

Usage

This project uses Turborepo to manage scripts. You can run the following commands from the root directory:

  • To start all applications in development mode:

    pnpm dev
  • To build all applications for production:

    pnpm build
  • To lint all applications:

    pnpm lint

You can also run scripts for individual applications:

  • pnpm dev:web: Starts the development server for the web app.
  • pnpm dev:studio: Starts the development server for the Sanity studio.
  • pnpm build:web: Builds the web app for production.
  • pnpm build:studio: Builds the Sanity studio for production.
  • pnpm lint:web: Lints the web app.
  • pnpm lint:studio: Lints the Sanity studio.
  • pnpm generate:types: Extracts the Sanity schema and regenerates the type-safe content types.

Contributing

Contributions are welcome! Please fork the repository and create a pull request with your changes.

License

This project is open-source and available under the MIT License.

About

The 2nd iteration of my portfolio website: a Next.js + Sanity Turborepo where every project ships a code-backed, annotated case study.

Topics

Resources

Stars

12 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages