@shaykec/bridge 0.4.25 → 0.4.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/journeys/ai-engineer.yaml +34 -0
- package/journeys/backend-developer.yaml +36 -0
- package/journeys/business-analyst.yaml +37 -0
- package/journeys/devops-engineer.yaml +37 -0
- package/journeys/engineering-manager.yaml +44 -0
- package/journeys/frontend-developer.yaml +41 -0
- package/journeys/fullstack-developer.yaml +49 -0
- package/journeys/mobile-developer.yaml +42 -0
- package/journeys/product-manager.yaml +35 -0
- package/journeys/qa-engineer.yaml +37 -0
- package/journeys/ux-designer.yaml +43 -0
- package/modules/README.md +52 -0
- package/modules/accessibility-fundamentals/content.md +126 -0
- package/modules/accessibility-fundamentals/exercises.md +88 -0
- package/modules/accessibility-fundamentals/module.yaml +43 -0
- package/modules/accessibility-fundamentals/quick-ref.md +71 -0
- package/modules/accessibility-fundamentals/quiz.md +100 -0
- package/modules/accessibility-fundamentals/resources.md +29 -0
- package/modules/accessibility-fundamentals/walkthrough.md +80 -0
- package/modules/adr-writing/content.md +121 -0
- package/modules/adr-writing/exercises.md +81 -0
- package/modules/adr-writing/module.yaml +41 -0
- package/modules/adr-writing/quick-ref.md +57 -0
- package/modules/adr-writing/quiz.md +73 -0
- package/modules/adr-writing/resources.md +29 -0
- package/modules/adr-writing/walkthrough.md +64 -0
- package/modules/ai-agents/content.md +120 -0
- package/modules/ai-agents/exercises.md +82 -0
- package/modules/ai-agents/module.yaml +42 -0
- package/modules/ai-agents/quick-ref.md +60 -0
- package/modules/ai-agents/quiz.md +103 -0
- package/modules/ai-agents/resources.md +30 -0
- package/modules/ai-agents/walkthrough.md +85 -0
- package/modules/ai-assisted-research/content.md +136 -0
- package/modules/ai-assisted-research/exercises.md +80 -0
- package/modules/ai-assisted-research/module.yaml +42 -0
- package/modules/ai-assisted-research/quick-ref.md +67 -0
- package/modules/ai-assisted-research/quiz.md +73 -0
- package/modules/ai-assisted-research/resources.md +33 -0
- package/modules/ai-assisted-research/walkthrough.md +85 -0
- package/modules/ai-pair-programming/content.md +105 -0
- package/modules/ai-pair-programming/exercises.md +98 -0
- package/modules/ai-pair-programming/module.yaml +39 -0
- package/modules/ai-pair-programming/quick-ref.md +58 -0
- package/modules/ai-pair-programming/quiz.md +73 -0
- package/modules/ai-pair-programming/resources.md +34 -0
- package/modules/ai-pair-programming/walkthrough.md +117 -0
- package/modules/ai-test-generation/content.md +125 -0
- package/modules/ai-test-generation/exercises.md +98 -0
- package/modules/ai-test-generation/module.yaml +39 -0
- package/modules/ai-test-generation/quick-ref.md +65 -0
- package/modules/ai-test-generation/quiz.md +74 -0
- package/modules/ai-test-generation/resources.md +41 -0
- package/modules/ai-test-generation/walkthrough.md +100 -0
- package/modules/api-design/content.md +189 -0
- package/modules/api-design/exercises.md +84 -0
- package/modules/api-design/game.yaml +113 -0
- package/modules/api-design/module.yaml +45 -0
- package/modules/api-design/quick-ref.md +73 -0
- package/modules/api-design/quiz.md +100 -0
- package/modules/api-design/resources.md +55 -0
- package/modules/api-design/walkthrough.md +88 -0
- package/modules/clean-code/content.md +136 -0
- package/modules/clean-code/exercises.md +137 -0
- package/modules/clean-code/game.yaml +172 -0
- package/modules/clean-code/module.yaml +44 -0
- package/modules/clean-code/quick-ref.md +44 -0
- package/modules/clean-code/quiz.md +105 -0
- package/modules/clean-code/resources.md +40 -0
- package/modules/clean-code/walkthrough.md +78 -0
- package/modules/clean-code/workshop.yaml +149 -0
- package/modules/code-review/content.md +130 -0
- package/modules/code-review/exercises.md +95 -0
- package/modules/code-review/game.yaml +83 -0
- package/modules/code-review/module.yaml +42 -0
- package/modules/code-review/quick-ref.md +77 -0
- package/modules/code-review/quiz.md +105 -0
- package/modules/code-review/resources.md +40 -0
- package/modules/code-review/walkthrough.md +106 -0
- package/modules/daily-workflow/content.md +81 -0
- package/modules/daily-workflow/exercises.md +50 -0
- package/modules/daily-workflow/module.yaml +33 -0
- package/modules/daily-workflow/quick-ref.md +37 -0
- package/modules/daily-workflow/quiz.md +65 -0
- package/modules/daily-workflow/resources.md +38 -0
- package/modules/daily-workflow/walkthrough.md +83 -0
- package/modules/debugging-systematically/content.md +139 -0
- package/modules/debugging-systematically/exercises.md +91 -0
- package/modules/debugging-systematically/module.yaml +46 -0
- package/modules/debugging-systematically/quick-ref.md +59 -0
- package/modules/debugging-systematically/quiz.md +105 -0
- package/modules/debugging-systematically/resources.md +42 -0
- package/modules/debugging-systematically/walkthrough.md +84 -0
- package/modules/debugging-systematically/workshop.yaml +127 -0
- package/modules/demo-test/content.md +68 -0
- package/modules/demo-test/exercises.md +28 -0
- package/modules/demo-test/game.yaml +171 -0
- package/modules/demo-test/module.yaml +41 -0
- package/modules/demo-test/quick-ref.md +54 -0
- package/modules/demo-test/quiz.md +74 -0
- package/modules/demo-test/resources.md +21 -0
- package/modules/demo-test/walkthrough.md +122 -0
- package/modules/demo-test/workshop.yaml +31 -0
- package/modules/design-critique/content.md +93 -0
- package/modules/design-critique/exercises.md +71 -0
- package/modules/design-critique/module.yaml +41 -0
- package/modules/design-critique/quick-ref.md +63 -0
- package/modules/design-critique/quiz.md +73 -0
- package/modules/design-critique/resources.md +27 -0
- package/modules/design-critique/walkthrough.md +68 -0
- package/modules/design-patterns/content.md +335 -0
- package/modules/design-patterns/exercises.md +82 -0
- package/modules/design-patterns/game.yaml +55 -0
- package/modules/design-patterns/module.yaml +45 -0
- package/modules/design-patterns/quick-ref.md +44 -0
- package/modules/design-patterns/quiz.md +101 -0
- package/modules/design-patterns/resources.md +40 -0
- package/modules/design-patterns/walkthrough.md +64 -0
- package/modules/exploratory-testing/content.md +133 -0
- package/modules/exploratory-testing/exercises.md +88 -0
- package/modules/exploratory-testing/module.yaml +41 -0
- package/modules/exploratory-testing/quick-ref.md +68 -0
- package/modules/exploratory-testing/quiz.md +75 -0
- package/modules/exploratory-testing/resources.md +39 -0
- package/modules/exploratory-testing/walkthrough.md +87 -0
- package/modules/git/content.md +128 -0
- package/modules/git/exercises.md +53 -0
- package/modules/git/game.yaml +190 -0
- package/modules/git/module.yaml +44 -0
- package/modules/git/quick-ref.md +67 -0
- package/modules/git/quiz.md +89 -0
- package/modules/git/resources.md +49 -0
- package/modules/git/walkthrough.md +92 -0
- package/modules/git/workshop.yaml +145 -0
- package/modules/hiring-interviews/content.md +130 -0
- package/modules/hiring-interviews/exercises.md +88 -0
- package/modules/hiring-interviews/module.yaml +41 -0
- package/modules/hiring-interviews/quick-ref.md +68 -0
- package/modules/hiring-interviews/quiz.md +73 -0
- package/modules/hiring-interviews/resources.md +36 -0
- package/modules/hiring-interviews/walkthrough.md +75 -0
- package/modules/hooks/content.md +97 -0
- package/modules/hooks/exercises.md +69 -0
- package/modules/hooks/module.yaml +39 -0
- package/modules/hooks/quick-ref.md +93 -0
- package/modules/hooks/quiz.md +81 -0
- package/modules/hooks/resources.md +34 -0
- package/modules/hooks/walkthrough.md +105 -0
- package/modules/hooks/workshop.yaml +64 -0
- package/modules/incident-response/content.md +124 -0
- package/modules/incident-response/exercises.md +82 -0
- package/modules/incident-response/game.yaml +132 -0
- package/modules/incident-response/module.yaml +45 -0
- package/modules/incident-response/quick-ref.md +53 -0
- package/modules/incident-response/quiz.md +103 -0
- package/modules/incident-response/resources.md +40 -0
- package/modules/incident-response/walkthrough.md +82 -0
- package/modules/llm-fundamentals/content.md +114 -0
- package/modules/llm-fundamentals/exercises.md +83 -0
- package/modules/llm-fundamentals/module.yaml +42 -0
- package/modules/llm-fundamentals/quick-ref.md +64 -0
- package/modules/llm-fundamentals/quiz.md +103 -0
- package/modules/llm-fundamentals/resources.md +30 -0
- package/modules/llm-fundamentals/walkthrough.md +91 -0
- package/modules/one-on-ones/content.md +133 -0
- package/modules/one-on-ones/exercises.md +81 -0
- package/modules/one-on-ones/module.yaml +44 -0
- package/modules/one-on-ones/quick-ref.md +67 -0
- package/modules/one-on-ones/quiz.md +73 -0
- package/modules/one-on-ones/resources.md +37 -0
- package/modules/one-on-ones/walkthrough.md +69 -0
- package/modules/package.json +9 -0
- package/modules/prioritization-frameworks/content.md +130 -0
- package/modules/prioritization-frameworks/exercises.md +93 -0
- package/modules/prioritization-frameworks/module.yaml +41 -0
- package/modules/prioritization-frameworks/quick-ref.md +77 -0
- package/modules/prioritization-frameworks/quiz.md +73 -0
- package/modules/prioritization-frameworks/resources.md +32 -0
- package/modules/prioritization-frameworks/walkthrough.md +69 -0
- package/modules/prompt-engineering/content.md +123 -0
- package/modules/prompt-engineering/exercises.md +82 -0
- package/modules/prompt-engineering/game.yaml +101 -0
- package/modules/prompt-engineering/module.yaml +45 -0
- package/modules/prompt-engineering/quick-ref.md +65 -0
- package/modules/prompt-engineering/quiz.md +105 -0
- package/modules/prompt-engineering/resources.md +36 -0
- package/modules/prompt-engineering/walkthrough.md +81 -0
- package/modules/rag-fundamentals/content.md +111 -0
- package/modules/rag-fundamentals/exercises.md +80 -0
- package/modules/rag-fundamentals/module.yaml +45 -0
- package/modules/rag-fundamentals/quick-ref.md +58 -0
- package/modules/rag-fundamentals/quiz.md +75 -0
- package/modules/rag-fundamentals/resources.md +34 -0
- package/modules/rag-fundamentals/walkthrough.md +75 -0
- package/modules/react-fundamentals/content.md +140 -0
- package/modules/react-fundamentals/exercises.md +81 -0
- package/modules/react-fundamentals/game.yaml +145 -0
- package/modules/react-fundamentals/module.yaml +45 -0
- package/modules/react-fundamentals/quick-ref.md +62 -0
- package/modules/react-fundamentals/quiz.md +106 -0
- package/modules/react-fundamentals/resources.md +42 -0
- package/modules/react-fundamentals/walkthrough.md +89 -0
- package/modules/react-fundamentals/workshop.yaml +112 -0
- package/modules/react-native-fundamentals/content.md +141 -0
- package/modules/react-native-fundamentals/exercises.md +79 -0
- package/modules/react-native-fundamentals/module.yaml +42 -0
- package/modules/react-native-fundamentals/quick-ref.md +60 -0
- package/modules/react-native-fundamentals/quiz.md +61 -0
- package/modules/react-native-fundamentals/resources.md +24 -0
- package/modules/react-native-fundamentals/walkthrough.md +84 -0
- package/modules/registry.yaml +1650 -0
- package/modules/risk-management/content.md +162 -0
- package/modules/risk-management/exercises.md +86 -0
- package/modules/risk-management/module.yaml +41 -0
- package/modules/risk-management/quick-ref.md +82 -0
- package/modules/risk-management/quiz.md +73 -0
- package/modules/risk-management/resources.md +40 -0
- package/modules/risk-management/walkthrough.md +67 -0
- package/modules/running-effective-standups/content.md +119 -0
- package/modules/running-effective-standups/exercises.md +79 -0
- package/modules/running-effective-standups/module.yaml +40 -0
- package/modules/running-effective-standups/quick-ref.md +61 -0
- package/modules/running-effective-standups/quiz.md +73 -0
- package/modules/running-effective-standups/resources.md +36 -0
- package/modules/running-effective-standups/walkthrough.md +76 -0
- package/modules/solid-principles/content.md +154 -0
- package/modules/solid-principles/exercises.md +107 -0
- package/modules/solid-principles/module.yaml +42 -0
- package/modules/solid-principles/quick-ref.md +50 -0
- package/modules/solid-principles/quiz.md +102 -0
- package/modules/solid-principles/resources.md +39 -0
- package/modules/solid-principles/walkthrough.md +84 -0
- package/modules/sprint-planning/content.md +142 -0
- package/modules/sprint-planning/exercises.md +79 -0
- package/modules/sprint-planning/game.yaml +84 -0
- package/modules/sprint-planning/module.yaml +44 -0
- package/modules/sprint-planning/quick-ref.md +76 -0
- package/modules/sprint-planning/quiz.md +102 -0
- package/modules/sprint-planning/resources.md +39 -0
- package/modules/sprint-planning/walkthrough.md +75 -0
- package/modules/sql-fundamentals/content.md +160 -0
- package/modules/sql-fundamentals/exercises.md +87 -0
- package/modules/sql-fundamentals/game.yaml +105 -0
- package/modules/sql-fundamentals/module.yaml +45 -0
- package/modules/sql-fundamentals/quick-ref.md +53 -0
- package/modules/sql-fundamentals/quiz.md +103 -0
- package/modules/sql-fundamentals/resources.md +42 -0
- package/modules/sql-fundamentals/walkthrough.md +92 -0
- package/modules/sql-fundamentals/workshop.yaml +109 -0
- package/modules/stakeholder-communication/content.md +186 -0
- package/modules/stakeholder-communication/exercises.md +87 -0
- package/modules/stakeholder-communication/module.yaml +38 -0
- package/modules/stakeholder-communication/quick-ref.md +89 -0
- package/modules/stakeholder-communication/quiz.md +73 -0
- package/modules/stakeholder-communication/resources.md +41 -0
- package/modules/stakeholder-communication/walkthrough.md +74 -0
- package/modules/system-design/content.md +149 -0
- package/modules/system-design/exercises.md +83 -0
- package/modules/system-design/game.yaml +95 -0
- package/modules/system-design/module.yaml +46 -0
- package/modules/system-design/quick-ref.md +59 -0
- package/modules/system-design/quiz.md +102 -0
- package/modules/system-design/resources.md +46 -0
- package/modules/system-design/walkthrough.md +90 -0
- package/modules/team-topologies/content.md +166 -0
- package/modules/team-topologies/exercises.md +85 -0
- package/modules/team-topologies/module.yaml +41 -0
- package/modules/team-topologies/quick-ref.md +61 -0
- package/modules/team-topologies/quiz.md +101 -0
- package/modules/team-topologies/resources.md +37 -0
- package/modules/team-topologies/walkthrough.md +76 -0
- package/modules/technical-debt/content.md +111 -0
- package/modules/technical-debt/exercises.md +92 -0
- package/modules/technical-debt/module.yaml +39 -0
- package/modules/technical-debt/quick-ref.md +60 -0
- package/modules/technical-debt/quiz.md +73 -0
- package/modules/technical-debt/resources.md +25 -0
- package/modules/technical-debt/walkthrough.md +94 -0
- package/modules/technical-mentoring/content.md +128 -0
- package/modules/technical-mentoring/exercises.md +84 -0
- package/modules/technical-mentoring/module.yaml +41 -0
- package/modules/technical-mentoring/quick-ref.md +74 -0
- package/modules/technical-mentoring/quiz.md +73 -0
- package/modules/technical-mentoring/resources.md +33 -0
- package/modules/technical-mentoring/walkthrough.md +65 -0
- package/modules/test-strategy/content.md +136 -0
- package/modules/test-strategy/exercises.md +84 -0
- package/modules/test-strategy/game.yaml +99 -0
- package/modules/test-strategy/module.yaml +45 -0
- package/modules/test-strategy/quick-ref.md +66 -0
- package/modules/test-strategy/quiz.md +99 -0
- package/modules/test-strategy/resources.md +60 -0
- package/modules/test-strategy/walkthrough.md +97 -0
- package/modules/test-strategy/workshop.yaml +96 -0
- package/modules/typescript-fundamentals/content.md +127 -0
- package/modules/typescript-fundamentals/exercises.md +79 -0
- package/modules/typescript-fundamentals/game.yaml +111 -0
- package/modules/typescript-fundamentals/module.yaml +45 -0
- package/modules/typescript-fundamentals/quick-ref.md +55 -0
- package/modules/typescript-fundamentals/quiz.md +104 -0
- package/modules/typescript-fundamentals/resources.md +42 -0
- package/modules/typescript-fundamentals/walkthrough.md +71 -0
- package/modules/typescript-fundamentals/workshop.yaml +146 -0
- package/modules/user-story-mapping/content.md +123 -0
- package/modules/user-story-mapping/exercises.md +87 -0
- package/modules/user-story-mapping/module.yaml +41 -0
- package/modules/user-story-mapping/quick-ref.md +64 -0
- package/modules/user-story-mapping/quiz.md +73 -0
- package/modules/user-story-mapping/resources.md +29 -0
- package/modules/user-story-mapping/walkthrough.md +86 -0
- package/modules/writing-prds/content.md +133 -0
- package/modules/writing-prds/exercises.md +93 -0
- package/modules/writing-prds/game.yaml +83 -0
- package/modules/writing-prds/module.yaml +44 -0
- package/modules/writing-prds/quick-ref.md +77 -0
- package/modules/writing-prds/quiz.md +103 -0
- package/modules/writing-prds/resources.md +30 -0
- package/modules/writing-prds/walkthrough.md +87 -0
- package/package.json +2 -2
- package/canvas-dist/assets/_basePickBy-BovdgFIW.js +0 -1
- package/canvas-dist/assets/_basePickBy-BtkHe2u_.js +0 -1
- package/canvas-dist/assets/_basePickBy-C0936578.js +0 -1
- package/canvas-dist/assets/_basePickBy-CE2Qvuh7.js +0 -1
- package/canvas-dist/assets/_basePickBy-DV6sX4CG.js +0 -1
- package/canvas-dist/assets/_basePickBy-DZX6ZNMT.js +0 -1
- package/canvas-dist/assets/_baseUniq-B7dN28TM.js +0 -1
- package/canvas-dist/assets/_baseUniq-Cl23fCdR.js +0 -1
- package/canvas-dist/assets/_baseUniq-CojWFw7B.js +0 -1
- package/canvas-dist/assets/_baseUniq-DA640BJl.js +0 -1
- package/canvas-dist/assets/_baseUniq-Ds-62CCj.js +0 -1
- package/canvas-dist/assets/_baseUniq-KG7SRw9H.js +0 -1
- package/canvas-dist/assets/arc-7E9FFKlC.js +0 -1
- package/canvas-dist/assets/arc-BSMfRZtt.js +0 -1
- package/canvas-dist/assets/arc-C6nT-koR.js +0 -1
- package/canvas-dist/assets/arc-D_fOnjmo.js +0 -1
- package/canvas-dist/assets/arc-Khfvgkr3.js +0 -1
- package/canvas-dist/assets/arc-ieS-i42x.js +0 -1
- package/canvas-dist/assets/architectureDiagram-VXUJARFQ-DF4t6GQD.js +0 -36
- package/canvas-dist/assets/architectureDiagram-VXUJARFQ-DXgSlsio.js +0 -36
- package/canvas-dist/assets/architectureDiagram-VXUJARFQ-DiomxPB4.js +0 -36
- package/canvas-dist/assets/architectureDiagram-VXUJARFQ-DnFaxvXD.js +0 -36
- package/canvas-dist/assets/architectureDiagram-VXUJARFQ-Dt38C0LJ.js +0 -36
- package/canvas-dist/assets/architectureDiagram-VXUJARFQ-egbtMwua.js +0 -36
- package/canvas-dist/assets/blockDiagram-VD42YOAC-CUNKQd-b.js +0 -122
- package/canvas-dist/assets/blockDiagram-VD42YOAC-D-NiLXxd.js +0 -122
- package/canvas-dist/assets/blockDiagram-VD42YOAC-Dx6Dh9gg.js +0 -122
- package/canvas-dist/assets/blockDiagram-VD42YOAC-_r-PmlQy.js +0 -122
- package/canvas-dist/assets/blockDiagram-VD42YOAC-bvYKZLMc.js +0 -122
- package/canvas-dist/assets/blockDiagram-VD42YOAC-l85QT9Ig.js +0 -122
- package/canvas-dist/assets/c4Diagram-YG6GDRKO-BWKCTyQi.js +0 -10
- package/canvas-dist/assets/c4Diagram-YG6GDRKO-CbXs2xzC.js +0 -10
- package/canvas-dist/assets/c4Diagram-YG6GDRKO-CjiS-GNK.js +0 -10
- package/canvas-dist/assets/c4Diagram-YG6GDRKO-D7SnLlHp.js +0 -10
- package/canvas-dist/assets/c4Diagram-YG6GDRKO-RTTCSVf2.js +0 -10
- package/canvas-dist/assets/c4Diagram-YG6GDRKO-yvqJ_AqX.js +0 -10
- package/canvas-dist/assets/channel-CSXq7GP6.js +0 -1
- package/canvas-dist/assets/channel-CvujjGiJ.js +0 -1
- package/canvas-dist/assets/channel-D959Iony.js +0 -1
- package/canvas-dist/assets/channel-DOSwCnrB.js +0 -1
- package/canvas-dist/assets/channel-sw61LzxF.js +0 -1
- package/canvas-dist/assets/channel-vZVnNhOK.js +0 -1
- package/canvas-dist/assets/chunk-4BX2VUAB-BBjuAwXr.js +0 -1
- package/canvas-dist/assets/chunk-4BX2VUAB-BXRNyucU.js +0 -1
- package/canvas-dist/assets/chunk-4BX2VUAB-Bgq5Z77T.js +0 -1
- package/canvas-dist/assets/chunk-4BX2VUAB-BuoMCMCr.js +0 -1
- package/canvas-dist/assets/chunk-4BX2VUAB-COD5n7vg.js +0 -1
- package/canvas-dist/assets/chunk-4BX2VUAB-K8DepKJO.js +0 -1
- package/canvas-dist/assets/chunk-55IACEB6-Bic_bMrQ.js +0 -1
- package/canvas-dist/assets/chunk-55IACEB6-DEy2QUDq.js +0 -1
- package/canvas-dist/assets/chunk-55IACEB6-Dcgbmfzg.js +0 -1
- package/canvas-dist/assets/chunk-55IACEB6-DfmuNm_E.js +0 -1
- package/canvas-dist/assets/chunk-55IACEB6-DlQRcczm.js +0 -1
- package/canvas-dist/assets/chunk-55IACEB6-p2qMY-fm.js +0 -1
- package/canvas-dist/assets/chunk-B4BG7PRW-BpbyxBP2.js +0 -165
- package/canvas-dist/assets/chunk-B4BG7PRW-CCPqvPrP.js +0 -165
- package/canvas-dist/assets/chunk-B4BG7PRW-CEeDPAki.js +0 -165
- package/canvas-dist/assets/chunk-B4BG7PRW-D2UFN_2M.js +0 -165
- package/canvas-dist/assets/chunk-B4BG7PRW-DFI5h6HC.js +0 -165
- package/canvas-dist/assets/chunk-B4BG7PRW-DKOiFGMU.js +0 -165
- package/canvas-dist/assets/chunk-DI55MBZ5-BV6nHjNQ.js +0 -220
- package/canvas-dist/assets/chunk-DI55MBZ5-CEZJmC0E.js +0 -220
- package/canvas-dist/assets/chunk-DI55MBZ5-DOZT99Ek.js +0 -220
- package/canvas-dist/assets/chunk-DI55MBZ5-DmC2LoG2.js +0 -220
- package/canvas-dist/assets/chunk-DI55MBZ5-DpkcJdZP.js +0 -220
- package/canvas-dist/assets/chunk-DI55MBZ5-fVTGx0zh.js +0 -220
- package/canvas-dist/assets/chunk-FMBD7UC4-BOCyQpI7.js +0 -15
- package/canvas-dist/assets/chunk-FMBD7UC4-C76FrRL8.js +0 -15
- package/canvas-dist/assets/chunk-FMBD7UC4-CAq-btWc.js +0 -15
- package/canvas-dist/assets/chunk-FMBD7UC4-CidVsej6.js +0 -15
- package/canvas-dist/assets/chunk-FMBD7UC4-DPpfskdX.js +0 -15
- package/canvas-dist/assets/chunk-FMBD7UC4-DnLtclge.js +0 -15
- package/canvas-dist/assets/chunk-QN33PNHL-BclpCUi8.js +0 -1
- package/canvas-dist/assets/chunk-QN33PNHL-DDUw8IU1.js +0 -1
- package/canvas-dist/assets/chunk-QN33PNHL-DdJFAUXw.js +0 -1
- package/canvas-dist/assets/chunk-QN33PNHL-DjV4jUn9.js +0 -1
- package/canvas-dist/assets/chunk-QN33PNHL-N-HTycqU.js +0 -1
- package/canvas-dist/assets/chunk-QN33PNHL-sd8p21DW.js +0 -1
- package/canvas-dist/assets/chunk-QZHKN3VN-B6mT-JkP.js +0 -1
- package/canvas-dist/assets/chunk-QZHKN3VN-BCo8pc7x.js +0 -1
- package/canvas-dist/assets/chunk-QZHKN3VN-C8IIu6es.js +0 -1
- package/canvas-dist/assets/chunk-QZHKN3VN-D9FF492U.js +0 -1
- package/canvas-dist/assets/chunk-QZHKN3VN-DWMbUjXT.js +0 -1
- package/canvas-dist/assets/chunk-QZHKN3VN-l5FBJ77g.js +0 -1
- package/canvas-dist/assets/chunk-TZMSLE5B-BASt-UWt.js +0 -1
- package/canvas-dist/assets/chunk-TZMSLE5B-BCfaZWLT.js +0 -1
- package/canvas-dist/assets/chunk-TZMSLE5B-BKIk_hBR.js +0 -1
- package/canvas-dist/assets/chunk-TZMSLE5B-C4pt-Ir8.js +0 -1
- package/canvas-dist/assets/chunk-TZMSLE5B-DwGlELvo.js +0 -1
- package/canvas-dist/assets/chunk-TZMSLE5B-jJKG-WvJ.js +0 -1
- package/canvas-dist/assets/classDiagram-2ON5EDUG-B7YQfPU4.js +0 -1
- package/canvas-dist/assets/classDiagram-2ON5EDUG-BZ61MaHY.js +0 -1
- package/canvas-dist/assets/classDiagram-2ON5EDUG-CGseYor2.js +0 -1
- package/canvas-dist/assets/classDiagram-2ON5EDUG-CKzOc99J.js +0 -1
- package/canvas-dist/assets/classDiagram-2ON5EDUG-Ce_LPjwW.js +0 -1
- package/canvas-dist/assets/classDiagram-2ON5EDUG-DorPdibv.js +0 -1
- package/canvas-dist/assets/classDiagram-v2-WZHVMYZB-B7YQfPU4.js +0 -1
- package/canvas-dist/assets/classDiagram-v2-WZHVMYZB-BZ61MaHY.js +0 -1
- package/canvas-dist/assets/classDiagram-v2-WZHVMYZB-CGseYor2.js +0 -1
- package/canvas-dist/assets/classDiagram-v2-WZHVMYZB-CKzOc99J.js +0 -1
- package/canvas-dist/assets/classDiagram-v2-WZHVMYZB-Ce_LPjwW.js +0 -1
- package/canvas-dist/assets/classDiagram-v2-WZHVMYZB-DorPdibv.js +0 -1
- package/canvas-dist/assets/clone-74KSto7H.js +0 -1
- package/canvas-dist/assets/clone-CJQgAYVe.js +0 -1
- package/canvas-dist/assets/clone-DLeTuhHE.js +0 -1
- package/canvas-dist/assets/clone-D_IHK_lQ.js +0 -1
- package/canvas-dist/assets/clone-DxMUv1L9.js +0 -1
- package/canvas-dist/assets/clone-UNKf_nED.js +0 -1
- package/canvas-dist/assets/cose-bilkent-S5V4N54A-BTyQiCkr.js +0 -1
- package/canvas-dist/assets/cose-bilkent-S5V4N54A-BtPAe24N.js +0 -1
- package/canvas-dist/assets/cose-bilkent-S5V4N54A-DIjE7V3m.js +0 -1
- package/canvas-dist/assets/cose-bilkent-S5V4N54A-DKL_BGvE.js +0 -1
- package/canvas-dist/assets/cose-bilkent-S5V4N54A-LZ4OsCLU.js +0 -1
- package/canvas-dist/assets/cose-bilkent-S5V4N54A-XWeJtgga.js +0 -1
- package/canvas-dist/assets/dagre-6UL2VRFP-BJ2vcFwR.js +0 -4
- package/canvas-dist/assets/dagre-6UL2VRFP-C1FlE5s8.js +0 -4
- package/canvas-dist/assets/dagre-6UL2VRFP-C3BWFgl6.js +0 -4
- package/canvas-dist/assets/dagre-6UL2VRFP-CUnx73Rf.js +0 -4
- package/canvas-dist/assets/dagre-6UL2VRFP-Do10BY1y.js +0 -4
- package/canvas-dist/assets/dagre-6UL2VRFP-rOZEkrsg.js +0 -4
- package/canvas-dist/assets/diagram-PSM6KHXK-BGi_qzbq.js +0 -24
- package/canvas-dist/assets/diagram-PSM6KHXK-C3Nv7h_j.js +0 -24
- package/canvas-dist/assets/diagram-PSM6KHXK-CsMy-r0n.js +0 -24
- package/canvas-dist/assets/diagram-PSM6KHXK-Dj8g7kGt.js +0 -24
- package/canvas-dist/assets/diagram-PSM6KHXK-Dxb1w_7r.js +0 -24
- package/canvas-dist/assets/diagram-PSM6KHXK-kVMBkEyV.js +0 -24
- package/canvas-dist/assets/diagram-QEK2KX5R-4bsrr1WZ.js +0 -43
- package/canvas-dist/assets/diagram-QEK2KX5R-Bv7BmKfI.js +0 -43
- package/canvas-dist/assets/diagram-QEK2KX5R-C_FLN6hv.js +0 -43
- package/canvas-dist/assets/diagram-QEK2KX5R-Csuk5L3z.js +0 -43
- package/canvas-dist/assets/diagram-QEK2KX5R-D5Aszgz4.js +0 -43
- package/canvas-dist/assets/diagram-QEK2KX5R-DX58f87l.js +0 -43
- package/canvas-dist/assets/diagram-S2PKOQOG-1Q7hwiSd.js +0 -24
- package/canvas-dist/assets/diagram-S2PKOQOG-Bz9Vxi5V.js +0 -24
- package/canvas-dist/assets/diagram-S2PKOQOG-CdWgZIIc.js +0 -24
- package/canvas-dist/assets/diagram-S2PKOQOG-DBicbKFU.js +0 -24
- package/canvas-dist/assets/diagram-S2PKOQOG-DsXKwPtU.js +0 -24
- package/canvas-dist/assets/diagram-S2PKOQOG-L_SMHLXs.js +0 -24
- package/canvas-dist/assets/erDiagram-Q2GNP2WA-BYu7fh6H.js +0 -60
- package/canvas-dist/assets/erDiagram-Q2GNP2WA-CvnQ69BF.js +0 -60
- package/canvas-dist/assets/erDiagram-Q2GNP2WA-D3xm-Tdm.js +0 -60
- package/canvas-dist/assets/erDiagram-Q2GNP2WA-DIPpD8sj.js +0 -60
- package/canvas-dist/assets/erDiagram-Q2GNP2WA-DNgu6dMd.js +0 -60
- package/canvas-dist/assets/erDiagram-Q2GNP2WA-Decm8aB4.js +0 -60
- package/canvas-dist/assets/flowDiagram-NV44I4VS-2ymk2kw2.js +0 -162
- package/canvas-dist/assets/flowDiagram-NV44I4VS-BEPFOt6U.js +0 -162
- package/canvas-dist/assets/flowDiagram-NV44I4VS-BwqXYGfK.js +0 -162
- package/canvas-dist/assets/flowDiagram-NV44I4VS-CS1jax_z.js +0 -162
- package/canvas-dist/assets/flowDiagram-NV44I4VS-DQz5bf7r.js +0 -162
- package/canvas-dist/assets/flowDiagram-NV44I4VS-KW4T1sqF.js +0 -162
- package/canvas-dist/assets/ganttDiagram-JELNMOA3-B811prZt.js +0 -267
- package/canvas-dist/assets/ganttDiagram-JELNMOA3-C75pWm7X.js +0 -267
- package/canvas-dist/assets/ganttDiagram-JELNMOA3-CWsbo0fn.js +0 -267
- package/canvas-dist/assets/ganttDiagram-JELNMOA3-CbJozPBN.js +0 -267
- package/canvas-dist/assets/ganttDiagram-JELNMOA3-Co0cFt4c.js +0 -267
- package/canvas-dist/assets/ganttDiagram-JELNMOA3-I4PDqrRh.js +0 -267
- package/canvas-dist/assets/gitGraphDiagram-V2S2FVAM-B-z0cLPt.js +0 -65
- package/canvas-dist/assets/gitGraphDiagram-V2S2FVAM-Be40z-LF.js +0 -65
- package/canvas-dist/assets/gitGraphDiagram-V2S2FVAM-BejNaAVm.js +0 -65
- package/canvas-dist/assets/gitGraphDiagram-V2S2FVAM-BqWDYr0X.js +0 -65
- package/canvas-dist/assets/gitGraphDiagram-V2S2FVAM-DSvWGY-e.js +0 -65
- package/canvas-dist/assets/gitGraphDiagram-V2S2FVAM-HLYbyNJ5.js +0 -65
- package/canvas-dist/assets/graph-BE8KKsdf.js +0 -1
- package/canvas-dist/assets/graph-D6DzzszU.js +0 -1
- package/canvas-dist/assets/graph-DFR8Y_8s.js +0 -1
- package/canvas-dist/assets/graph-Da385cDY.js +0 -1
- package/canvas-dist/assets/graph-MU7gZz2B.js +0 -1
- package/canvas-dist/assets/graph-wjSBJwnf.js +0 -1
- package/canvas-dist/assets/index--ztw-8Rw.js +0 -647
- package/canvas-dist/assets/index-5TpIM6B1.js +0 -11
- package/canvas-dist/assets/index-BSswTuBk.js +0 -11
- package/canvas-dist/assets/index-BVvhMmjs.js +0 -11
- package/canvas-dist/assets/index-BY92Mj5g.js +0 -572
- package/canvas-dist/assets/index-CV7palC3.js +0 -572
- package/canvas-dist/assets/index-D9bmQGsB.js +0 -11
- package/canvas-dist/assets/index-DDIKkGv8.js +0 -592
- package/canvas-dist/assets/index-Dyo0NkPb.js +0 -574
- package/canvas-dist/assets/index-iQWajCow.js +0 -572
- package/canvas-dist/assets/index-m68YlAMU.js +0 -11
- package/canvas-dist/assets/index-mEoP57az.js +0 -11
- package/canvas-dist/assets/infoDiagram-HS3SLOUP--9BirqgJ.js +0 -2
- package/canvas-dist/assets/infoDiagram-HS3SLOUP-CSJVED2y.js +0 -2
- package/canvas-dist/assets/infoDiagram-HS3SLOUP-D68HIb2t.js +0 -2
- package/canvas-dist/assets/infoDiagram-HS3SLOUP-DK2VLGGz.js +0 -2
- package/canvas-dist/assets/infoDiagram-HS3SLOUP-PaFhn4yD.js +0 -2
- package/canvas-dist/assets/infoDiagram-HS3SLOUP-zLNG47sU.js +0 -2
- package/canvas-dist/assets/journeyDiagram-XKPGCS4Q-Bue2dR2X.js +0 -139
- package/canvas-dist/assets/journeyDiagram-XKPGCS4Q-CrgZfpdU.js +0 -139
- package/canvas-dist/assets/journeyDiagram-XKPGCS4Q-DUxWmkkC.js +0 -139
- package/canvas-dist/assets/journeyDiagram-XKPGCS4Q-OTFkv4pd.js +0 -139
- package/canvas-dist/assets/journeyDiagram-XKPGCS4Q-eK2_Zuu3.js +0 -139
- package/canvas-dist/assets/journeyDiagram-XKPGCS4Q-uds5Tz8D.js +0 -139
- package/canvas-dist/assets/kanban-definition-3W4ZIXB7-BETdiI7I.js +0 -89
- package/canvas-dist/assets/kanban-definition-3W4ZIXB7-BdVh7KdN.js +0 -89
- package/canvas-dist/assets/kanban-definition-3W4ZIXB7-Cxl8UM9S.js +0 -89
- package/canvas-dist/assets/kanban-definition-3W4ZIXB7-DVPlx3I2.js +0 -89
- package/canvas-dist/assets/kanban-definition-3W4ZIXB7-LtNWeoYB.js +0 -89
- package/canvas-dist/assets/kanban-definition-3W4ZIXB7-uvhEMvyE.js +0 -89
- package/canvas-dist/assets/layout-1OzszN14.js +0 -1
- package/canvas-dist/assets/layout-CJSupFcF.js +0 -1
- package/canvas-dist/assets/layout-DFRmxN_c.js +0 -1
- package/canvas-dist/assets/layout-DSu-zk7y.js +0 -1
- package/canvas-dist/assets/layout-TGcrvApd.js +0 -1
- package/canvas-dist/assets/layout-eStc8SYK.js +0 -1
- package/canvas-dist/assets/linear-9qlE6xa7.js +0 -1
- package/canvas-dist/assets/linear-CBfFWnLD.js +0 -1
- package/canvas-dist/assets/linear-Cv4ai8Hq.js +0 -1
- package/canvas-dist/assets/linear-DDzz65E6.js +0 -1
- package/canvas-dist/assets/linear-wbIqhwDf.js +0 -1
- package/canvas-dist/assets/linear-wyNKl76F.js +0 -1
- package/canvas-dist/assets/mindmap-definition-VGOIOE7T-3l4YzhEM.js +0 -68
- package/canvas-dist/assets/mindmap-definition-VGOIOE7T-B-KkpNlw.js +0 -68
- package/canvas-dist/assets/mindmap-definition-VGOIOE7T-DHMHWgmT.js +0 -68
- package/canvas-dist/assets/mindmap-definition-VGOIOE7T-Dqfyg4Z2.js +0 -68
- package/canvas-dist/assets/mindmap-definition-VGOIOE7T-NeRYOzsq.js +0 -68
- package/canvas-dist/assets/mindmap-definition-VGOIOE7T-xyu628P9.js +0 -68
- package/canvas-dist/assets/pieDiagram-ADFJNKIX-BWNzVAGj.js +0 -30
- package/canvas-dist/assets/pieDiagram-ADFJNKIX-Bm3PXYs-.js +0 -30
- package/canvas-dist/assets/pieDiagram-ADFJNKIX-BvvN7VvQ.js +0 -30
- package/canvas-dist/assets/pieDiagram-ADFJNKIX-BwU7AN7W.js +0 -30
- package/canvas-dist/assets/pieDiagram-ADFJNKIX-CHgwWCaM.js +0 -30
- package/canvas-dist/assets/pieDiagram-ADFJNKIX-DlZc8YOh.js +0 -30
- package/canvas-dist/assets/quadrantDiagram-AYHSOK5B-B-Zd8OFp.js +0 -7
- package/canvas-dist/assets/quadrantDiagram-AYHSOK5B-B1CnJyxI.js +0 -7
- package/canvas-dist/assets/quadrantDiagram-AYHSOK5B-C0Qo00b9.js +0 -7
- package/canvas-dist/assets/quadrantDiagram-AYHSOK5B-C9bx3nEJ.js +0 -7
- package/canvas-dist/assets/quadrantDiagram-AYHSOK5B-UHENkiRO.js +0 -7
- package/canvas-dist/assets/quadrantDiagram-AYHSOK5B-jKfurTPU.js +0 -7
- package/canvas-dist/assets/requirementDiagram-UZGBJVZJ-BPpNNusD.js +0 -64
- package/canvas-dist/assets/requirementDiagram-UZGBJVZJ-BwZF1NIK.js +0 -64
- package/canvas-dist/assets/requirementDiagram-UZGBJVZJ-CaT3Frtk.js +0 -64
- package/canvas-dist/assets/requirementDiagram-UZGBJVZJ-Dfoz7R_7.js +0 -64
- package/canvas-dist/assets/requirementDiagram-UZGBJVZJ-DsrX4TT-.js +0 -64
- package/canvas-dist/assets/requirementDiagram-UZGBJVZJ-dmouSXOl.js +0 -64
- package/canvas-dist/assets/sankeyDiagram-TZEHDZUN-BEy-A1Fu.js +0 -10
- package/canvas-dist/assets/sankeyDiagram-TZEHDZUN-BViMBiAQ.js +0 -10
- package/canvas-dist/assets/sankeyDiagram-TZEHDZUN-BqrM-qWN.js +0 -10
- package/canvas-dist/assets/sankeyDiagram-TZEHDZUN-DRkRC9qB.js +0 -10
- package/canvas-dist/assets/sankeyDiagram-TZEHDZUN-DbuzKCtn.js +0 -10
- package/canvas-dist/assets/sankeyDiagram-TZEHDZUN-_aHMKbpw.js +0 -10
- package/canvas-dist/assets/sequenceDiagram-WL72ISMW-B8FOaL2Q.js +0 -145
- package/canvas-dist/assets/sequenceDiagram-WL72ISMW-C02NQwOB.js +0 -145
- package/canvas-dist/assets/sequenceDiagram-WL72ISMW-CgyHivPj.js +0 -145
- package/canvas-dist/assets/sequenceDiagram-WL72ISMW-CzW1WaEm.js +0 -145
- package/canvas-dist/assets/sequenceDiagram-WL72ISMW-DJhHI1pe.js +0 -145
- package/canvas-dist/assets/sequenceDiagram-WL72ISMW-VFkpAeoG.js +0 -145
- package/canvas-dist/assets/stateDiagram-FKZM4ZOC-BSqFX4PJ.js +0 -1
- package/canvas-dist/assets/stateDiagram-FKZM4ZOC-BnXhhxkN.js +0 -1
- package/canvas-dist/assets/stateDiagram-FKZM4ZOC-ClARVrvt.js +0 -1
- package/canvas-dist/assets/stateDiagram-FKZM4ZOC-CuC6xesY.js +0 -1
- package/canvas-dist/assets/stateDiagram-FKZM4ZOC-DcAiGjph.js +0 -1
- package/canvas-dist/assets/stateDiagram-FKZM4ZOC-aBg0hjTp.js +0 -1
- package/canvas-dist/assets/stateDiagram-v2-4FDKWEC3-8fib9ftc.js +0 -1
- package/canvas-dist/assets/stateDiagram-v2-4FDKWEC3-B-DO0ZqO.js +0 -1
- package/canvas-dist/assets/stateDiagram-v2-4FDKWEC3-BksbsE4k.js +0 -1
- package/canvas-dist/assets/stateDiagram-v2-4FDKWEC3-C2DJCNPK.js +0 -1
- package/canvas-dist/assets/stateDiagram-v2-4FDKWEC3-CeA5jba6.js +0 -1
- package/canvas-dist/assets/stateDiagram-v2-4FDKWEC3-zsAyq0tK.js +0 -1
- package/canvas-dist/assets/timeline-definition-IT6M3QCI-BaHdYD2h.js +0 -61
- package/canvas-dist/assets/timeline-definition-IT6M3QCI-Bl2hg8IM.js +0 -61
- package/canvas-dist/assets/timeline-definition-IT6M3QCI-CrVwLiGm.js +0 -61
- package/canvas-dist/assets/timeline-definition-IT6M3QCI-DrXGRjnB.js +0 -61
- package/canvas-dist/assets/timeline-definition-IT6M3QCI-cYAwshf6.js +0 -61
- package/canvas-dist/assets/timeline-definition-IT6M3QCI-flyL0y-3.js +0 -61
- package/canvas-dist/assets/treemap-GDKQZRPO-C4Hg8kJ_.js +0 -162
- package/canvas-dist/assets/treemap-GDKQZRPO-DVY2G9qY.js +0 -162
- package/canvas-dist/assets/treemap-GDKQZRPO-DpLWPA1z.js +0 -162
- package/canvas-dist/assets/treemap-GDKQZRPO-Ds86cUVw.js +0 -162
- package/canvas-dist/assets/treemap-GDKQZRPO-DwmoI6tH.js +0 -162
- package/canvas-dist/assets/treemap-GDKQZRPO-SsGFkgVd.js +0 -162
- package/canvas-dist/assets/xychartDiagram-PRI3JC2R-B9c1iLBf.js +0 -7
- package/canvas-dist/assets/xychartDiagram-PRI3JC2R-BpX6MPWa.js +0 -7
- package/canvas-dist/assets/xychartDiagram-PRI3JC2R-CEgW_j0p.js +0 -7
- package/canvas-dist/assets/xychartDiagram-PRI3JC2R-CSEFGEQX.js +0 -7
- package/canvas-dist/assets/xychartDiagram-PRI3JC2R-CnG4XoMc.js +0 -7
- package/canvas-dist/assets/xychartDiagram-PRI3JC2R-Dftj3Bt3.js +0 -7
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
games:
|
|
2
|
+
- type: speed-round
|
|
3
|
+
title: "HTTP Method Sprint"
|
|
4
|
+
rounds:
|
|
5
|
+
- question: "Create a new user account. Which HTTP method and status code?"
|
|
6
|
+
options:
|
|
7
|
+
- "GET 200"
|
|
8
|
+
- "POST 201"
|
|
9
|
+
- "PUT 200"
|
|
10
|
+
- "PATCH 201"
|
|
11
|
+
answer: 1
|
|
12
|
+
timeLimit: 14
|
|
13
|
+
- question: "Delete a resource. Which method and status?"
|
|
14
|
+
options:
|
|
15
|
+
- "DELETE 200"
|
|
16
|
+
- "DELETE 204"
|
|
17
|
+
- "POST 200"
|
|
18
|
+
- "GET 204"
|
|
19
|
+
answer: 1
|
|
20
|
+
timeLimit: 14
|
|
21
|
+
- question: "Fetch a single user by ID (read-only). Which method?"
|
|
22
|
+
options:
|
|
23
|
+
- "POST 200"
|
|
24
|
+
- "GET 200"
|
|
25
|
+
- "PUT 200"
|
|
26
|
+
- "PATCH 200"
|
|
27
|
+
answer: 1
|
|
28
|
+
timeLimit: 12
|
|
29
|
+
- question: "Update an existing resource (partial update). Which method?"
|
|
30
|
+
options:
|
|
31
|
+
- "PUT 200"
|
|
32
|
+
- "PATCH 200"
|
|
33
|
+
- "POST 200"
|
|
34
|
+
- "GET 200"
|
|
35
|
+
answer: 1
|
|
36
|
+
timeLimit: 14
|
|
37
|
+
- question: "Resource not found. Which status code?"
|
|
38
|
+
options:
|
|
39
|
+
- "400 Bad Request"
|
|
40
|
+
- "404 Not Found"
|
|
41
|
+
- "500 Internal Server Error"
|
|
42
|
+
- "204 No Content"
|
|
43
|
+
answer: 1
|
|
44
|
+
timeLimit: 14
|
|
45
|
+
- question: "Replace an existing resource entirely (full update). Which method?"
|
|
46
|
+
options:
|
|
47
|
+
- "PATCH 200"
|
|
48
|
+
- "PUT 200"
|
|
49
|
+
- "POST 200"
|
|
50
|
+
- "GET 200"
|
|
51
|
+
answer: 1
|
|
52
|
+
timeLimit: 14
|
|
53
|
+
- question: "List all items in a collection. Which method and status?"
|
|
54
|
+
options:
|
|
55
|
+
- "GET 200"
|
|
56
|
+
- "POST 201"
|
|
57
|
+
- "GET 201"
|
|
58
|
+
- "PUT 200"
|
|
59
|
+
answer: 0
|
|
60
|
+
timeLimit: 12
|
|
61
|
+
- question: "Invalid request body (e.g. missing required field). Which status?"
|
|
62
|
+
options:
|
|
63
|
+
- "404 Not Found"
|
|
64
|
+
- "400 Bad Request"
|
|
65
|
+
- "422 Unprocessable Entity"
|
|
66
|
+
- "500 Internal Server Error"
|
|
67
|
+
answer: 1
|
|
68
|
+
timeLimit: 15
|
|
69
|
+
- question: "Request succeeded, no response body to return. Which status?"
|
|
70
|
+
options:
|
|
71
|
+
- "200 OK"
|
|
72
|
+
- "204 No Content"
|
|
73
|
+
- "202 Accepted"
|
|
74
|
+
- "201 Created"
|
|
75
|
+
answer: 1
|
|
76
|
+
timeLimit: 14
|
|
77
|
+
- question: "Request accepted for async processing. Which status?"
|
|
78
|
+
options:
|
|
79
|
+
- "200 OK"
|
|
80
|
+
- "201 Created"
|
|
81
|
+
- "202 Accepted"
|
|
82
|
+
- "204 No Content"
|
|
83
|
+
answer: 2
|
|
84
|
+
timeLimit: 14
|
|
85
|
+
|
|
86
|
+
- type: classify
|
|
87
|
+
title: "API Pattern Classifier"
|
|
88
|
+
categories:
|
|
89
|
+
- name: "REST"
|
|
90
|
+
color: "#58a6ff"
|
|
91
|
+
- name: "GraphQL"
|
|
92
|
+
color: "#a371f7"
|
|
93
|
+
- name: "RPC"
|
|
94
|
+
color: "#d29922"
|
|
95
|
+
items:
|
|
96
|
+
- text: "GET /users/123, POST /orders, DELETE /products/456 — resources and HTTP verbs."
|
|
97
|
+
category: "REST"
|
|
98
|
+
- text: "Single endpoint, client sends { query: '{ users { id name } }' } — flexible field selection."
|
|
99
|
+
category: "GraphQL"
|
|
100
|
+
- text: "POST /rpc/CreateUser with { name, email } — procedure-oriented, not resource-oriented."
|
|
101
|
+
category: "RPC"
|
|
102
|
+
- text: "GET /api/v1/orders?status=shipped — standard HTTP, URI as resource identifier."
|
|
103
|
+
category: "REST"
|
|
104
|
+
- text: "Client specifies exactly which fields to fetch; no over- or under-fetching."
|
|
105
|
+
category: "GraphQL"
|
|
106
|
+
- text: "gRPC, protobuf, methods like GetUser, CreateOrder — strong typing, often binary."
|
|
107
|
+
category: "RPC"
|
|
108
|
+
- text: "HATEOAS — links in response point to related resources and actions."
|
|
109
|
+
category: "REST"
|
|
110
|
+
- text: "Mutations and queries; schema defines types and resolvers; introspection supported."
|
|
111
|
+
category: "GraphQL"
|
|
112
|
+
- text: "JSON-RPC: { jsonrpc: '2.0', method: 'subtract', params: [5, 3] }."
|
|
113
|
+
category: "RPC"
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
slug: api-design
|
|
2
|
+
title: "API Design -- REST, GraphQL, and Contract-First Thinking"
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
description: "Design production-ready APIs with REST, GraphQL, and contract-first practices."
|
|
5
|
+
category: architecture
|
|
6
|
+
tags: [api, rest, graphql, api-design, contracts, openapi]
|
|
7
|
+
difficulty: intermediate
|
|
8
|
+
|
|
9
|
+
xp:
|
|
10
|
+
read: 15
|
|
11
|
+
walkthrough: 40
|
|
12
|
+
exercise: 25
|
|
13
|
+
quiz: 20
|
|
14
|
+
quiz-perfect-bonus: 10
|
|
15
|
+
game: 25
|
|
16
|
+
game-perfect-bonus: 10
|
|
17
|
+
|
|
18
|
+
time:
|
|
19
|
+
quick: 5
|
|
20
|
+
read: 20
|
|
21
|
+
guided: 50
|
|
22
|
+
|
|
23
|
+
prerequisites: []
|
|
24
|
+
related: [system-design, solid-principles]
|
|
25
|
+
|
|
26
|
+
triggers:
|
|
27
|
+
- "How do I design a good REST API?"
|
|
28
|
+
- "REST vs GraphQL — when to use which?"
|
|
29
|
+
- "What is contract-first API design?"
|
|
30
|
+
- "How do I version an API?"
|
|
31
|
+
|
|
32
|
+
visuals:
|
|
33
|
+
diagrams: [diagram-mermaid, diagram-architecture]
|
|
34
|
+
quiz-types: [quiz-matching, quiz-fill-blank]
|
|
35
|
+
game-types: [speed-round, classify]
|
|
36
|
+
playground: bash
|
|
37
|
+
slides: true
|
|
38
|
+
|
|
39
|
+
sources:
|
|
40
|
+
- url: "https://github.com/microsoft/api-guidelines"
|
|
41
|
+
label: "Microsoft REST API Guidelines"
|
|
42
|
+
type: docs
|
|
43
|
+
- url: "https://cloud.google.com/apis/design"
|
|
44
|
+
label: "Google API Design Guide"
|
|
45
|
+
type: docs
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# API Design Quick Reference
|
|
2
|
+
|
|
3
|
+
## REST
|
|
4
|
+
|
|
5
|
+
| Verb | Action | Example |
|
|
6
|
+
|------|--------|---------|
|
|
7
|
+
| GET | Read | GET /users/42 |
|
|
8
|
+
| POST | Create | POST /users |
|
|
9
|
+
| PUT | Replace | PUT /users/42 |
|
|
10
|
+
| PATCH | Partial update | PATCH /users/42 |
|
|
11
|
+
| DELETE | Remove | DELETE /users/42 |
|
|
12
|
+
|
|
13
|
+
**Conventions:** Plural nouns, hierarchy in URL, consistent casing
|
|
14
|
+
|
|
15
|
+
## REST vs GraphQL
|
|
16
|
+
|
|
17
|
+
| REST | GraphQL |
|
|
18
|
+
|------|---------|
|
|
19
|
+
| Many endpoints | Single endpoint |
|
|
20
|
+
| Fixed responses | Client-specified fields |
|
|
21
|
+
| HTTP cache | Custom cache |
|
|
22
|
+
| Simpler | More flexible |
|
|
23
|
+
|
|
24
|
+
## Status Codes
|
|
25
|
+
|
|
26
|
+
| Code | Meaning |
|
|
27
|
+
|------|---------|
|
|
28
|
+
| 200 | OK |
|
|
29
|
+
| 201 | Created |
|
|
30
|
+
| 400 | Bad Request |
|
|
31
|
+
| 401 | Unauthorized |
|
|
32
|
+
| 403 | Forbidden |
|
|
33
|
+
| 404 | Not Found |
|
|
34
|
+
| 429 | Too Many Requests |
|
|
35
|
+
| 500 | Server Error |
|
|
36
|
+
|
|
37
|
+
## Versioning
|
|
38
|
+
|
|
39
|
+
- **URL:** `/v1/users` — clear, cacheable
|
|
40
|
+
- **Header:** `Accept: application/vnd.api+json;version=2`
|
|
41
|
+
|
|
42
|
+
## Pagination
|
|
43
|
+
|
|
44
|
+
- **Offset:** `?offset=20&limit=10` — simple, can drift
|
|
45
|
+
- **Cursor:** `?cursor=abc&limit=10` — stable for feeds
|
|
46
|
+
|
|
47
|
+
## Auth
|
|
48
|
+
|
|
49
|
+
| Method | Use |
|
|
50
|
+
|--------|-----|
|
|
51
|
+
| API Key | Server-to-server |
|
|
52
|
+
| OAuth 2.0 | Delegated user access |
|
|
53
|
+
| JWT | Stateless, `Authorization: Bearer <token>` |
|
|
54
|
+
|
|
55
|
+
## Error Body
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{
|
|
59
|
+
"error": {
|
|
60
|
+
"code": "VALIDATION_ERROR",
|
|
61
|
+
"message": "...",
|
|
62
|
+
"details": []
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Rate Limit Headers
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
X-RateLimit-Limit: 1000
|
|
71
|
+
X-RateLimit-Remaining: 42
|
|
72
|
+
Retry-After: 60
|
|
73
|
+
```
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# API Design Quiz
|
|
2
|
+
|
|
3
|
+
## Question 1
|
|
4
|
+
|
|
5
|
+
In REST, which HTTP method should be used to create a new resource?
|
|
6
|
+
|
|
7
|
+
A) GET
|
|
8
|
+
B) PUT
|
|
9
|
+
C) POST
|
|
10
|
+
D) PATCH
|
|
11
|
+
|
|
12
|
+
<!-- ANSWER: C -->
|
|
13
|
+
<!-- EXPLANATION: POST is used to create a new resource. The client sends the representation in the body; the server assigns the ID and returns 201 Created. PUT typically replaces a resource at a known URL. -->
|
|
14
|
+
|
|
15
|
+
## Question 2
|
|
16
|
+
|
|
17
|
+
When is GraphQL typically preferred over REST?
|
|
18
|
+
|
|
19
|
+
A) When you need simple CRUD operations
|
|
20
|
+
B) When clients have varying data needs and want to avoid over-fetching
|
|
21
|
+
C) When HTTP caching is the top priority
|
|
22
|
+
D) When you have no frontend team
|
|
23
|
+
|
|
24
|
+
<!-- ANSWER: B -->
|
|
25
|
+
<!-- EXPLANATION: GraphQL lets clients request exactly the fields they need. Mobile apps and varied clients benefit from avoiding over-fetching and under-fetching. REST is often simpler for straightforward CRUD. -->
|
|
26
|
+
|
|
27
|
+
## Question 3
|
|
28
|
+
|
|
29
|
+
Contract-first API design means:
|
|
30
|
+
|
|
31
|
+
A) Writing the API specification before implementing the backend
|
|
32
|
+
B) Signing a legal contract before building
|
|
33
|
+
C) Designing for backward compatibility only
|
|
34
|
+
D) Using REST exclusively
|
|
35
|
+
|
|
36
|
+
<!-- ANSWER: A -->
|
|
37
|
+
<!-- EXPLANATION: Contract-first means defining the API (e.g., OpenAPI spec or GraphQL schema) before writing server code. This enables client generation, mocks, and parallel work. -->
|
|
38
|
+
|
|
39
|
+
## Question 4
|
|
40
|
+
|
|
41
|
+
For paginating a feed of posts that changes frequently, which strategy is best?
|
|
42
|
+
|
|
43
|
+
A) Offset-based (?page=5)
|
|
44
|
+
B) Cursor-based (?cursor=abc123)
|
|
45
|
+
C) No pagination
|
|
46
|
+
D) Random access by ID
|
|
47
|
+
|
|
48
|
+
<!-- ANSWER: B -->
|
|
49
|
+
<!-- EXPLANATION: Cursor-based pagination is stable when data is inserted or deleted. Offset-based can produce duplicates or skipped items. For feeds and infinite scroll, cursor is preferred. -->
|
|
50
|
+
|
|
51
|
+
## Question 5
|
|
52
|
+
|
|
53
|
+
What does a 429 status code mean?
|
|
54
|
+
|
|
55
|
+
A) Server error
|
|
56
|
+
B) Not found
|
|
57
|
+
C) Too many requests (rate limited)
|
|
58
|
+
D) Unauthorized
|
|
59
|
+
|
|
60
|
+
<!-- ANSWER: C -->
|
|
61
|
+
<!-- EXPLANATION: 429 Too Many Requests indicates the client has exceeded the rate limit. The response should include Retry-After to indicate when to retry. -->
|
|
62
|
+
|
|
63
|
+
## Question 6
|
|
64
|
+
|
|
65
|
+
Which authentication method is best for delegated user access (e.g., "this app can read my data")?
|
|
66
|
+
|
|
67
|
+
A) API key in the query string
|
|
68
|
+
B) OAuth 2.0
|
|
69
|
+
C) Basic auth
|
|
70
|
+
D) No authentication
|
|
71
|
+
|
|
72
|
+
<!-- ANSWER: B -->
|
|
73
|
+
<!-- EXPLANATION: OAuth 2.0 is designed for delegated access: the user authorizes an app to act on their behalf. API keys are better for server-to-server. Basic auth sends credentials with every request and is less suitable for third-party apps. -->
|
|
74
|
+
|
|
75
|
+
## Question 7
|
|
76
|
+
|
|
77
|
+
<!-- VISUAL: matching -->
|
|
78
|
+
|
|
79
|
+
Match each HTTP method to its typical REST operation:
|
|
80
|
+
|
|
81
|
+
A) GET → 1) Create a new resource
|
|
82
|
+
B) POST → 2) Replace a resource at a known URL
|
|
83
|
+
C) PUT → 3) Retrieve a resource
|
|
84
|
+
D) DELETE → 4) Remove a resource
|
|
85
|
+
|
|
86
|
+
<!-- ANSWER: A3,B1,C2,D4 -->
|
|
87
|
+
<!-- EXPLANATION: GET retrieves (3). POST creates (1). PUT replaces at a known URL (2). DELETE removes (4). -->
|
|
88
|
+
|
|
89
|
+
## Question 8
|
|
90
|
+
|
|
91
|
+
<!-- VISUAL: fill-blank -->
|
|
92
|
+
|
|
93
|
+
Complete the RESTful endpoint URL pattern for a nested resource (orders belonging to a user):
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
/users/___0___/orders
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
<!-- ANSWER: :id -->
|
|
100
|
+
<!-- EXPLANATION: REST uses path segments for resource IDs. Common patterns are :id, {id}, or :userId. The placeholder represents the user identifier in the URL. -->
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# API Design — Resources
|
|
2
|
+
|
|
3
|
+
## Official Guidelines
|
|
4
|
+
|
|
5
|
+
- [Microsoft REST API Guidelines](https://github.com/microsoft/api-guidelines) — REST best practices from Microsoft.
|
|
6
|
+
- [Google API Design Guide](https://cloud.google.com/apis/design) — Google's API design principles.
|
|
7
|
+
- [GraphQL Specification](https://spec.graphql.org/) — Official GraphQL spec.
|
|
8
|
+
|
|
9
|
+
## REST and HTTP
|
|
10
|
+
|
|
11
|
+
- [REST API Tutorial](https://restfulapi.net/) — REST concepts and examples.
|
|
12
|
+
- [HTTP Status Codes](https://httpstatuses.com/) — Quick reference for status codes.
|
|
13
|
+
- [RFC 7807 — Problem Details](https://tools.ietf.org/html/rfc7807) — Standard error format.
|
|
14
|
+
|
|
15
|
+
## GraphQL
|
|
16
|
+
|
|
17
|
+
- [GraphQL.org](https://graphql.org/) — Official docs and learning resources.
|
|
18
|
+
- [How to GraphQL](https://www.howtographql.com/) — Full-stack GraphQL tutorial.
|
|
19
|
+
- [Apollo GraphQL](https://www.apollographql.com/docs/) — Client and server tooling.
|
|
20
|
+
|
|
21
|
+
## Contract-First and OpenAPI
|
|
22
|
+
|
|
23
|
+
- [OpenAPI Specification](https://swagger.io/specification/) — OpenAPI 3.0 reference.
|
|
24
|
+
- [Stoplight](https://stoplight.io/) — API design and documentation tools.
|
|
25
|
+
- [Postman](https://www.postman.com/) — API testing and documentation.
|
|
26
|
+
|
|
27
|
+
## Articles and Books
|
|
28
|
+
|
|
29
|
+
- [Martin Fowler — Richardson Maturity Model](https://martinfowler.com/articles/richardsonMaturityModel.html) — REST maturity levels.
|
|
30
|
+
- [InfoQ — REST vs GraphQL](https://www.infoq.com/articles/rest-graphql/) — Comparison articles.
|
|
31
|
+
- **RESTful Web APIs** by Leonard Richardson — REST design in depth.
|
|
32
|
+
- **Designing Web APIs** by Brenda Jin — API design patterns.
|
|
33
|
+
|
|
34
|
+
## Videos
|
|
35
|
+
|
|
36
|
+
- [REST API Design — Java Brains](https://www.youtube.com/watch?v=QpQxRd1Y2xY) — REST design principles.
|
|
37
|
+
- [GraphQL in 5 Minutes](https://www.youtube.com/watch?v=ZQL7tL2S0oQ) — Quick GraphQL intro.
|
|
38
|
+
- [API Design — Google I/O](https://www.youtube.com/results?search_query=google+io+api+design) — Conference talks.
|
|
39
|
+
|
|
40
|
+
## Podcasts
|
|
41
|
+
|
|
42
|
+
- [APIs You Won't Hate](https://apisyouwonthate.com/podcast/) — Phil Sturgeon. API design, versioning, and developer experience.
|
|
43
|
+
- [Software Engineering Daily — API Design](https://softwareengineeringdaily.com/?s=api+design) — Technical episodes on REST, GraphQL, and gRPC decisions.
|
|
44
|
+
- [Changelog — API Economy](https://changelog.com/podcast) — Episodes on public API design and developer relations.
|
|
45
|
+
|
|
46
|
+
## Interactive and Visual
|
|
47
|
+
|
|
48
|
+
- [Swagger Editor](https://editor.swagger.io/) — Write and visualize OpenAPI specs in the browser with live preview.
|
|
49
|
+
- [Hoppscotch](https://hoppscotch.io/) — Open-source API testing tool — explore REST, GraphQL, and WebSocket APIs interactively.
|
|
50
|
+
- [GraphQL Playground (Apollo)](https://www.apollographql.com/docs/graphos/explorer/) — Interactive GraphQL IDE for exploring schemas and running queries.
|
|
51
|
+
|
|
52
|
+
## Courses
|
|
53
|
+
|
|
54
|
+
- [Designing RESTful APIs (Udacity — free)](https://www.udacity.com/course/designing-restful-apis--ud388) — Short free course on REST principles and Flask implementation.
|
|
55
|
+
- [How to GraphQL (free)](https://www.howtographql.com/) — Full-stack GraphQL tutorial covering fundamentals and frontend/backend tracks.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# API Design Walkthrough — Learn by Doing
|
|
2
|
+
|
|
3
|
+
## Before We Begin
|
|
4
|
+
|
|
5
|
+
REST APIs expose resources (nouns) via URLs and HTTP methods (verbs). Good design makes the API predictable and self-describing—clients can guess the shape of `GET /users/42` without reading docs.
|
|
6
|
+
|
|
7
|
+
**Diagnostic question:** When you've consumed or built an API, what made it easy or frustrating to use? Was it URLs, documentation, error messages, or something else?
|
|
8
|
+
|
|
9
|
+
**Checkpoint:** You can name at least one REST resource (e.g., users, orders) and one HTTP method beyond GET.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Step 1: Model Resources
|
|
14
|
+
|
|
15
|
+
<!-- hint:diagram mermaid-type="flowchart" topic="REST resource and HTTP method mapping" -->
|
|
16
|
+
<!-- hint:code language="text" highlight="1,2" -->
|
|
17
|
+
|
|
18
|
+
**Task:** You're building an API for a task manager. List 3–4 main resources (nouns). For each, write the URL pattern and which HTTP methods apply (GET, POST, PUT, PATCH, DELETE).
|
|
19
|
+
|
|
20
|
+
**Question:** Why use `PATCH` instead of `PUT` for partial updates? When would you use `PUT`?
|
|
21
|
+
|
|
22
|
+
**Checkpoint:** You have a clear resource model and URL structure.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Step 2: Design a REST Endpoint
|
|
27
|
+
|
|
28
|
+
<!-- hint:code language="json" highlight="1,5" -->
|
|
29
|
+
|
|
30
|
+
**Task:** Design `GET /tasks?status=open&assignee=42` for listing tasks. Define: (1) query parameters, (2) response shape (fields), (3) status codes (200, 400, 401). Write a sample JSON response.
|
|
31
|
+
|
|
32
|
+
**Question:** Should pagination be required or optional? What default `limit` would you use?
|
|
33
|
+
|
|
34
|
+
**Checkpoint:** You have a complete endpoint spec with params and response.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Step 3: REST vs GraphQL
|
|
39
|
+
|
|
40
|
+
<!-- hint:buttons type="single" prompt="For a mobile app needing user + last 5 orders, which fits better?" options="REST (multiple requests),GraphQL (single query),Depends on use case" -->
|
|
41
|
+
|
|
42
|
+
**Task:** A mobile app needs: user profile (name, avatar) + last 5 orders (id, date). Compare: (a) REST: how many requests? (b) GraphQL: one query. Write the GraphQL query.
|
|
43
|
+
|
|
44
|
+
**Question:** When would REST with a compound endpoint (e.g., `GET /me?include=orders`) be simpler than GraphQL?
|
|
45
|
+
|
|
46
|
+
**Checkpoint:** You can articulate when each approach fits.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Step 4: Contract-First with OpenAPI
|
|
51
|
+
|
|
52
|
+
<!-- hint:embed url="https://swagger.io/specification/" -->
|
|
53
|
+
|
|
54
|
+
**Embed:** https://editor.swagger.io/
|
|
55
|
+
|
|
56
|
+
**Task:** Add the `GET /tasks` endpoint to an OpenAPI spec. Include path, parameters, responses for 200 and 400. Use the standard OpenAPI 3.0 structure.
|
|
57
|
+
|
|
58
|
+
**Question:** What can you generate from an OpenAPI spec? (clients, mocks, docs, tests)
|
|
59
|
+
|
|
60
|
+
**Checkpoint:** You have a valid OpenAPI snippet for one endpoint.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Step 5: Versioning Strategy
|
|
65
|
+
|
|
66
|
+
**Task:** Your API has `GET /users` returning `{ id, name, email }`. You need to add `avatar_url` without breaking old clients. Describe two versioning approaches: (1) URL versioning, (2) additive change (backward compatible). Which would you choose and why?
|
|
67
|
+
|
|
68
|
+
**Question:** When is additive change (adding optional fields) sufficient? When do you need a real new version?
|
|
69
|
+
|
|
70
|
+
**Checkpoint:** You understand when to add vs when to version.
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Step 6: Error Handling
|
|
75
|
+
|
|
76
|
+
**Task:** A client sends `POST /tasks` with `{ "title": "" }` — empty title is invalid. Design the error response: status code, body shape, and at least one header that would help a client.
|
|
77
|
+
|
|
78
|
+
**Question:** Should the body use a custom structure or follow a standard (e.g., RFC 7807 Problem Details)?
|
|
79
|
+
|
|
80
|
+
**Checkpoint:** You have a consistent error format with status and structured body.
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Step 7: Pagination and Rate Limiting
|
|
85
|
+
|
|
86
|
+
**Task:** Add cursor-based pagination to `GET /tasks`. Define: (1) request params (`cursor`, `limit`), (2) response shape (tasks array + `next_cursor`), (3) behavior when no more pages. Then add a rate limit header (e.g., 100 req/min). What would you return when the limit is exceeded?
|
|
87
|
+
|
|
88
|
+
**Checkpoint:** Pagination and rate limit are fully specified.
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# Clean Code — Naming, Functions, and Readability That Scales
|
|
2
|
+
|
|
3
|
+
## Why Clean Code Matters
|
|
4
|
+
|
|
5
|
+
Code is read far more often than it's written. Clean code reduces cognitive load, speeds onboarding, and makes changes safer.
|
|
6
|
+
|
|
7
|
+
## Naming Conventions
|
|
8
|
+
|
|
9
|
+
**Reveal intent:**
|
|
10
|
+
```javascript
|
|
11
|
+
// Bad
|
|
12
|
+
const d = 86400;
|
|
13
|
+
// Good
|
|
14
|
+
const secondsPerDay = 86400;
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**Avoid disinformation:** Don't use `accountList` if it's not a List. Use `accounts` or `accountGroup`.
|
|
18
|
+
|
|
19
|
+
**Use pronounceable names:**
|
|
20
|
+
```javascript
|
|
21
|
+
// Bad
|
|
22
|
+
const genymdhms = ...;
|
|
23
|
+
// Good
|
|
24
|
+
const generationTimestamp = ...;
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**Use searchable names:** `MAX_ITEMS` is better than `7` scattered in code.
|
|
28
|
+
|
|
29
|
+
## Function Design
|
|
30
|
+
|
|
31
|
+
### Small and Focused
|
|
32
|
+
|
|
33
|
+
Each function should do one thing. If you can name it with "and," it does too much:
|
|
34
|
+
|
|
35
|
+
```javascript
|
|
36
|
+
// Bad: does validation AND save AND send email
|
|
37
|
+
function processUser(data) { ... }
|
|
38
|
+
|
|
39
|
+
// Good: single responsibility
|
|
40
|
+
function validateUser(data) { ... }
|
|
41
|
+
function saveUser(user) { ... }
|
|
42
|
+
function notifyUser(user) { ... }
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Few Arguments
|
|
46
|
+
|
|
47
|
+
Ideal: 0–2 arguments. 3+ suggests the function needs a parameter object:
|
|
48
|
+
|
|
49
|
+
```javascript
|
|
50
|
+
// Bad
|
|
51
|
+
function createUser(name, email, age, country, role) { ... }
|
|
52
|
+
|
|
53
|
+
// Good
|
|
54
|
+
function createUser(userData) { ... }
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### No Side Effects
|
|
58
|
+
|
|
59
|
+
Functions should not surprise callers. Hidden changes cause bugs:
|
|
60
|
+
|
|
61
|
+
```javascript
|
|
62
|
+
// Bad: modifies global, changes session
|
|
63
|
+
function checkPassword(user, password) {
|
|
64
|
+
if (valid) session.authenticated = true; // side effect!
|
|
65
|
+
return valid;
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Avoiding Magic Numbers
|
|
70
|
+
|
|
71
|
+
Replace unexplained literals with named constants:
|
|
72
|
+
|
|
73
|
+
```javascript
|
|
74
|
+
// Bad
|
|
75
|
+
if (status === 3) { ... }
|
|
76
|
+
setTimeout(callback, 86400000);
|
|
77
|
+
|
|
78
|
+
// Good
|
|
79
|
+
const ORDER_STATUS_SHIPPED = 3;
|
|
80
|
+
const MS_PER_DAY = 24 * 60 * 60 * 1000;
|
|
81
|
+
if (status === ORDER_STATUS_SHIPPED) { ... }
|
|
82
|
+
setTimeout(callback, MS_PER_DAY);
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## DRY and YAGNI
|
|
86
|
+
|
|
87
|
+
- **DRY (Don't Repeat Yourself):** Extract duplication into functions, constants, or modules.
|
|
88
|
+
- **YAGNI (You Ain't Gonna Need It):** Don't add code for hypothetical future requirements.
|
|
89
|
+
|
|
90
|
+
Balance: abstract when you see the *third* repetition, not the second.
|
|
91
|
+
|
|
92
|
+
## Comments vs Self-Documenting Code
|
|
93
|
+
|
|
94
|
+
Prefer clear code over comments:
|
|
95
|
+
|
|
96
|
+
```javascript
|
|
97
|
+
// Bad
|
|
98
|
+
// Check if user is old enough
|
|
99
|
+
if (u.a > 17) { ... }
|
|
100
|
+
|
|
101
|
+
// Good
|
|
102
|
+
const isAdult = user.age >= 18;
|
|
103
|
+
if (isAdult) { ... }
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**Good comments:** explain *why*, not *what*. Legal requirements, workarounds, non-obvious algorithms.
|
|
107
|
+
|
|
108
|
+
## Code Smells
|
|
109
|
+
|
|
110
|
+
| Smell | Fix |
|
|
111
|
+
|-------|-----|
|
|
112
|
+
| Long function | Extract smaller functions |
|
|
113
|
+
| Long parameter list | Use object parameter |
|
|
114
|
+
| Duplicate code | Extract and reuse |
|
|
115
|
+
| Deep nesting | Early returns, extract functions |
|
|
116
|
+
| Unclear names | Rename for clarity |
|
|
117
|
+
|
|
118
|
+
## Before/After Refactoring
|
|
119
|
+
|
|
120
|
+
**Before:**
|
|
121
|
+
```javascript
|
|
122
|
+
function calc(d, t) {
|
|
123
|
+
if (t === 0) return 0;
|
|
124
|
+
return d / t;
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
**After:**
|
|
129
|
+
```javascript
|
|
130
|
+
function calculateSpeed(distanceInMeters, timeInSeconds) {
|
|
131
|
+
if (timeInSeconds === 0) return 0;
|
|
132
|
+
return distanceInMeters / timeInSeconds;
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Readability improved; intent is obvious.
|