Skip to content
This repository has been archived by the owner on Jul 16, 2022. It is now read-only.

technote-space/ddd-cqrs-pattern

Repository files navigation

ToDo List with DDD+CQRS

CI Status codecov CodeFactor License: MIT

Table of Contents

Details

generated with TOC Generator

動作要件

  • Node.js >= 14
  • yarn = 1.x

これはなに?

DDDCQRSで実装したTODOリスト

データベースとしてお試しでNotionIntegrationを使用(遅いので別のDBも追加予定)

図1 図2

残タスク

  • 一覧をタグやステータスでタブで分けて表示
  • タスクを日付でグループ化して表示
  • Vercel でホスティング
  • アプリ実装
  • etc.

開発

セットアップ

  1. パッケージのインストール
  • yarn
  1. 環境変数の設定
    1. Database
      • DATABASE_TYPE: mysql or notion
        • NOTION_SECRET: Notionの設定(secret_xxxxxx)
        • NOTION_PARENT_ID: Notionの設定(親となるページID)
        • MYSQL_...: MySQLの設定
    2. Auth0
      • NEXT_PUBLIC_AUTH0_CLIENT_ID: Auth0のClientID
      • NEXT_PUBLIC_AUTH0_DOMAIN: Auth0のDomain
    3. Slack
      • SLACK_WEBHOOK_URL: エラー時にSlackを送信したい場合に設定するwebhook
  2. マイグレーション
  • yarn migrate

起動

yarn dev

http://localhost:3000/

Linter

yarn lint

fix

yarn lint:fix

Type check

yarn typecheck

Jest

yarn cover

スナップショットの更新

yarn cover:update

Storybook

yarn sb

Deploy

Vercel にデプロイする際は以下の環境変数を設定してください。

NOTION_SECRET, NOTION_PARENT_ID, NEXT_PUBLIC_AUTH0_CLIENT_ID, NEXT_PUBLIC_AUTH0_DOMAIN

Author

GitHub (Technote)
Blog