[Phase 1] Architecture Extraction — Full Hexagonal Architecture Refactor #17

Closed
opened 2026-04-02 18:32:56 +02:00 by shoko · 0 comments
Owner

Phase 1: Architecture Extraction

Goal: Establish the architecture end-to-end, with working CLI, file storage adapter, and refactored Telegram bot.

Architecture Overview

CLI App  ─────┐
              ├──>  Core Logic  ──>  Storage Ports (Interfaces)
Telegram Bot ─┘              │                    │
                           |            ┌───────v───────┐
                           |            | JsonFileAdapter|
                           |            | SqliteAdapter | (future)
                           |            └───────────────┘

Directory Structure

jigaido/
├── core/                         # Domain layer
│   ├── models.py                 # Task #5
│   ├── ports.py                  # Task #6
│   └── services.py               # Task #8
├── adapters/
│   └── storage/
│       └── json_file.py          # Task #9
├── cli/
│   └── main.py                   # Task #11
├── apps/
│   └── telegram-bot/
│       ├── bot.py                # Task #14
│       └── commands.py           # Task #13
├── config.py                     # Task #7
└── tests/                        # Task #15

Task Dependency Graph

Task 1 (#5: core/models)
       ↓
Task 2 (#6: core/ports)  ──┐
       ↓               │
Task 3 (#7: config)      │  ← These 3 can run in parallel after Tasks 1-2
       ↓               │
Task 4 (#8: core/services) ┘
       ↓
Task 5 (#9: json_file adapter)
       ↓
Task 6 (#11: CLI)  ────────────┐
       ↓                   │
Task 7 (#13: telegram commands) │  ← Tasks 7 & 8 can run in parallel
       ↓                   │
Task 8 (#14: telegram bot)  ←───┘
       ↓
Task 9 (#15: tests)
       ↓
Task 10 (#16: cleanup)

Tasks

# Issue Description Labels Dependency
1 #5 Create core/models.py — Domain dataclasses phase-1, core None
2 #6 Create core/ports.py — Storage interfaces phase-1, core #5
3 #7 Create config.py — Configuration management phase-1, architecture None
4 #8 Create core/services.py — Business logic phase-1, core #5, #6, #7
5 #9 Create adapters/storage/json_file.py phase-1, adapter #5, #6
6 #11 Create CLI (jigaido-cli) phase-1, cli #7, #8, #9
7 #13 Refactor telegram-bot/commands.py phase-1, telegram-bot #8
8 #14 Refactor telegram-bot/bot.py phase-1, telegram-bot #8, #13
9 #15 Write tests phase-1, tests #9, #11, #13, #14
10 #16 Cleanup — Remove old/dead code phase-1, cleanup #13, #14

Parallelization Summary

Group Tasks Can Run Together
Group 1 1, 3 Yes (parallel)
Group 2 2 (→4), 4 (→5) Sequential within group
Group 3 5 After Group 2
Group 4 6, 7, 8 7 & 8 parallel; 6 parallel with 7/8 if config done
Group 5 9 After all above
Group 6 10 After 7, 8

Minimum 2 people can work in parallel

## Phase 1: Architecture Extraction **Goal:** Establish the architecture end-to-end, with working CLI, file storage adapter, and refactored Telegram bot. ### Architecture Overview ``` CLI App ─────┐ ├──> Core Logic ──> Storage Ports (Interfaces) Telegram Bot ─┘ │ │ | ┌───────v───────┐ | | JsonFileAdapter| | | SqliteAdapter | (future) | └───────────────┘ ``` ### Directory Structure ``` jigaido/ ├── core/ # Domain layer │ ├── models.py # Task #5 │ ├── ports.py # Task #6 │ └── services.py # Task #8 ├── adapters/ │ └── storage/ │ └── json_file.py # Task #9 ├── cli/ │ └── main.py # Task #11 ├── apps/ │ └── telegram-bot/ │ ├── bot.py # Task #14 │ └── commands.py # Task #13 ├── config.py # Task #7 └── tests/ # Task #15 ``` ### Task Dependency Graph ``` Task 1 (#5: core/models) ↓ Task 2 (#6: core/ports) ──┐ ↓ │ Task 3 (#7: config) │ ← These 3 can run in parallel after Tasks 1-2 ↓ │ Task 4 (#8: core/services) ┘ ↓ Task 5 (#9: json_file adapter) ↓ Task 6 (#11: CLI) ────────────┐ ↓ │ Task 7 (#13: telegram commands) │ ← Tasks 7 & 8 can run in parallel ↓ │ Task 8 (#14: telegram bot) ←───┘ ↓ Task 9 (#15: tests) ↓ Task 10 (#16: cleanup) ``` ### Tasks | # | Issue | Description | Labels | Dependency | |---|-------|-------------|--------|------------| | 1 | #5 | Create core/models.py — Domain dataclasses | phase-1, core | None | | 2 | #6 | Create core/ports.py — Storage interfaces | phase-1, core | #5 | | 3 | #7 | Create config.py — Configuration management | phase-1, architecture | None | | 4 | #8 | Create core/services.py — Business logic | phase-1, core | #5, #6, #7 | | 5 | #9 | Create adapters/storage/json_file.py | phase-1, adapter | #5, #6 | | 6 | #11 | Create CLI (jigaido-cli) | phase-1, cli | #7, #8, #9 | | 7 | #13 | Refactor telegram-bot/commands.py | phase-1, telegram-bot | #8 | | 8 | #14 | Refactor telegram-bot/bot.py | phase-1, telegram-bot | #8, #13 | | 9 | #15 | Write tests | phase-1, tests | #9, #11, #13, #14 | | 10 | #16 | Cleanup — Remove old/dead code | phase-1, cleanup | #13, #14 | ### Parallelization Summary | Group | Tasks | Can Run Together | |-------|-------|------------------| | Group 1 | 1, 3 | Yes (parallel) | | Group 2 | 2 (→4), 4 (→5) | Sequential within group | | Group 3 | 5 | After Group 2 | | Group 4 | 6, 7, 8 | 7 & 8 parallel; 6 parallel with 7/8 if config done | | Group 5 | 9 | After all above | | Group 6 | 10 | After 7, 8 | ### Minimum 2 people can work in parallel
shoko added the architecturephase-1 labels 2026-04-02 18:34:45 +02:00
shoko closed this issue 2026-04-03 21:15:25 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shoko/jigaido#17