Skip to content

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

49 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Steam ์Šคํ† ์–ด ํด๋ก 

Steam ์Šคํ† ์–ด๋ฅผ ํ”ฝ์…€ ๋‹จ์œ„๋กœ ์žฌํ˜„ํ•œ ์›น + ๋ฐ์Šคํฌํƒ‘ ํด๋ก  ํ”„๋กœ์ ํŠธ


Steam ์Šคํ† ์–ด ํด๋ก 

Steam ์Šคํ† ์–ด UI๋ฅผ ์žฌํ˜„ํ•œ ๋ชจ๋…ธ๋ ˆํฌ ๊ธฐ๋ฐ˜ ํ’€์Šคํƒ ํด๋ก  ํ”„๋กœ์ ํŠธ

Next.js ์›น ์•ฑ๊ณผ Electron ๋ฐ์Šคํฌํƒ‘ ์•ฑ์ด ๊ณตํ†ต ํŒจํ‚ค์ง€๋ฅผ ๊ณต์œ ํ•˜๋Š” ๋ชจ๋…ธ๋ ˆํฌ ๊ตฌ์กฐ๋‹ค. ๊ฒŒ์ž„ ํƒ์ƒ‰, ๋ฆฌ๋ทฐ ์กฐํšŒ, ์žฅ๋ฐ”๊ตฌ๋‹ˆยท์œ„์‹œ๋ฆฌ์ŠคํŠธ ๊ด€๋ฆฌ, ๊ฒ€์ƒ‰ ๋“ฑ Steam ์Šคํ† ์–ด์˜ ํ•ต์‹ฌ ๊ธฐ๋Šฅ์„ ์žฌํ˜„ํ•œ๋‹ค. ์‹ค์ œ ๋ฐฑ์—”๋“œ๋‚˜ Steam API ์—ฐ๊ฒฐ์€ ์—†์œผ๋ฉฐ, ๋ชจ๋“  ๋ฐ์ดํ„ฐ๋Š” ๋ธŒ๋ผ์šฐ์ € ์„œ๋น„์Šค ์›Œ์ปค ๊ธฐ๋ฐ˜์˜ MSW(Mock Service Worker)๋กœ ์‹œ๋ฎฌ๋ ˆ์ด์…˜๋œ๋‹ค.

๋ชจ๋…ธ๋ ˆํฌ ๊ตฌ์กฐ

๋„๊ตฌ: pnpm workspaces + Turborepo

steam-clone/
โ”œโ”€โ”€ apps/
โ”‚   โ”œโ”€โ”€ web/        # Next.js 15 + React 19 โ€” ์Šคํ† ์–ด ์›น์‚ฌ์ดํŠธ (ํฌํŠธ :3000)
โ”‚   โ””โ”€โ”€ desktop/    # Electron 35 + React 19 + Vite 5 โ€” ๋ฐ์Šคํฌํƒ‘ ํด๋ผ์ด์–ธํŠธ
โ”œโ”€โ”€ packages/
โ”‚   โ”œโ”€โ”€ ui/         # ๊ณต์œ  React ์ปดํฌ๋„ŒํŠธ (GameCard, PriceDisplay, RatingBadge ๋“ฑ)
โ”‚   โ”œโ”€โ”€ types/      # ๊ณต์œ  TypeScript ํƒ€์ž… (Game, User, Cart, Review ๋“ฑ)
โ”‚   โ””โ”€โ”€ api/        # ๊ณต์œ  API ํด๋ผ์ด์–ธํŠธ ํŒฉํ† ๋ฆฌ (createApiClient)

๋ชจ๋“  ํŒจํ‚ค์ง€๋Š” TypeScript ์†Œ์Šค๋ฅผ ์ง์ ‘ exportํ•œ๋‹ค. Next.js์™€ Vite๊ฐ€ ๋นŒ๋“œ ์‹œ์ ์— ์ปดํŒŒ์ผํ•˜๋ฏ€๋กœ ๋ณ„๋„์˜ ํŒจํ‚ค์ง€ ๋นŒ๋“œ ๋‹จ๊ณ„๊ฐ€ ์—†๋‹ค.

