The Projects page turns the portfolio showcase into a Halloween game. Four tall arched doors — styled like tombstones — stand side by side in a grid. Visitors are invited to knock on them: clicking a door triggers a 3DDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/spooky-developer/llms.txt
Use this file to discover all available pages before exploring further.
rotateY(105deg) CSS transform that swings it open, just like a real door on a hinge. Behind each door is either a treat (a satisfying success story) or a trick (a hard-fought technical challenge overcome). The icon revealed — CandyIcon for treats, GhostIcon for tricks — sets the mood before the project description appears.
The Trick or Treat Mechanic
State Management
Opened door IDs are tracked with a singleuseState call:
3D Flip Animation
The door panel is a Tailwind-styled<div> with origin-left so it rotates around its left edge like a hinged door. The open/closed state is toggled by conditionally applying the rotate-y-105 class, which maps to rotateY(105deg):
transition-transform duration-700 ease-in-out ensures the swing takes 700 ms and eases smoothly. The parent container uses perspective-1000 so the 3D rotation has depth.
Reveal Content
The project content sits behind the door in the same container and becomes visible (opacity-100 z-10) when the door is open, and invisible (opacity-0 z-0) when it is closed:
Projects
All four projects are defined in thePROJECTS array in assets/main.js:
| # | Title | Type | Description |
|---|---|---|---|
| 1 | E-Commerce Platform | treat | A full-stack shop with Next.js and Stripe. Increased sales by 40%. |
| 2 | Legacy Refactor | trick | Untangled 100k lines of jQuery into clean React. A true horror story. |
| 3 | Design System | treat | Built a comprehensive component library used by 50+ developers. |
| 4 | Real-time Chat | trick | WebSockets, Redis, and a lot of race conditions successfully vanquished. |
Data Structure
| Field | Type | Description |
|---|---|---|
id | number | Unique identifier used as the React key and the door toggle ID. Must be unique across all projects. |
title | string | Project name shown inside the opened door. |
type | 'treat' | 'trick' | Controls which icon is shown on reveal and sets the thematic tone. |
desc | string | One or two sentence description displayed below the icon. |
Adding a New Project
Add an entry to PROJECTS
Append a new object to the
PROJECTS array in assets/main.js. Give it the next sequential id:Choose a type
Pick
'treat' for a success story or 'trick' for a challenge-overcome narrative. This controls the reveal icon and animation — no other changes are needed.Rebuild and preview
Run the dev server (
vite) and navigate to /projects. Your new door will appear automatically in the CSS Grid. The grid is grid-cols-1 md:grid-cols-2 lg:grid-cols-4, so adding a fifth project will cause the grid to reflow — consider adjusting the column count if you add many projects.The grid uses
perspective-1000 on the container to give the 3D door rotation proper depth. If you remove or override this class, the rotateY transform will appear flat.