Frontend Architecture Modern Stack
Detailed documentation of the CS2Inspect frontend architecture built with Nuxt 3.
Page Structure
pages/
├── index.vue # Main dashboard/loadout management
├── status.vue # System health status dashboard
├── weapons/
│ └── [type].vue # Dynamic weapon customization pages
├── knifes/
│ └── index.vue # Knife customization page
├── gloves/
│ └── index.vue # Glove customization page
├── agents/
│ └── index.vue # Agent selection page
├── music-kits/
│ └── index.vue # Music kit selection page
└── pins/
└── index.vue # Pin collection pageComponent Architecture
components/
├── WeaponSkinModal.vue # Weapon skin selection & customization
├── KnifeSkinModal.vue # Knife skin selection & customization
├── GloveSkinModal.vue # Glove skin selection & customization
├── StickerModal.vue # Sticker application
├── KeychainModal.vue # Keychain attachment
├── VisualCustomizerModal.vue # Advanced visual customization
├── InspectItemDisplay.vue # Item preview display
├── LoadoutSelector.vue # Loadout management
├── ThemeProvider.vue # Theme configuration
├── HealthCard.vue # Health status card component
├── HistoryChart.vue # Health history chart component
└── [Various Tab Components] # Item category tabsState Management (Pinia)
Stores
weaponsStore(stores/weapons.ts)- Manages weapon configurations
- Handles weapon skin data
- Tracks active weapon selections
loadoutStore(stores/loadout.ts)- Current active loadout
- Loadout switching logic
- Loadout CRUD operations
authStore(stores/auth.ts)- User authentication state
- Steam profile information
- Session management
itemsStore(stores/items.ts)- Item catalog data
- Skin, sticker, agent data
- Cached item information
Composables
Core Composables
useInspectItem- CS2 inspect URL parsing and item data extractionuseLoadout- Loadout management utilitiesuseWeaponConfig- Weapon configuration helpersuseAuth- Authentication utilitiesuseApi- API request wrapper with auth handling
Internationalization
Framework: nuxt-i18n-micro
Supported Languages:
- English (EN) - Default
- German (DE)
- Russian (RU)
Translation Files: locales/ directory
en.json- English translationsde.json- German translationsru.json- Russian translations
Usage:
vue
<template>
<div>{{ $t('nav.weapons') }}</div>
</template>Adding New Languages: See Contributing Guide
Styling
CSS Architecture
- Framework: Tailwind CSS
- Preprocessor: SASS/SCSS
- Component Styles: Scoped styles in
.vuefiles - Global Styles:
assets/css/directorytheme-variables.css- CSS custom propertiesglassmorphism.css- Glass effect utilitiesanimations.css- Animation definitions
Theme Customization
Dark Theme: Default and forced mode
- Background:
#121212,#1a1a1a,#242424 - Accent:
#FACC15(yellow/gold) - Hover:
#F59E0B,#CA8A04
Naive UI Theme Overrides: components/ThemeProvider.vue
See: Theme Customization Guide
UI Components
Library: Naive UI
Key Components Used:
n-modal- Modal dialogsn-select- Dropdowns and selectsn-input- Text inputsn-button- Buttonsn-tabs- Tab navigationn-card- Card containersn-data-table- Data tablesn-message- Toast notifications
Visual Customizer
Technology: HTML5 Canvas API
Features:
- Drag-and-drop sticker placement
- Rotation and scaling controls
- Real-time preview
- Export to configuration
Implementation: components/VisualCustomizerModal.vue
Client-Side Routing
Framework: Nuxt 3 file-based routing
Routes:
/- Main dashboard/weapons/:type- Weapon customization (dynamic)/knifes- Knife customization/gloves- Glove customization/agents- Agent selection/music-kits- Music kit selection/pins- Pin collection/status- Health status dashboard
Performance Optimizations
Code Splitting
Nuxt automatically splits code by:
- Page-level chunks
- Component lazy loading
- Dynamic imports
Image Optimization
- CDN delivery for skin images
- Lazy loading with IntersectionObserver
- Responsive images with
srcset - WebP format when supported
Caching Strategy
- API responses cached in Pinia stores
- LocalStorage for user preferences
- Session storage for temporary data
Related Documentation
- Backend Architecture - Server-side architecture
- Architecture Overview - System overview
- Components Guide - Component reference
- Theme Customization - Styling guide