์ฃผ์š” ๋ชจ๋“ˆ

  • Next.js 15 (App Router, ์›น ํ”„๋ ˆ์ž„์›Œํฌ)
  • Electron 35 + electron-vite 2 (๋ฐ์Šคํฌํƒ‘ ์…ธ)
  • React 19 (๋‘ ์•ฑ ๊ณตํ†ต)
  • TypeScript 5 (์ „ ํŒจํ‚ค์ง€ ํƒ€์ž… ์•ˆ์ „์„ฑ)
  • Tailwind CSS 3 (์Šคํƒ€์ผ๋ง โ€” CSS ์ปค์Šคํ…€ ํ”„๋กœํผํ‹ฐ ๊ธฐ๋ฐ˜ Steam ๋ธŒ๋žœ๋“œ ์ปฌ๋Ÿฌ ํ† ํฐ)
  • shadcn/ui (Radix UI ํ”„๋ฆฌ๋ฏธํ‹ฐ๋ธŒ โ€” ์•ฑ๋ณ„ ์„ค์น˜, Steam ํ…Œ๋งˆ ์ ์šฉ)
  • MSW 2 (๋ธŒ๋ผ์šฐ์ € ์„œ๋น„์Šค ์›Œ์ปค ๊ธฐ๋ฐ˜ ๋ชฉ API ๋ฐฑ์—”๋“œ)
  • TanStack React Query 5 (์„œ๋ฒ„ ์ƒํƒœ ๊ด€๋ฆฌ โ€” staleTime: 60_000)
  • Jotai 2 (ํด๋ผ์ด์–ธํŠธ ์ „์šฉ ์ƒํƒœ โ€” ์žฅ๋ฐ”๊ตฌ๋‹ˆ, ์œ„์‹œ๋ฆฌ์ŠคํŠธ, UI, ์œ ์ € ์„ธ์…˜)
  • Embla Carousel 8 (ํžˆ์–ด๋กœ ์บ๋Ÿฌ์…€ ๋ฐ ํ”ผ์ฒ˜๋“œ ํ–‰)
  • wouter 3 (๋ฐ์Šคํฌํƒ‘ SPA ๊ฒฝ๋Ÿ‰ ๋ผ์šฐํ„ฐ)
  • react-resizable-panels (๋ฐ์Šคํฌํƒ‘ ํŒจ๋„ ๋ ˆ์ด์•„์›ƒ)
  • Lucide React (์•„์ด์ฝ˜)

์›น ์•ฑ ํŽ˜์ด์ง€

