実装完了

作成・変更したファイル
バックエンド(新規):

apps/mail/models.py — MailSender, MailEmail, MailNotificationToken
apps/mail/serializers.py
apps/mail/views.py — Windmill用API、フィードバック、ルール管理
apps/mail/urls.py
apps/mail/admin.py
マイグレーション(自動生成・適用済み)
バックエンド(変更):

settings.py — apps.mail 追加、MAIL_API_KEY/FRONTEND_URL 環境変数
urls.py — /api/mail/ 追加
フロントエンド(新規):

mail/feedback/[token]/page.tsx — 認証不要、フィードバック3択+スコープ選択
mail/rules/page.tsx — ルール管理(一覧・追加・削除)
フロントエンド(変更):

Navbar.tsx — 「メールルール」メニュー追加
types/index.ts — MailSender, MailEmailFeedback 型追加
次のステップ(Windmill側)
Keinaシステム側の実装は完了しています。次はWindmillにIMAPポーリングスクリプトを書く必要があります。Windmillのスクリプトが必要になったタイミングでお声がけください。
This commit is contained in:
Akira
2026-02-22 09:27:27 +09:00
parent 24fa9b4e64
commit 7a1aa81f9f
17 changed files with 1367 additions and 1 deletions

View File

@@ -40,6 +40,7 @@ INSTALLED_APPS = [
'apps.fields',
'apps.plans',
'apps.reports',
'apps.mail',
]
MIDDLEWARE = [
@@ -148,3 +149,7 @@ CORS_ALLOWED_ORIGINS = [
"http://localhost:3000",
"http://127.0.0.1:3000",
]
# メールフィルタリング機能
MAIL_API_KEY = os.environ.get('MAIL_API_KEY', '')
FRONTEND_URL = os.environ.get('FRONTEND_URL', 'http://localhost:3000')

View File

@@ -32,4 +32,5 @@ urlpatterns = [
path('api/reports/', include('apps.reports.urls')),
path('api/auth/jwt/create/', TokenObtainPairView.as_view(), name='token_obtain_pair'),
path('api/auth/jwt/refresh/', TokenRefreshView.as_view(), name='token_refresh'),
path('api/mail/', include('apps.mail.urls')),
]