How krex381/krexizm works
Purpose and runtime
This is a static personal portfolio SPA built with React 19, TypeScript, and Vite. Vite builds deployable assets to dist/; scripts/generate-sitemap.ts adds dist/sitemap.xml. The browser application is bootstrapped from src/main.tsx, with global styling in src/index.css.
Application shell and navigation
src/App.tsx is the root composition layer. It owns page selection, lazy-loads the four portfolio sections, and applies Framer Motion page transitions. Shared chrome is supplied by src/components/Topbar.tsx and src/components/Footer.tsx; application-level render failures are contained by src/components/ErrorBoundary.tsx.
Page-level feature boundaries
The portfolio is divided into independently loadable content surfaces:
• src/pages/ProfilePage.tsx: primary identity/profile view and live social/developer signals.
• src/pages/WorkPage.tsx: projects, GitHub-oriented activity, languages, and repository statistics.
• src/pages/EducationPage.tsx: education/history content.
• src/pages/ConnectPage.tsx: social/contact surface, including direct Web3Forms submission.
These pages consume centralized identity, links, skills, and third-party identifiers rather than owning separate configuration.
Central configuration and presentation assets
src/config.ts is the principal content and integration boundary: it provides display metadata, location, Discord and GitHub identifiers, social links, skills, and the Web3Forms access key. Visual behavior is implemented with shared animated primitives such as src/components/BlurText.tsx, src/components/SplitText.tsx, and src/components/CountUp.tsx, plus the reusable badge at src/components/ui/badge.tsx.
Live Discord data flow
src/hooks/useLanyard.ts connects the client directly to Lanyard’s Discord-status WebSocket using the configured Discord user ID. Live presence/activity data then flows into profile-facing Discord widgets, with data shaping and display helpers in src/lib/discord.ts. This is a browser-to-third-party real-time integration; no repository backend is present.
Remote data and external services
GitHub profile, repository, contribution, language, and star data are fetched client-side by page features, using the generic request lifecycle utility in src/lib/useFetch.ts. src/lib/techIcons.ts maps technologies to iconography, while src/lib/flags.ts and src/lib/httpcat.ts support geographic/status presentation. Contact submission crosses directly from src/pages/ConnectPage.tsx to Web3Forms, which delivers messages to the configured email endpoint.
Build and deployment boundary
vite.config.ts defines the Vite application build/runtime setup; package.json defines development, build, and sitemap-generation commands. The architecture assumes static hosting: client code communicates directly with GitHub, Lanyard, and Web3Forms, with no server API or persistent database in this repository.
Main entry points: App.tsx App shell · config.ts Portfolio configuration · ProfilePage.tsx Profile page · WorkPage.tsx Work page
Components 21
Browser SPA
- Application bootstrap · Mounts the browser application and global styles.
src/main.tsx - App shell · Selects pages, lazy-loads sections, and applies transitions.
src/App.tsx - Topbar
src/components/Topbar.tsx - Footer
src/components/Footer.tsx - Error boundary
src/components/ErrorBoundary.tsx - Profile page · Shows identity and live social signals.
src/pages/ProfilePage.tsx - Work page · Shows projects and GitHub activity.
src/pages/WorkPage.tsx - Education page
src/pages/EducationPage.tsx - Connect page · Submits contact messages directly to Web3Forms.
src/pages/ConnectPage.tsx
Shared UI and data
- Portfolio configuration · Centralizes identity, links, skills, IDs, and Web3Forms key.
src/config.ts - Lanyard hook · Connects with the configured Discord user ID.
src/hooks/useLanyard.ts - Discord presentation
src/lib/discord.ts - Request lifecycle · Provides client-side remote request state.
src/lib/useFetch.ts - Presentation primitives · Includes text, count, badge, icon, flag, and status presentation helpers.
src/components/BlurText.tsx
External services
Browser clients call these services directly.
- GitHub APIs · Supplies profile, repositories, contributions, languages, and stars.
- Lanyard
- Web3Forms · Delivers form messages to the configured email endpoint.
Build and deploy
- Vite build setup
vite.config.ts - Project commands · Defines development, build, and sitemap commands.
package.json - Sitemap generator · Adds sitemap.xml to built assets.
scripts/generate-sitemap.ts - Static deployable assets · Published to static hosting.
Connections 25
- Application bootstrap → App shell: mounts
- App shell → Error boundary: contains
- App shell → Topbar: renders
- App shell → Footer: renders
- App shell → Profile page: lazy-loads
- App shell → Work page: lazy-loads
- App shell → Education page: lazy-loads
- App shell → Connect page: lazy-loads
- Profile page → Portfolio configuration: reads content and IDs
- Work page → Portfolio configuration: reads content
- Education page → Portfolio configuration: reads content
- Connect page → Portfolio configuration: reads links and access key
- Profile page → Lanyard hook: uses live presence
- Lanyard hook → Portfolio configuration: reads Discord ID
- Lanyard hook → Lanyard: opens WebSocket
- Lanyard hook → Discord presentation: passes presence data
- Work page → Request lifecycle: uses
- Request lifecycle → GitHub APIs: fetches data
- Connect page → Web3Forms: submits contact form
- Profile page → Presentation primitives: uses UI primitives
- Work page → Presentation primitives: uses UI primitives
- Project commands → Vite build setup: runs build
- Vite build setup → Static deployable assets: builds assets
- Project commands → Sitemap generator: runs after build
- Sitemap generator → Static deployable assets: writes sitemap.xml