๊ฒฝ๋กœ ์„ค๋ช…
/ ํ™ˆ โ€” ํžˆ์–ด๋กœ ์บ๋Ÿฌ์…€, ํ”ผ์ฒ˜๋“œ ๊ฒŒ์ž„, ํŠน๊ฐ€ ์„น์…˜, ํƒ‘ ์…€๋Ÿฌ, Steam Deck
/app/[id]/[slug] ๊ฒŒ์ž„ ์ƒ์„ธ โ€” ์Šคํฌ๋ฆฐ์ƒท, ์„ค๋ช…, ๋ฆฌ๋ทฐ, ํ‰์ , ๊ฐ€๊ฒฉ
/cart ์žฅ๋ฐ”๊ตฌ๋‹ˆ โ€” ์ƒํ’ˆ ๋ชฉ๋ก, ์ฃผ๋ฌธ ์š”์•ฝ, ์ถ”์ฒœ ๊ฒŒ์ž„
/search ๊ฒ€์ƒ‰ ๊ฒฐ๊ณผ โ€” ์ฟผ๋ฆฌ ๊ธฐ๋ฐ˜ ํ•„ํ„ฐ๋ง
/login ๋กœ๊ทธ์ธ โ€” ๋ธ”๋Ÿฌ ์ฒ˜๋ฆฌ๋œ ๊ฒŒ์ž„ ๊ทธ๋ฆฌ๋“œ ๋ฐฐ๊ฒฝ, QR ์ฝ”๋“œ ์Šคํ…, ๊ณ„์ • ์ƒ์„ฑ ํ๋ฆ„
/specials ์ „์ฒด ํŠน๊ฐ€ ๋ชฉ๋ก
/specials/[slug] ๋™์  ํŠน๊ฐ€ ๋žœ๋”ฉ ํŽ˜์ด์ง€
/explore/new ์‹ ์ž‘ ๋ฐ ์ธ๊ธฐ ๊ฒŒ์ž„ (์ •๋ ฌ ์ง€์›)
/explore/upcoming ์ถœ์‹œ ์˜ˆ์ • ๊ฒŒ์ž„
/genre/[name] ์žฅ๋ฅด๋ณ„ ๊ฒŒ์ž„ ๋ชฉ๋ก
/ways-to-play/[slug] ๋™์  ํ”Œ๋ ˆ์ด ๋ฐฉ์‹ ํŽ˜์ด์ง€
/about Steam ์†Œ๊ฐœ โ€” ๊ต์ฐจ ๋ฐฐ์น˜ ํ”ผ์ฒ˜ ์„น์…˜, ๊ธฐ๋Šฅ ๊ทธ๋ฆฌ๋“œ
/community ์ปค๋ฎค๋‹ˆํ‹ฐ ์†Œ๊ฐœ
/support ๊ณ ๊ฐ ์ง€์› ์†Œ๊ฐœ
/hardware Steam ํ•˜๋“œ์›จ์–ด ์‡ผ์ผ€์ด์Šค
/points/shop ํฌ์ธํŠธ ์ƒ์  ์Šคํ…

๋ฐ์Šคํฌํƒ‘ ์•ฑ ๋ทฐ

์‚ฌ์ด๋“œ๋ฐ” ํƒญ ๋„ค๋น„๊ฒŒ์ด์…˜๊ณผ ๋ฆฌ์‚ฌ์ด์ฆˆ ๊ฐ€๋Šฅํ•œ ํŒจ๋„๋กœ ๊ตฌ์„ฑ๋œ ๋‹จ์ผ ํŽ˜์ด์ง€ SPA๋‹ค.

๋ทฐ ์„ค๋ช…
Store ๊ฒŒ์ž„ ํƒ์ƒ‰ ๋ฐ ๊ตฌ๋งค
Library ๋ณด์œ  ๊ฒŒ์ž„ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ
Community ์ปค๋ฎค๋‹ˆํ‹ฐ ๊ธฐ๋Šฅ
Profile ์œ ์ € ํ”„๋กœํ•„ ๋ฐ ํ†ต๊ณ„
Downloads ๋‹ค์šด๋กœ๋“œ ํ˜„ํ™ฉ ๋ฐ ๋Œ€๊ธฐ์—ด
Settings ์•ฑ ํ™˜๊ฒฝ์„ค์ •
Game Launch Screen ๊ฒŒ์ž„ ์‹คํ–‰ ํ™”๋ฉด

๋ ˆ์ด์•„์›ƒ:

[ TitleBar โ€” ์œˆ๋„์šฐ ์ปจํŠธ๋กค, ๊ฒ€์ƒ‰ ]
[ ์‚ฌ์ด๋“œ๋ฐ” ๋„ค๋น„๊ฒŒ์ด์…˜ ] [ ์ฝ˜ํ…์ธ  ์˜์—ญ โ€” ํ™œ์„ฑ ๋ทฐ ]

๋ฐ์ดํ„ฐ ๋ฐ ์ƒํƒœ ๊ด€๋ฆฌ

๋ชฉ ๋ฐ์ดํ„ฐ (MSW)

