hikari-8 / blog_client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

personal blog

Committer: @hikari-8

This repo is working in progress...๐Ÿƒ

Table of Contents

Getting Started

To get started with this application, follow the instructions below:

Installation

  1. Clone this repository to your local machine

  2. Navigate to the project directory:

    cd blog_client
  3. Install the project dependencies using npm:

    npm install

Running the App

Run the npm run dev command:

npm run dev

Project Structure

WIP

The project structure is organized as follows:

โ””โ”€โ”€ src/
    โ”œโ”€โ”€ __generated__/            #  Generated types and mock data by Orval
    โ”œโ”€โ”€ app/                      #  Navigation for App Router
    โ”œโ”€โ”€ assets/                   #  Reusable or global assets like images, fonts, etc.
    โ””โ”€- components/
    |    โ”œโ”€โ”€ page/                #  Each pages
    |    โ”œโ”€โ”€ *Features/           #  Application's features (begin with Uppercase)
    |    โ”œโ”€โ”€ ui/                  #  Globally reusable UI components
    |    โ””โ”€โ”€ functional/          #  Globally reusable functional which has no view, only behavior
    โ”œโ”€โ”€ contexts/                 #  Globally reusable state
    โ”œโ”€โ”€ services/                 #  Application services like API clients
    โ”œโ”€โ”€ themes/                   #  Globally reusable themes like color, layouts, etc.
    โ”œโ”€โ”€ utils/                    #  Utility/helper functions
    โ””โ”€โ”€ stories/                  #  Storybook ui parts and tests

๏ผŠ src/app ใฎๅฝนๅ‰ฒใฏๅŸบๆœฌ็š„ใซใƒซใƒผใƒ†ใ‚ฃใƒณใ‚ฐใฎใฟใจใ™ใ‚‹

Components Breakdown

ใ‚ขใƒ—ใƒชใ‚ฑใƒผใ‚ทใƒงใƒณใซๅญ˜ๅœจใ™ใ‚‹ Component ใ‚’ไปฅไธ‹ใฎ 4 ็จฎ้กžใซๅˆ†้กžใ—ใฆใƒ‡ใ‚ฃใƒฌใ‚ฏใƒˆใƒชใ‚’ๅˆ†ใ‘ใ‚‹

-   src/components/page
-   src/components/${Feature}
-   src/components/ui
-   src/components/functional

src/components/page : 1 ใคใฎใƒšใƒผใ‚ธใ‚’่กจใ™ใ‚ณใƒณใƒใƒผใƒใƒณใƒˆ

src/components/${Feature} : ไฝ•ใ‚‰ใ‹ใฎใƒ‰ใƒกใ‚คใƒณใซ้–ขๅฟƒใ‚’ๆŒใคใ‚ณใƒณใƒใƒผใƒใƒณใƒˆ (ใƒ‰ใƒกใ‚คใƒณใ”ใจใซใƒ‡ใ‚ฃใƒฌใ‚ฏใƒˆใƒชใ‚’ๅˆ‡ใ‚‹, ใƒ‡ใ‚ฃใƒฌใ‚ฏใƒˆใƒชๅใฏไป–ใ‚ณใƒณใƒใƒผใƒใƒณใƒˆใจใฎๅทฎๅˆฅๅŒ–ใฎใŸใ‚ๅคงๆ–‡ๅญ—ใงๅง‹ใ‚ใ‚‹)

src/components/ui : ใƒ‰ใƒกใ‚คใƒณใซ้–ขๅฟƒใŒใชใ„ใ‚ณใƒณใƒใƒผใƒใƒณใƒˆ

src/components/functional : ใƒ‰ใƒกใ‚คใƒณใซ้–ขๅฟƒใŒใชใใ€view ใ‚’ๆŒใŸใšๆŒฏใ‚‹่ˆžใ„ใฎใฟใ‚’ๆŒใคใ‚ณใƒณใƒใƒผใƒใƒณใƒˆ

Dependencies

่‡ชๅˆ†ใฎๅณๅดใซๅญ˜ๅœจใ—ใฆใ„ใ‚‹ใ‚ณใƒณใƒใƒผใƒใƒณใƒˆใ‚’ import ใ—ใฆใ‚ˆใ„ใ€‚
page ไปฅๅค–ใฏ่‡ชๅˆ†ใฎๆ‰€ๅฑžใ™ใ‚‹ๅˆ†้กž่ปธใฎๅ‚็…งใ‚‚ๅฏ่ƒฝใ€‚ ไพๅญ˜้–ขไฟ‚ใฎใƒใ‚งใƒƒใ‚ฏใฏใ€eslint-plugin-strict-dependenciesใง้™็š„ใซ่กŒใชใฃใฆใ„ใ‚‹ใ€‚

functional or ui โ†’ models โ†’ page

Test

Test library, tool

  • E2E test : Playwright
  • Unit test : Jest
  • UI test : StoryBook
  • Accessibility test : axe-core, lighthouse

Test rule

About


Languages

Language:TypeScript 90.5%Language:CSS 7.2%Language:JavaScript 2.3%