system report

terminal.daljeetsingh.me

terminal.daljeetsingh.me

A browser-native terminal portfolio with a virtual filesystem, 30 commands across 6 modules, live GitHub data, and an AI assistant grounded in portfolio content.

30 commands6 modules5 themesPWAISR 300sWebGL rendererVercel AI SDK streaming

Overview

What it is

A terminal emulator running in the browser, built on xterm.js and Next.js 14 App Router. It presents a personal portfolio as a navigable virtual filesystem with a Bash-like command interface.

The entire content layer — projects, skills, contact, bio — is driven by a single data file. Adding a project means adding one JSON node; the terminal can immediately navigate, list, and display it without any code changes.

Design principles

  • Command registry pattern — each module exports a typed command definition array
  • Single source of truth — all portfolio content from one data file
  • ANSI formatting abstracted into a helper — no raw escape strings in business logic
  • Minimal React state: cwd, theme, history, busy flag via Zustand
  • Dual input: xterm.js for desktop, companion HTML input for mobile compatibility
  • GitHub data cached server-side and revalidated periodically — no blocking fetch on load
Browser
  ┌────────────────────────────────────────────────────────────┐
  │  page.tsx (RSC)                                            │
  │   ├─ prefetch GitHub snapshot  (ISR cache, server-side)    │
  │   └─ <TerminalWorkbench>  (client component)               │
  │       ├─ xterm.js  →  input handler  →  command parser     │
  │       ├─ HTML input  (mobile / fallback)                   │
  │       ├─ useTerminalStore (Zustand)                        │
  │       └─ executeCommand() → CommandResult                  │
  │           ├─ portfolio module  (whoami / projects / ...)  │
  │           ├─ filesystem module (ls / cd / cat / ...)      │
  │           ├─ github module     (github / ask)              │
  │           │   ├─ GitHub integration  (server-side)        │
  │           │   └─ AI streaming integration (server-side)   │
  │           ├─ theme module      (theme)                     │
  │           ├─ easter-eggs module (neofetch / matrix / ...)  │
  │           └─ utility module    (history / tree / date ...) │
  └────────────────────────────────────────────────────────────┘

Command Reference (30 total)

portfolio(5)filesystem(6)github(2)theme(1)easter-eggs(8)utility(8)
cmdmoduleusage
helpportfoliohelp [cmd]
whoamiportfoliowhoami
projectsportfolioprojects
skillsportfolioskills
contactportfoliocontact
lsfilesystemls [path]
cdfilesystemcd <path>
pwdfilesystempwd
catfilesystemcat <file>
openfilesystemopen <file>
tabhintfilesystemtabhint
githubgithubgithub
askgithubask "<question>"
themethemetheme [name]
cleareaster-eggsclear
neofetcheaster-eggsneofetch
matrixeaster-eggsmatrix
hackeaster-eggshack
cowsayeaster-eggscowsay [message]
curleaster-eggscurl
sudoeaster-eggssudo <cmd>
rmeaster-eggsrm -rf <path>
historyutilityhistory
treeutilitytree [path]
echoutilityecho <text>
dateutilitydate
bannerutilitybanner <text>
uptimeutilityuptime
manutilityman <cmd>
greputilitygrep <pattern> <file>

Virtual Filesystem

The virtual filesystem is a nested JSON structure — directories are plain objects, files are strings. The terminal traverses it for ls, cd, cat, and Tab autocomplete.

~/
├── bio.txt            — personal introduction text
├── now.txt            — what I'm working on right now
├── resume.pdf         — stub: opens resume URL when using cat
├── projects/
│   ├── janus/
│   │   ├── readme.md
│   │   └── link.url
│   ├── drishti/
│   │   ├── readme.md
│   │   └── link.url
│   ├── sp500-dashboard/
│   │   ├── readme.md
│   │   └── link.url
│   └── ... (more projects)
├── skills/
│   ├── languages.md
│   ├── frameworks.md
│   ├── tools.md
│   └── learning.md
├── contact/
│   ├── email.txt
│   ├── github.url
│   └── linkedin.url
├── secret/
│   └── .credits       — hidden easter egg
└── .config/
    ├── theme.txt
    └── aliases.sh

Theme System

Themes are CSS-variable records. Switching a theme updates both the xterm.js renderer and the page CSS variables simultaneously. Use theme [name] in the terminal, or click a theme name in the sidebar.

default

Deep blue-grey — the base dark theme

bg #060c17·accent #36c8b4
matrix

Classic green phosphor on black

bg #001100·accent #00ff41
cyber

Cyberpunk magenta on near-black

bg #0a0014·accent #ff00ff
minimal

Low-contrast neutral grey palette

bg #111111·accent #888888
dracula

Dracula color scheme — purple+pink

bg #282a36·accent #ff79c6

Tech Stack

package
next
react
typescript
@xterm/xterm
@xterm/addon-fit
@xterm/addon-webgl
zustand
ai
@ai-sdk/google
octokit
next-pwa
tailwindcss

Live Integrations

GitHub

Live GitHub stats — public repos, total stars, and follower count — are fetched server-side and cached for performance. The github command refreshes data on demand.

AI Assistant

The ask command streams AI-generated answers grounded in portfolio content — projects, skills, and background — for accurate, context-aware responses.

Keyboard Shortcuts

TabAutocomplete command or path
Previous command in history
Next command in history
EnterExecute current command
Ctrl+LClear terminal buffer
Ctrl+CCancel current input