Counter-Strike 2, Dota 2, Cyberpunk 2077, Baldur's Gate 3, Elden Ring, Stardew Valley, Civilization VII ๋“ฑ 22๊ฐœ์˜ ๋ชฉ ๊ฒŒ์ž„์ด ์žฅ๋ฅด๋ณ„๋กœ ํฌํ•จ๋œ๋‹ค. ๊ฐ ๊ฒŒ์ž„์€ ํ• ์ธ ๊ฐ€๊ฒฉ, ํ‰์ , ์Šคํฌ๋ฆฐ์ƒท, ํ”Œ๋žซํผ ์ง€์› ์—ฌ๋ถ€, ์นดํ…Œ๊ณ ๋ฆฌ, ์žฅ๋ฅด, ํƒœ๊ทธ ๋“ฑ ์ „์ฒด ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ๋ฅผ ํฌํ•จํ•œ๋‹ค.

๋ฆฌ๋ทฐ๋Š” ๊ฒŒ์ž„ ID๋ณ„๋กœ ๊ด€๋ฆฌ๋œ๋‹ค. ๋ชฉ ์œ ์ € ๊ณ„์ •์€ 5๊ฐœ์˜ ๊ฒŒ์ž„ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ, ์œ„์‹œ๋ฆฌ์ŠคํŠธ, ์ง€๊ฐ‘ ์ž”์•ก์„ ํฌํ•จํ•œ๋‹ค.

MSW๊ฐ€ ์ธํ„ฐ์…‰ํŠธํ•˜๋Š” API ์—”๋“œํฌ์ธํŠธ:

  • GET /api/games/featured
  • GET /api/games?genre=โ€ฆ
  • GET /api/games/search?q=โ€ฆ
  • GET /api/games/:id
  • GET /api/games/:gameId/reviews
  • GET /api/users/me
  • POST /api/users/me/wishlist

ํด๋ผ์ด์–ธํŠธ ์ƒํƒœ (Jotai ์•„ํ†ฐ)

์•„ํ†ฐ ์ƒํƒœ
cartItemsAtom ์žฅ๋ฐ”๊ตฌ๋‹ˆ ์ƒํ’ˆ ๋ชฉ๋ก
cartCountAtom / cartTotalAtom ํŒŒ์ƒ: ์žฅ๋ฐ”๊ตฌ๋‹ˆ ์ˆ˜๋Ÿ‰ ๋ฐ ํ•ฉ๊ณ„
wishlistAtom ์œ„์‹œ๋ฆฌ์ŠคํŠธ ๊ฒŒ์ž„ ID ๋ฐฐ์—ด
currentUserAtom / isSignedInAtom ์„ธ์…˜ ์œ ์ € ๋ฐ ๋กœ๊ทธ์ธ ์—ฌ๋ถ€
searchQueryAtom ํ˜„์žฌ ๊ฒ€์ƒ‰ ์ž…๋ ฅ๊ฐ’
mobileNavOpenAtom ๋ชจ๋ฐ”์ผ ๋“œ๋กœ์–ด ์—ด๋ฆผ/๋‹ซํž˜
activeVideoAtom ๊ฒŒ์ž„ ์ƒ์„ธ ํŽ˜์ด์ง€ ํ™œ์„ฑ ๋ฏธ๋””์–ด ์ธ๋ฑ์Šค

๋ฐ์ดํ„ฐ ํ๋ฆ„

์ปดํฌ๋„ŒํŠธ โ†’ useQuery ํ›… โ†’ React Query ์บ์‹œ
                               โ†“
                        MSW ์„œ๋น„์Šค ์›Œ์ปค โ†’ MOCK_* ๋ฐ์ดํ„ฐ
                               โ†“
                        ์‘๋‹ต์ด ์บ์‹œ์— ๋ฐ˜์˜

ํด๋ผ์ด์–ธํŠธ ์•ก์…˜ (์žฅ๋ฐ”๊ตฌ๋‹ˆ ์ถ”๊ฐ€, ์œ„์‹œ๋ฆฌ์ŠคํŠธ ํ† ๊ธ€) โ†’ Jotai ์•„ํ†ฐ (๋น„์˜์†์ )

