Skip to content

borgesius/dana-dzik

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

331 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dana's Desktop

Personal website. danadzik.com

Development

npm install
npm run dev

Environment Variables

Copy .env.example and fill in credentials. All API keys are server-side only (Vercel serverless functions).

Variable Description
LASTFM_API_KEY Last.fm API
LASTFM_USERNAME Last.fm username
STRAVA_CLIENT_ID Strava API
STRAVA_CLIENT_SECRET Strava API secret
STRAVA_REFRESH_TOKEN Initial OAuth token (stored in Redis after first use)
UPSTASH_REDIS_REST_URL Upstash REST URL
UPSTASH_REDIS_REST_TOKEN Upstash REST token

Scripts

Command Description
npm run dev Start dev server
npm run build Production build
npm run lint ESLint + Stylelint
npm run typecheck TypeScript check
npm run test:unit Run tests

Routes

/about, /projects, /resume, /links, /guestbook, /stats, /felixgpt

Architecture

Vanilla TypeScript SPA styled as a retro desktop OS. DOM manipulation via class-based components. Vercel serverless functions for API integrations. Upstash Redis for persistence.

Features

Window Manager

Draggable, resizable, focusable windows with z-index management, taskbar integration, and theme-aware chrome.

Terminal & Virtual Filesystem

Shell emulator with a tree-based virtual filesystem using Windows-style paths (3:\Users\Dana\Desktop\...). Supports cd, ls, cat, tree, edit, open, whoami, etc. File ops with 4KB size limit. Executables can open windows or run handlers.

Welt Language

Custom esoteric programming language with Schopenhauerian influence. 8 memory slots (byte-wrapped, 0–255). Recursive descent parser, tree-walking interpreter. Compiles down to GRUND, a lower-level assembly with ring buffer and registers.

Margin Call

Idle commodity trading simulator. Tick-based price simulation (trend/volatility/noise/mean reversion) with seeded RNG. 6 commodities, limit orders, corner market detection, random events, offline catchup. Phases unlock progressively: trading → factories → upgrades → market influence → org chart → structured products.

Pinball

2D pinball with custom physics engine. Circle-line/circle-circle collision detection, 4 substeps per frame. Canvas renderer. Flippers, bumpers, targets, launcher with charge mechanic. 3-ball lives, high score persistence.

Autobattler

Turn-based auto-combat with shop/run loop and post-Enlightenment continental philosophy theme. 5 factions with scaling abilities. Units have triggers (combatStart, onDeath, roundStart, etc.). Buy/sell/reroll in shop phase, 30-round combat cap. Unit collection unlocked by winning against factions.

Progression & Prestige

XP/level system with career skill tree (4 branches: Engineering, Trading, Growth, Executive). Career switching with dormancy penalty. Prestige resets for Hindsight currency. Ascension layer resets prestige for Foresight currency with permanent upgrades.

System Crash Effects

Editing system files in the virtual filesystem (3:\DAS\*.welt) triggers themed crash effects: BSOD, display corruption, clock haywire, memory faults, forced restart. Glitch manager runs random visual artifacts (color splits, scanlines, screen tears) at configurable intervals. Calm mode disables all effects.

Theming & Localization

4 themes (Win95, Mac Classic, Apple II, C64) with light/dark/system color schemes. 8 locales (en, de, it, es, fr, pt, ja, zh) via i18next. Theme and locale glitches flash random alternatives as visual effects.

External Integrations

Other

Serverless Functions

Vercel functions in api/ with Upstash Redis (api/lib/redisGateway.ts). Response caching (1hr Last.fm, 6hr Strava, 5min analytics, 60s visitor count). Strava OAuth token refresh via Redis.

Testing

Unit Tests

Vitest with v8 coverage. Node environment, thread pool. 600 unit tests across 25 suites covering market simulation, filesystem diff, terminal commands, Welt interpreter, pinball physics, progression balance, save migrations, etc.

E2E Tests

17 basic functionality E2E tests via Playwright Chromium against a Vite preview server (localhost:4173).

CI/CD

Runs on PRs, pushes to main/staging, and merge queue. Single job: lint → typecheck → build → unit tests with coverage → Playwright E2E. Posts coverage summary as commit status. PR comments for both coverage (vitest-coverage-report-action) and Playwright results. Uploads both reports as artifacts (30 day retention).

Runs on PRs and pushes to main/staging. Builds and runs Lighthouse CI, posts scores (Performance, Accessibility, Best Practices, SEO) and Web Vitals (FCP, LCP, CLS, TBT, SI) as commit status, job summary, and PR comment. Updates existing PR comment on re-runs.

Cron at 2 AM UTC. Full pipeline: lint, typecheck, build, unit tests, E2E. Uploads test results with 7-day retention.

Runs on push to main. semantic-release with Conventional Commits preset. Generates changelog, bumps version in package.json, creates GitHub release. Breaking changes (!) → major, feat → minor, fix/perf/revert → patch, everything else skipped.

Validates PR titles (squash merge message) and merge queue commits against commitlint with conventional commits. Allowed types: feat, fix, docs, style, refactor, perf, test, chore, revert, ci, build.

Linting & Formatting

  • ESLint — typescript-eslint with strict rules: explicit return types, explicit member accessibility, consistent type imports/exports, sorted imports (simple-import-sort), no unused imports. Prettier integration. (eslint.config.mjs)
  • Stylelint — stylelint-config-standard (stylelint.config.mjs)
  • Prettier — via eslint-plugin-prettier

Build

Vite with @ path alias to src/. Injects __BUILD_TIME__, __GIT_COMMIT__, __VERSION__ as compile-time constants. Deployed on Vercel.

About

Personal website

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages