The virtual filesystem is the backbone of every navigation command in guest-portfolio.dev. When a visitor runsDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/guest-portfolio.dev/llms.txt
Use this file to discover all available pages before exploring further.
ls, cd, or cat, the terminal resolves paths against a plain JavaScript object tree exported from utils/fileSystem.js. No server, no database — just a nested object you can edit directly.
The fileSystem Object
The entire filesystem lives in a single constant (c in the minified build, exported and used throughout the app). Its root is the home directory "~", and every node in the tree follows a consistent schema.
Node Schema
Directory node:Default Filesystem Tree
The default home directory (~) ships with the following structure:
Special Content Keys
Thecontent field in a file node is usually a plain string that cat renders as-is. However, Terminal.js special-cases several filenames in its cat handler and renders custom React components instead of the raw content string:
| Filename | What cat renders |
|---|---|
about.md | <AboutOutput /> — neofetch-style bio component |
references.log | Inline JSX log entries (three hardcoded lines) |
| all others | node.content rendered as plain text |
content value:
Utility Functions
Two helper functions are exported fromutils/fileSystem.js and used throughout the app.
readPath(cwd, path)
Resolves path relative to the current working directory cwd. Supports:
- Relative paths (
projects/terminal-portfolio.md,../blog) ..to traverse up one level (stops at~)~-prefixed paths (~/projects) — always resolves from home- Absolute paths starting with
/— treated as absolute from home root
getNode(path)
Resolves a path that is already absolute (starting from ~). Used internally by readPath. Returns the node object, or undefined if the path does not exist.
Adding a New Project File
Verify with ls and cat
In the live terminal, navigate to the projects directory and confirm the file appears:The
cat command will display the content string as plain preformatted text.(Optional) Link to a man page
If the project warrants a full case study, add a corresponding entry in
case-studies/ with content: "case:my-new-project" and create the matching JSX page in ManOutput.js. See the Content customization guide for details.Adding a New Directory
Creating a subdirectory follows the same pattern as a file node, but withtype: "dir" and a children object:
children of whichever parent directory you want it to live in.