UI ๋ฐ ์ปฌ๋Ÿฌ ์‹œ์Šคํ…œ

์ปฌ๋Ÿฌ๋Š” Steam ๋ธŒ๋žœ๋“œ ํ† ํฐ์— ๋งคํ•‘๋œ CSS ์ปค์Šคํ…€ ํ”„๋กœํผํ‹ฐ๋กœ ์ •์˜๋œ๋‹ค. Tailwind ๊ธฐ๋ณธ ํŒ”๋ ˆํŠธ ์ปฌ๋Ÿฌ๋Š” ์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š”๋‹ค.

ํ† ํฐ Hex ์šฉ๋„
backgrounds.pageBase #171a21 ํŽ˜์ด์ง€ / ๋„ค๋น„๊ฒŒ์ด์…˜ ๋ฐฐ๊ฒฝ
backgrounds.contentDark #1b2838 ์ฝ˜ํ…์ธ  ํŒจ๋„
backgrounds.cardBase #16202d ๊ฒŒ์ž„ ์นด๋“œ
backgrounds.sidebarPanel #2a475e ์‚ฌ์ด๋“œ๋ฐ” / ๋ณด์กฐ ํŒจ๋„
brand.steamBlue #1a9fff ์ธํ„ฐ๋ž™ํ‹ฐ๋ธŒ ์•ก์„ผํŠธ
brand.accentLight #66c0f4 ๋งํฌ, ํ•˜์ด๋ผ์ดํŠธ
text.primary #c7d5e0 ๋ณธ๋ฌธ ํ…์ŠคํŠธ
text.secondary #8f98a0 ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ, ๋ถ€๊ฐ€ ๋ ˆ์ด๋ธ”
price.discountBadgeBg #4c6b22 ํ• ์ธ ๋ฑƒ์ง€ ๋ฐฐ๊ฒฝ
price.discountBadgeText #a4d007 ํ• ์ธ์œจ ํ…์ŠคํŠธ
price.salePrice #acdbf5 ์ตœ์ข… / ํ• ์ธ ๊ฐ€๊ฒฉ

๊ธฐ๋ณธ ํฐํŠธ: Motiva Sans (๋Œ€์ฒด: Arial, Helvetica, sans-serif)

๊ณต์œ  ํŒจํ‚ค์ง€

@steam-clone/types

ํ•ต์‹ฌ ๋„๋ฉ”์ธ ์ธํ„ฐํŽ˜์ด์Šค: Game, Price, Rating, Platforms, Category, Genre, Tag, User, CartItem, Cart, Review, NavItem

@steam-clone/api

createApiClient(config) ํŒฉํ† ๋ฆฌ โ€” games, reviews, users ๋„ค์ž„์ŠคํŽ˜์ด์Šค๋กœ ๊ตฌ์„ฑ๋œ ํƒ€์ž… ์•ˆ์ „ ApiClient ๋ฐ˜ํ™˜

@steam-clone/ui

์›น๊ณผ ๋ฐ์Šคํฌํƒ‘์ด ๊ณต์œ ํ•˜๋Š” ์žฌ์‚ฌ์šฉ React ์ปดํฌ๋„ŒํŠธ:

  • Button โ€” primary / secondary / ghost ๋ณ€ํ˜•; sm / md / lg ํฌ๊ธฐ
  • GameCard โ€” ํ—ค๋” ์ด๋ฏธ์ง€, ์ œ๋ชฉ, ๊ฐ€๊ฒฉ ํ‘œ์‹œ, ํ‚ค๋ณด๋“œ ์ ‘๊ทผ์„ฑ ์ง€์›
  • PriceDisplay โ€” ํ• ์ธ ๋ฑƒ์ง€, ์ทจ์†Œ์„  ์›๊ฐ€, ํ• ์ธ๊ฐ€; sm / md / lg ํฌ๊ธฐ
  • RatingBadge โ€” ํ‰์  ๊ฐ์„ฑ๋ณ„ ์ƒ‰์ƒ ์ฝ”๋”ฉ (๊ธ์ • โ†’ ์ดˆ๋ก, ํ˜ผ์žฌ โ†’ ํ™ฉ์ƒ‰, ๋ถ€์ • โ†’ ๋นจ๊ฐ•)
  • PlatformIcons โ€” Windows / Mac / Linux ์ง€์› ๋ฑƒ์ง€

