BoBeenLee / quiz

Home Page:quiz-bobeenlee.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Quiz

Simple Quiz App

lastUpdated


✨ Features

  • ⚡️ Next.js 12
  • ⚛️ React 18
  • ✨ Material UI
  • 👀 TypeScript
  • 📚 Storybook - Build component driven UIs faster
  • 🏗 Nx.dev - Smart, Fast and Extensible Build System
  • 🃏 Jest — Configured for unit testing
  • 📈 Absolute Import and Path Alias — Import components using @quiz/ prefix (rename prefix)
  • 📏 ESLint — Find and fix problems in your code, also will auto sort your imports
  • 💖 Prettier — Format your code consistently
  • 👷 Github Actions — Lint, Test your code on Master Branch, Automatic Storybook Deployment
  • 📗 State Management - Zustand

📂 Directory structure

root
├── apps
├──── nextjs-app       # nextjs app
├── libs
├──── features         # all of the code for a feature and putting it in one single place (ex) todo)
├─────── quiz
├────────── apis
├────────── components
├────────── interfaces
├────────── hooks
├────────── stores
├────────── utils
└── README.md

⚡️ Getting Started

1. Install dependencies

npm i --legacy-peer-deps

2. Run the development server

You can start the nextjs using this command:

npm run dev

📚 Convention

Naming Convention

  • 파일 이름 네이밍

    • 하이픈 형식 ex) z-index.ts, login-modal.tsx ...
  • 컴포넌트명 네이밍

    • ex) const LoginModal = () => { ... }
  • 패키지, 폴더명 단수or복수 네이밍

    • 여러파일이 들어갈거같다면 복수명으로 ex) shared/styles, shared/libs ...
    • 고유 기능을 의미한다면 단수 ex) app/email, app/login ...

Commit Convention

Testing

Unit Testing

  • 유틸 테스트
    • /lib/features/quiz/src/lib/utils/datetime/datetime.spec

Store Testing

  • 퀴즈 스토어 테스트
    • /lib/features/quiz/src/lib/stores/use-quiz-store/use-quiz-store.spec

Interaction Testing

  • 퀴즈 문제 작성 테스트
    • 로컬 스토리북 실행 후
npm run features-quiz:storybook

Deployment

About

quiz-bobeenlee.vercel.app


Languages

Language:TypeScript 77.1%Language:JavaScript 15.3%Language:CSS 6.5%Language:HTML 0.5%Language:Dockerfile 0.4%Language:Shell 0.2%