๊ฐœ๋ฐœ

pnpm dev                               # ์›น + ๋ฐ์Šคํฌํƒ‘ ์ „์ฒด ์‹คํ–‰
pnpm --filter @steam-clone/web dev     # ์›น๋งŒ ์‹คํ–‰ (localhost:3000)
pnpm --filter @steam-clone/desktop dev # ๋ฐ์Šคํฌํƒ‘๋งŒ ์‹คํ–‰
pnpm build                             # ์ „์ฒด ๋นŒ๋“œ
pnpm type-check                        # ์ „์ฒด TypeScript ๊ฒ€์‚ฌ
pnpm lint                              # ์ „์ฒด ESLint

Steam Store Clone

A pixel-faithful clone of the Steam storefront โ€” web + desktop.

A monorepo-based full-stack clone replicating the Steam store UI. A Next.js web app and an Electron desktop app share common packages for types, API, and UI components. Core features include game browsing, reviews, cart and wishlist management, and search. All data is simulated via MSW (Mock Service Worker) running as a browser service worker โ€” there is no real backend or Steam API connection.

Monorepo Structure

Tooling: pnpm workspaces + Turborepo

steam-clone/
โ”œโ”€โ”€ apps/
โ”‚   โ”œโ”€โ”€ web/        # Next.js 15 + React 19 โ€” storefront website (port :3000)
โ”‚   โ””โ”€โ”€ desktop/    # Electron 35 + React 19 + Vite 5 โ€” desktop client
โ”œโ”€โ”€ packages/
โ”‚   โ”œโ”€โ”€ ui/         # Shared React components (GameCard, PriceDisplay, RatingBadge, etc.)
โ”‚   โ”œโ”€โ”€ types/      # Shared TypeScript types (Game, User, Cart, Review, etc.)
โ”‚   โ””โ”€โ”€ api/        # Shared API client factory (createApiClient)

All packages export TypeScript source directly โ€” Next.js and Vite compile them at build time with no separate package build step.

Key Modules

  • Next.js 15 (App Router, web framework)
  • Electron 35 + electron-vite 2 (desktop shell)
  • React 19 (both apps)
  • TypeScript 5 (type safety across all packages)
  • Tailwind CSS 3 (styling โ€” Steam brand color tokens via CSS custom properties)
  • shadcn/ui (Radix UI primitives โ€” installed per-app, themed to Steam)
  • MSW 2 (browser service worker mock API backend)
  • TanStack React Query 5 (server state management โ€” staleTime: 60_000)
  • Jotai 2 (client-only state โ€” cart, wishlist, UI, user session)
  • Embla Carousel 8 (hero carousel and featured rows)
  • wouter 3 (lightweight router for desktop SPA)
  • react-resizable-panels (desktop panel layout)
  • Lucide React (icons)

Web App Pages

Route Description
/ Home โ€” hero carousel, featured games, special offers, top sellers, Steam Deck section
/app/[id]/[slug] Game detail โ€” screenshots, description, reviews, ratings, pricing
/cart Shopping cart โ€” item list, order summary, recommendations
/search Search results โ€” query-based filtering
/login Sign in โ€” form with blurred game grid background, QR code stub, create account flow
/specials All special offers
/specials/[slug] Dynamic special offer landing pages
/explore/new New & trending games with sorting
/explore/upcoming Upcoming releases
/genre/[name] Games filtered by genre
/ways-to-play/[slug] Dynamic ways-to-play pages
/about About Steam โ€” alternating feature sections, features grid
/community Community overview
/support Support overview
/hardware Steam hardware showcase
/points/shop Points shop stub

Desktop App Views

The desktop app is a single-page SPA with sidebar tab navigation and resizable panels.

View Description
Store Game browsing and purchasing
Library User's owned game library
Community Community features
Profile User profile and stats
Downloads Active and queued downloads
Settings App preferences
Game Launch Screen In-progress game launch UI

Layout:

[ TitleBar โ€” window controls, search ]
[ Sidebar nav ] [ Content area โ€” active view ]

Data & State

Mock Data (MSW)

22 mock games across genres including Counter-Strike 2, Dota 2, Cyberpunk 2077, Baldur's Gate 3, Elden Ring, Stardew Valley, Civilization VII, and more. Each game carries full metadata: pricing with discounts, ratings, screenshots, platform flags, categories, genres, and tags.

Reviews are keyed per game. A mock user account ships with a library of 5 games, a wishlist, and wallet balance.

API handlers intercept:

  • GET /api/games/featured
  • GET /api/games?genre=โ€ฆ
  • GET /api/games/search?q=โ€ฆ
  • GET /api/games/:id
  • GET /api/games/:gameId/reviews
  • GET /api/users/me
  • POST /api/users/me/wishlist

Client State (Jotai Atoms)

Atom State
cartItemsAtom Items currently in cart
cartCountAtom / cartTotalAtom Derived cart count and total
wishlistAtom Array of wishlisted game IDs
currentUserAtom / isSignedInAtom Session user and sign-in status
searchQueryAtom Current search input
mobileNavOpenAtom Mobile drawer open/closed
activeVideoAtom Active media index on game detail

Data Flow

Component โ†’ useQuery hook โ†’ React Query cache
                                  โ†“
                           MSW service worker โ†’ MOCK_* data
                                  โ†“
                           Response hydrates cache

Client actions (add to cart, wishlist toggle) โ†’ Jotai atoms (no persistence)

UI & Color System

Colors are defined as CSS custom properties mapped to Steam brand tokens. No default Tailwind palette colors are used.

Token Hex Usage
backgrounds.pageBase #171a21 Page / nav background
backgrounds.contentDark #1b2838 Content panels
backgrounds.cardBase #16202d Game cards
backgrounds.sidebarPanel #2a475e Sidebar / secondary panels
brand.steamBlue #1a9fff Interactive accent
brand.accentLight #66c0f4 Links, highlights
text.primary #c7d5e0 Body text
text.secondary #8f98a0 Metadata, dimmed labels
price.discountBadgeBg #4c6b22 Discount badge background
price.discountBadgeText #a4d007 Discount percentage
price.salePrice #acdbf5 Final / sale price

Primary font: Motiva Sans (fallback: Arial, Helvetica, sans-serif)

Shared Packages

@steam-clone/types

Core domain interfaces: Game, Price, Rating, Platforms, Category, Genre, Tag, User, CartItem, Cart, Review, NavItem

@steam-clone/api

createApiClient(config) factory returning a typed ApiClient with namespaced methods for games, reviews, and users.

@steam-clone/ui

Reusable React components shared between web and desktop:

  • Button โ€” primary / secondary / ghost variants; sm / md / lg sizes
  • GameCard โ€” header image, title, price display, keyboard-accessible click handler
  • PriceDisplay โ€” discount badge, strikethrough original price, sale price; sm / md / lg sizes
  • RatingBadge โ€” color-coded by sentiment (positive โ†’ green, mixed โ†’ amber, negative โ†’ red)
  • PlatformIcons โ€” Windows / Mac / Linux support badges

Development

pnpm dev                               # Start web + desktop
pnpm --filter @steam-clone/web dev     # Web only (localhost:3000)
pnpm --filter @steam-clone/desktop dev # Desktop only
pnpm build                             # Build all
pnpm type-check                        # TypeScript check all
pnpm lint                              # ESLint all

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages