Debian Codegraph @

texmf-dist/doc/latex/dirtreex/dirtreex_examples.tex

raw
1 %% dirtreex_examples.tex -- dirtreex examples gallery
2 %% v1.0 2026/04/26
3 %%
4 %% Copyright (C) 2026 CloudCauldron <[email protected]>
5 %% Repository: https://github.com/CloudCauldron/dirtreex
6 %%
7 %% This work may be distributed and/or modified under the
8 %% conditions of the LaTeX Project Public License, either version
9 %% 1.3c of this license or (at your option) any later version.
10 %% The latest version of this license is in
11 %% https://www.latex-project.org/lppl.txt
12 %% and version 1.3c or later is part of all distributions of LaTeX
13 %% version 2008 or later.
14 %%
15 %% This work has the LPPL maintenance status `author-maintained'.
16 %% The Current Maintainer of this work is CloudCauldron.
17 %%
18 %% A walkthrough of every major feature of the dirtreex package.
19 %% Each example has three parts, in order:
20 %% (1) a subsection title,
21 %% (2) the raw source code shown inside a lstlisting frame,
22 %% (3) the exact same source code typeset by the package so that
23 %% the reader can see its output immediately below.
24 %%
25 %% Compile with: lualatex dirtreex_examples.tex
26 %% lualatex dirtreex_examples.tex (second pass for zref)
27
28 \documentclass[11pt]{article}
29 \newcommand{\pagemargin}{2cm}
30 \usepackage[a4paper,margin=\pagemargin]{geometry}
31 %% Internal helpers: emit one deferred shipout-BG rule whose y-offset
32 %% is supplied as an ABSOLUTE pt literal (no `em' in sight). Used by
33 %% the \debug…margin… macros below.
34 \newcommand{\dbgstamplower}[1]{%
35 \AddToShipoutPictureBG*{\AtPageLowerLeft{\put(0, #1){\rule{\paperwidth}{0.5pt}}}}}
36 \newcommand{\dbgstamplowercolour}[2]{%
37 \AddToShipoutPictureBG*{\AtPageLowerLeft{\put(0, #1){\textcolor{#2}{\rule{\paperwidth}{0.5pt}}}}}}
38 \newcommand{\dbgstampupper}[1]{%
39 \AddToShipoutPictureBG*{\AtPageUpperLeft{\put(0, #1){\rule{\paperwidth}{0.5pt}}}}}
40 \newcommand{\dbgstampuppercolour}[2]{%
41 \AddToShipoutPictureBG*{\AtPageUpperLeft{\put(0, #1){\textcolor{#2}{\rule{\paperwidth}{0.5pt}}}}}}
42 %% Each \debug…margin… macro PINS its dimension expressions to absolute
43 %% pt at call time (under the doc body font that the user is in when
44 %% the macro is invoked), then \expandafter-injects the pinned literal
45 %% into the helpers above. Without this pinning, eso-pic's deferred
46 %% expansion would resolve `1em' under whatever font is active at
47 %% shipout — for first-piece pages of a multi-page dirtreex env that is
48 %% the env's \small (~0.95 pt smaller per em), producing a visible
49 %% mismatch between the reference rules and the package's own (doc-em
50 %% pinned) tbA/bbA geometry.
51 \newcommand{\debugboxedmarginlower}[2]{%
52 \edef\dbgrefa{\the\dimexpr \pagemargin\relax}%
53 \edef\dbgrefb{\the\dimexpr \pagemargin + #1\relax}%
54 \edef\dbgrefc{\the\dimexpr \pagemargin + #2\relax}%
55 \expandafter\dbgstamplower\expandafter{\dbgrefa}%
56 \expandafter\dbgstamplowercolour\expandafter{\dbgrefb}{red}%
57 \expandafter\dbgstamplowercolour\expandafter{\dbgrefc}{blue}%
58 }
59 \newcommand{\debugboxedmarginupper}[2]{%
60 \edef\dbgrefa{\the\dimexpr -\pagemargin\relax}%
61 \edef\dbgrefb{\the\dimexpr -\pagemargin - #1\relax}%
62 \edef\dbgrefc{\the\dimexpr -\pagemargin - #2\relax}%
63 \expandafter\dbgstampupper\expandafter{\dbgrefa}%
64 \expandafter\dbgstampuppercolour\expandafter{\dbgrefb}{red}%
65 \expandafter\dbgstampuppercolour\expandafter{\dbgrefc}{blue}%
66 }
67 %% Bare-tree variants: no frame to draw, so the red `box break at`
68 %% reference line is omitted -- only the page-margin baseline (black)
69 %% and the `tree break at` offset (blue) are shown.
70 \newcommand{\debugbaremarginlower}[1]{%
71 \edef\dbgrefa{\the\dimexpr \pagemargin\relax}%
72 \edef\dbgrefb{\the\dimexpr \pagemargin + #1\relax}%
73 \expandafter\dbgstamplower\expandafter{\dbgrefa}%
74 \expandafter\dbgstamplowercolour\expandafter{\dbgrefb}{blue}%
75 }
76 \newcommand{\debugbaremarginupper}[1]{%
77 \edef\dbgrefa{\the\dimexpr -\pagemargin\relax}%
78 \edef\dbgrefb{\the\dimexpr -\pagemargin - #1\relax}%
79 \expandafter\dbgstampupper\expandafter{\dbgrefa}%
80 \expandafter\dbgstampuppercolour\expandafter{\dbgrefb}{blue}%
81 }
82 \usepackage{dirtreex}
83 \usepackage{xcolor}
84 \usepackage{fancyvrb}
85 \usepackage{eso-pic}
86 \usetikzlibrary{patterns}
87 \newcommand{\debugvspace}[1]{%
88 \par\noindent
89 \begin{tikzpicture}
90 \fill[pattern=north east lines, pattern color=gray!60]
91 (0,0) rectangle (\linewidth, #1);
92 \end{tikzpicture}%
93 \par
94 }
95
96 \setlength{\parindent}{0pt}
97 \setlength{\parskip}{0.6\baselineskip}
98
99 \fvset{
100 frame=single,
101 framesep=4pt,
102 rulecolor=\color{black!40},
103 fontsize=\footnotesize,
104 numbers=none,
105 }
106
107 \title{\textbf{dirtreex} -- Examples Gallery}
108 \author{}
109 \date{}
110
111 \begin{document}
112 \maketitle
113
114 \noindent
115 This document walks through the full feature surface of the \texttt{dirtreex} package. Each numbered entry shows (a) the raw source code exactly as you would write it, and (b) the rendered result produced by that code. The examples are self-contained: copy any snippet into a preamble with \verb|\usepackage{dirtreex}| and it will compile.
116
117 \tableofcontents
118
119 \clearpage
120
121 % ============================================================
122 \section{Basics}
123 % ============================================================
124
125 \subsection{Default tree}
126
127 \begin{Verbatim}
128 \begin{dirtreex}
129 \dir{project}{root directory}{
130 \dir{src}{source code}{
131 \file{main.py}{entry point}
132 \file{util.py}{helpers}
133 }
134 \file{README.md}{documentation}
135 }
136 \end{dirtreex}
137 \end{Verbatim}
138
139 \begin{dirtreex}
140 \dir{project}{root directory}{
141 \dir{src}{source code}{
142 \file{main.py}{entry point}
143 \file{util.py}{helpers}
144 }
145 \file{README.md}{documentation}
146 }
147 \end{dirtreex}
148
149 \subsection{Empty comments and empty subtrees}
150
151 \begin{Verbatim}
152 \begin{dirtreex}
153 \dir{root}{}{
154 \file{a.txt}{with comment}
155 \file{b.txt}{}
156 \dir{empty-dir}{}{}
157 \dir{has-comment}{no children}{}
158 }
159 \end{dirtreex}
160 \end{Verbatim}
161
162 \begin{dirtreex}
163 \dir{root}{}{
164 \file{a.txt}{with comment}
165 \file{b.txt}{}
166 \dir{empty-dir}{}{}
167 \dir{has-comment}{no children}{}
168 }
169 \end{dirtreex}
170
171 \subsection{Single-node tree}
172
173 \begin{Verbatim}
174 \begin{dirtreex}
175 \file{lonely.txt}{a single node is legal}
176 \end{dirtreex}
177 \end{Verbatim}
178
179 \begin{dirtreex}
180 \file{lonely.txt}{a single node is legal}
181 \end{dirtreex}
182
183 \subsection{Multi-line comment}
184
185 \begin{Verbatim}
186 \begin{dirtreex}
187 \dir{project}{top-level}{
188 \file{Makefile}{
189 build script\\
190 three lines of commentary\\
191 stay aligned in a rectangle%
192 }
193 \file{README.md}{single line}
194 }
195 \end{dirtreex}
196 \end{Verbatim}
197
198 \begin{dirtreex}
199 \dir{project}{top-level}{
200 \file{Makefile}{
201 build script\\
202 three lines of commentary\\
203 stay aligned in a rectangle%
204 }
205 \file{README.md}{single line}
206 }
207 \end{dirtreex}
208
209 \clearpage
210
211 % ============================================================
212 \section{Font size}
213 % ============================================================
214
215 \subsection{Tiny font}
216
217 \begin{Verbatim}
218 \begin{dirtreex}[fontsize=\tiny]
219 \dir{project}{rendered at tiny}{
220 \file{a.txt}{file A}
221 \file{b.txt}{file B}
222 \dir{sub}{subdirectory}{\file{c.txt}{}}
223 }
224 \end{dirtreex}
225 \end{Verbatim}
226
227 \begin{dirtreex}[fontsize=\tiny]
228 \dir{project}{rendered at tiny}{
229 \file{a.txt}{file A}
230 \file{b.txt}{file B}
231 \dir{sub}{subdirectory}{\file{c.txt}{}}
232 }
233 \end{dirtreex}
234
235 \subsection{Large font}
236
237 \begin{Verbatim}
238 \begin{dirtreex}[fontsize=\large]
239 \dir{project}{rendered at large}{
240 \file{a.txt}{file A}
241 \dir{sub}{subdirectory}{\file{b.txt}{}}
242 }
243 \end{dirtreex}
244 \end{Verbatim}
245
246 \begin{dirtreex}[fontsize=\large]
247 \dir{project}{rendered at large}{
248 \file{a.txt}{file A}
249 \dir{sub}{subdirectory}{\file{b.txt}{}}
250 }
251 \end{dirtreex}
252
253 \clearpage
254
255 % ============================================================
256 \section{Elbow shape}
257 % ============================================================
258
259 \subsection{Sharp elbows (default)}
260
261 \begin{Verbatim}
262 \begin{dirtreex}[elbow radius=0pt]
263 \dir{sharp}{right-angle connectors}{
264 \file{a.txt}{}
265 \dir{sub1}{subdir 1}{
266 \file{b.txt}{}
267 \dir{sub2}{subdir 2}{\file{c.txt}{}}
268 }
269 \file{d.txt}{}
270 }
271 \end{dirtreex}
272 \end{Verbatim}
273
274 \begin{dirtreex}[elbow radius=0pt]
275 \dir{sharp}{right-angle connectors}{
276 \file{a.txt}{}
277 \dir{sub1}{subdir 1}{
278 \file{b.txt}{}
279 \dir{sub2}{subdir 2}{\file{c.txt}{}}
280 }
281 \file{d.txt}{}
282 }
283 \end{dirtreex}
284
285 \subsection{Rounded elbows, radius 3pt}
286
287 \begin{Verbatim}
288 \begin{dirtreex}[elbow radius=3pt]
289 \dir{round3}{rounded 3pt}{
290 \file{a.txt}{}
291 \dir{sub1}{subdir 1}{
292 \file{b.txt}{}
293 \dir{sub2}{subdir 2}{\file{c.txt}{}}
294 }
295 \file{d.txt}{}
296 }
297 \end{dirtreex}
298 \end{Verbatim}
299
300 \begin{dirtreex}[elbow radius=3pt]
301 \dir{round3}{rounded 3pt}{
302 \file{a.txt}{}
303 \dir{sub1}{subdir 1}{
304 \file{b.txt}{}
305 \dir{sub2}{subdir 2}{\file{c.txt}{}}
306 }
307 \file{d.txt}{}
308 }
309 \end{dirtreex}
310
311 \subsection{Rounded elbows, radius 6pt}
312
313 \begin{Verbatim}
314 \begin{dirtreex}[elbow radius=6pt]
315 \dir{round6}{rounded 6pt}{
316 \file{a.txt}{}
317 \dir{sub1}{subdir 1}{
318 \file{b.txt}{}
319 \dir{sub2}{subdir 2}{\file{c.txt}{}}
320 }
321 \file{d.txt}{}
322 }
323 \end{dirtreex}
324 \end{Verbatim}
325
326 \begin{dirtreex}[elbow radius=6pt]
327 \dir{round6}{rounded 6pt}{
328 \file{a.txt}{}
329 \dir{sub1}{subdir 1}{
330 \file{b.txt}{}
331 \dir{sub2}{subdir 2}{\file{c.txt}{}}
332 }
333 \file{d.txt}{}
334 }
335 \end{dirtreex}
336
337 \subsection{Extreme radius (clamped to \texttt{0.5\textbackslash baselineskip})}
338
339 The package clamps the requested elbow radius against half the baseline skip (and against the line width), so an oversized value silently degrades to the largest legible arc rather than overrunning the column.
340
341 \begin{Verbatim}
342 \begin{dirtreex}[elbow radius=10pt]
343 \dir{round10}{requested 10pt -- clamped}{
344 \file{a.txt}{}
345 \dir{sub1}{subdir 1}{
346 \file{b.txt}{}
347 \dir{sub2}{subdir 2}{\file{c.txt}{}}
348 }
349 \file{d.txt}{}
350 }
351 \end{dirtreex}
352 \end{Verbatim}
353
354 \begin{dirtreex}[elbow radius=10pt]
355 \dir{round10}{requested 10pt -- clamped}{
356 \file{a.txt}{}
357 \dir{sub1}{subdir 1}{
358 \file{b.txt}{}
359 \dir{sub2}{subdir 2}{\file{c.txt}{}}
360 }
361 \file{d.txt}{}
362 }
363 \end{dirtreex}
364
365 \clearpage
366
367 % ============================================================
368 \section{Frame (the \texttt{box} family)}
369 % ============================================================
370
371 \subsection{No frame (\texttt{box=false})}
372
373 \begin{Verbatim}
374 \begin{dirtreex}[box=false]
375 \dir{bare}{no border, no padding}{
376 \file{a.txt}{}
377 \dir{sub}{}{\file{b.txt}{}}
378 }
379 \end{dirtreex}
380 \end{Verbatim}
381
382 \begin{dirtreex}[box=false]
383 \dir{bare}{no border, no padding}{
384 \file{a.txt}{}
385 \dir{sub}{}{\file{b.txt}{}}
386 }
387 \end{dirtreex}
388
389 \subsection{Rounded corners (uniform)}
390
391 \begin{Verbatim}
392 \begin{dirtreex}[
393 box={true, corners=6pt, border color=black,
394 background color=white, margin=6pt}]
395 \dir{rounded-frame}{corners=6pt}{
396 \file{a.txt}{}
397 \dir{sub}{}{\file{b.txt}{}}
398 }
399 \end{dirtreex}
400 \end{Verbatim}
401
402 \begin{dirtreex}[
403 box={true, corners=6pt, border color=black,
404 background color=white, margin=6pt}]
405 \dir{rounded-frame}{corners=6pt}{
406 \file{a.txt}{}
407 \dir{sub}{}{\file{b.txt}{}}
408 }
409 \end{dirtreex}
410
411 \subsection{Coloured border and background}
412
413 \begin{Verbatim}
414 \begin{dirtreex}[
415 box={true, corners=3pt, border color=purple,
416 border width=1pt, background color=purple!5}]
417 \dir{colored}{purple border, lavender fill}{
418 \file{a.txt}{}
419 \file{b.txt}{}
420 }
421 \end{dirtreex}
422 \end{Verbatim}
423
424 \begin{dirtreex}[
425 box={true, corners=3pt, border color=purple,
426 border width=1pt, background color=purple!5}]
427 \dir{colored}{purple border, lavender fill}{
428 \file{a.txt}{}
429 \file{b.txt}{}
430 }
431 \end{dirtreex}
432
433 \subsection{HTML hex colour + thick border}
434
435 \begin{Verbatim}
436 \definecolor{brand}{HTML}{2C7BE5}
437 \begin{dirtreex}[
438 box={true, corners=4pt, border color=brand,
439 border width=1.5pt,
440 background color=brand!8}]
441 \dir{hex-color}{\#2C7BE5 accent}{
442 \file{main.ts}{}
443 \file{style.css}{}
444 }
445 \end{dirtreex}
446 \end{Verbatim}
447
448 \definecolor{brand}{HTML}{2C7BE5}
449 \begin{dirtreex}[
450 box={true, corners=4pt, border color=brand,
451 border width=1.5pt,
452 background color=brand!8}]
453 \dir{hex-color}{\#2C7BE5 accent}{
454 \file{main.ts}{}
455 \file{style.css}{}
456 }
457 \end{dirtreex}
458
459 \subsection{Four independent corner radii}
460
461 \begin{Verbatim}
462 \begin{dirtreex}[
463 box={true, corners={8pt, 0pt, 8pt, 0pt},
464 border color=teal, background color=teal!5,
465 margin=6pt}]
466 \dir{corners}{TL, TR, BR, BL = 8, 0, 8, 0}{
467 \file{a.txt}{}
468 \file{b.txt}{}
469 }
470 \end{dirtreex}
471 \end{Verbatim}
472
473 \begin{dirtreex}[
474 box={true, corners={8pt, 0pt, 8pt, 0pt},
475 border color=teal, background color=teal!5,
476 margin=6pt}]
477 \dir{corners}{TL, TR, BR, BL = 8, 0, 8, 0}{
478 \file{a.txt}{}
479 \file{b.txt}{}
480 }
481 \end{dirtreex}
482
483 \subsection{Uniform margin (single value)}
484
485 \begin{Verbatim}
486 \begin{dirtreex}[
487 box={margin=18pt, border color=black,
488 background color=gray!5}]
489 \dir{padded}{18pt margin on every side}{
490 \file{a.txt}{}
491 \file{b.txt}{}
492 }
493 \end{dirtreex}
494 \end{Verbatim}
495
496 \begin{dirtreex}[
497 box={margin=18pt, border color=black,
498 background color=gray!5}]
499 \dir{padded}{18pt margin on every side}{
500 \file{a.txt}{}
501 \file{b.txt}{}
502 }
503 \end{dirtreex}
504
505 \subsection{Asymmetric margin (four values, T/R/B/L)}
506
507 \begin{Verbatim}
508 \begin{dirtreex}[
509 box={margin={2pt, 30pt, 16pt, 4pt},
510 border color=orange, background color=orange!8}]
511 \dir{asymmetric}{T=2, R=30, B=16, L=4}{
512 \file{a}{}
513 \file{b}{}
514 }
515 \end{dirtreex}
516 \end{Verbatim}
517
518 \begin{dirtreex}[
519 box={margin={2pt, 30pt, 16pt, 4pt},
520 border color=orange, background color=orange!8}]
521 \dir{asymmetric}{T=2, R=30, B=16, L=4}{
522 \file{a}{}
523 \file{b}{}
524 }
525 \end{dirtreex}
526
527 \clearpage
528
529 % ============================================================
530 \section{Global line style}
531 % ============================================================
532
533 \subsection{Thin blue lines}
534
535 \begin{Verbatim}
536 \begin{dirtreex}[
537 line color=blue!70!black, line width=0.3pt,
538 box={true, border color=blue!70!black,
539 background color=blue!5, margin=6pt}]
540 \dir{blue-thin}{0.3pt blue}{
541 \file{a.py}{}
542 \dir{sub}{}{
543 \file{b.py}{}
544 \file{c.py}{}
545 }
546 \file{d.py}{}
547 }
548 \end{dirtreex}
549 \end{Verbatim}
550
551 \begin{dirtreex}[
552 line color=blue!70!black, line width=0.3pt,
553 box={true, border color=blue!70!black,
554 background color=blue!5, margin=6pt}]
555 \dir{blue-thin}{0.3pt blue}{
556 \file{a.py}{}
557 \dir{sub}{}{
558 \file{b.py}{}
559 \file{c.py}{}
560 }
561 \file{d.py}{}
562 }
563 \end{dirtreex}
564
565 \subsection{Thick red lines}
566
567 \begin{Verbatim}
568 \begin{dirtreex}[
569 line color=red!70!black, line width=1pt,
570 box={true, border color=red!80!black,
571 border width=2pt, background color=red!5,
572 margin=6pt}]
573 \dir{red-thick}{1pt red on 2pt frame}{
574 \file{a.py}{}
575 \dir{sub}{}{\file{b.py}{}}
576 }
577 \end{dirtreex}
578 \end{Verbatim}
579
580 \begin{dirtreex}[
581 line color=red!70!black, line width=1pt,
582 box={true, border color=red!80!black,
583 border width=2pt, background color=red!5,
584 margin=6pt}]
585 \dir{red-thick}{1pt red on 2pt frame}{
586 \file{a.py}{}
587 \dir{sub}{}{\file{b.py}{}}
588 }
589 \end{dirtreex}
590
591 \clearpage
592
593 % ============================================================
594 \section{Per-entry overrides}
595 % ============================================================
596
597 \subsection{Line colour override}
598
599 \begin{Verbatim}
600 \begin{dirtreex}
601 \dir{root}{global black}{
602 \file[line color=red]{error.log}{red}
603 \file{normal.txt}{inherits black}
604 \dir[line color=blue]{src}{blue branch}{
605 \file{main.py}{inherits blue}
606 \file[line color=green!60!black]{test.py}{green}
607 }
608 \dir[line color=orange]{build}{orange branch}{
609 \file{output.bin}{inherits orange}
610 }
611 \file[line color=purple]{Makefile}{purple}
612 }
613 \end{dirtreex}
614 \end{Verbatim}
615
616 \begin{dirtreex}
617 \dir{root}{global black}{
618 \file[line color=red]{error.log}{red}
619 \file{normal.txt}{inherits black}
620 \dir[line color=blue]{src}{blue branch}{
621 \file{main.py}{inherits blue}
622 \file[line color=green!60!black]{test.py}{green}
623 }
624 \dir[line color=orange]{build}{orange branch}{
625 \file{output.bin}{inherits orange}
626 }
627 \file[line color=purple]{Makefile}{purple}
628 }
629 \end{dirtreex}
630
631 \subsection{Line width override}
632
633 \begin{Verbatim}
634 \begin{dirtreex}
635 \dir{root}{default 0.4pt}{
636 \file[line width=1.2pt]{important.txt}{1.2pt}
637 \file{normal.txt}{default}
638 \file[line width=0.2pt]{minor.txt}{0.2pt}
639 }
640 \end{dirtreex}
641 \end{Verbatim}
642
643 \begin{dirtreex}
644 \dir{root}{default 0.4pt}{
645 \file[line width=1.2pt]{important.txt}{1.2pt}
646 \file{normal.txt}{default}
647 \file[line width=0.2pt]{minor.txt}{0.2pt}
648 }
649 \end{dirtreex}
650
651 \subsection{Elbow radius override}
652
653 \begin{Verbatim}
654 \begin{dirtreex}[elbow radius=5pt]
655 \dir{root}{global 5pt}{
656 \file{a.txt}{5pt (inherited)}
657 \file[elbow radius=0pt]{b.txt}{sharp (0pt)}
658 \file[elbow radius=10pt]{c.txt}{large (10pt)}
659 \dir[elbow radius=0pt]{sharp-dir}{sharp}{
660 \file{inside.txt}{5pt (inherited)}
661 }
662 }
663 \end{dirtreex}
664 \end{Verbatim}
665
666 \begin{dirtreex}[elbow radius=5pt]
667 \dir{root}{global 5pt}{
668 \file{a.txt}{5pt (inherited)}
669 \file[elbow radius=0pt]{b.txt}{sharp (0pt)}
670 \file[elbow radius=10pt]{c.txt}{large (10pt)}
671 \dir[elbow radius=0pt]{sharp-dir}{sharp}{
672 \file{inside.txt}{5pt (inherited)}
673 }
674 }
675 \end{dirtreex}
676
677 \subsection{Combined overrides (colour + width + elbow)}
678
679 \begin{Verbatim}
680 \begin{dirtreex}[elbow radius=3pt]
681 \dir{project}{root}{
682 \dir[line color=blue]{src}{source}{
683 \file[line color=red, line width=1.2pt]{app.py}{
684 red, 1.2pt%
685 }
686 \file[line color=green!60!black,
687 elbow radius=0pt]{new.py}{green, sharp}
688 }
689 \file[line color=purple, line width=0.8pt,
690 elbow radius=2pt]{Makefile}{
691 purple 0.8pt 2pt%
692 }
693 }
694 \end{dirtreex}
695 \end{Verbatim}
696
697 \begin{dirtreex}[elbow radius=3pt]
698 \dir{project}{root}{
699 \dir[line color=blue]{src}{source}{
700 \file[line color=red, line width=1.2pt]{app.py}{
701 red, 1.2pt%
702 }
703 \file[line color=green!60!black,
704 elbow radius=0pt]{new.py}{green, sharp}
705 }
706 \file[line color=purple, line width=0.8pt,
707 elbow radius=2pt]{Makefile}{
708 purple 0.8pt 2pt%
709 }
710 }
711 \end{dirtreex}
712
713 \clearpage
714
715 % ============================================================
716 \section{Deep nesting}
717 % ============================================================
718
719 \subsection{Six-level tree}
720
721 \begin{Verbatim}
722 \begin{dirtreex}[elbow radius=2pt]
723 \dir{L0}{depth 0}{
724 \dir{L1}{depth 1}{
725 \dir{L2}{depth 2}{
726 \dir{L3}{depth 3}{
727 \dir{L4}{depth 4}{
728 \dir{L5}{depth 5}{
729 \file{leaf.txt}{bottom}
730 }
731 }
732 }
733 }
734 }
735 }
736 \end{dirtreex}
737 \end{Verbatim}
738
739 \begin{dirtreex}[elbow radius=2pt]
740 \dir{L0}{depth 0}{
741 \dir{L1}{depth 1}{
742 \dir{L2}{depth 2}{
743 \dir{L3}{depth 3}{
744 \dir{L4}{depth 4}{
745 \dir{L5}{depth 5}{
746 \file{leaf.txt}{bottom}
747 }
748 }
749 }
750 }
751 }
752 }
753 \end{dirtreex}
754
755 \subsection{Eight-level tree with a shallow sibling}
756
757 Mixing a deep branch and a shallow sibling shows that the per-depth column stride is uniform: every level contributes one connector slot, and the shallow sibling sits at the right offset without any manual spacing.
758
759 \begin{Verbatim}
760 \begin{dirtreex}[elbow radius=2pt]
761 \dir{L0}{depth 0}{
762 \dir{L1}{}{
763 \dir{L2}{}{
764 \dir{L3}{}{
765 \dir{L4}{}{
766 \dir{L5}{}{
767 \dir{L6}{}{
768 \dir{L7}{depth 7}{
769 \file{leaf.txt}{deepest}
770 }
771 }
772 }
773 }
774 }
775 }
776 }
777 \file{shallow.txt}{level-1 sibling}
778 }
779 \end{dirtreex}
780 \end{Verbatim}
781
782 \begin{dirtreex}[elbow radius=2pt]
783 \dir{L0}{depth 0}{
784 \dir{L1}{}{
785 \dir{L2}{}{
786 \dir{L3}{}{
787 \dir{L4}{}{
788 \dir{L5}{}{
789 \dir{L6}{}{
790 \dir{L7}{depth 7}{
791 \file{leaf.txt}{deepest}
792 }
793 }
794 }
795 }
796 }
797 }
798 }
799 \file{shallow.txt}{level-1 sibling}
800 }
801 \end{dirtreex}
802
803 \clearpage
804
805 % ============================================================
806 \section{Multiple trees}
807 % ============================================================
808
809 \subsection{Two trees in sequence}
810
811 \begin{Verbatim}
812 \begin{dirtreex}[box={border color=blue!60!black,
813 background color=blue!5}]
814 \dir{first-tree}{}{
815 \file{a.txt}{}
816 \file{b.txt}{}
817 }
818 \end{dirtreex}
819
820 \bigskip
821
822 \begin{dirtreex}[box={border color=red!60!black,
823 background color=red!5}]
824 \dir{second-tree}{}{
825 \file{x.py}{}
826 \file{y.py}{}
827 }
828 \end{dirtreex}
829 \end{Verbatim}
830
831 \begin{dirtreex}[box={border color=blue!60!black,
832 background color=blue!5}]
833 \dir{first-tree}{}{
834 \file{a.txt}{}
835 \file{b.txt}{}
836 }
837 \end{dirtreex}
838
839 \bigskip
840
841 \begin{dirtreex}[box={border color=red!60!black,
842 background color=red!5}]
843 \dir{second-tree}{}{
844 \file{x.py}{}
845 \file{y.py}{}
846 }
847 \end{dirtreex}
848
849 \clearpage
850
851 % ============================================================
852 \section{Page-break behaviour}
853 % ============================================================
854
855 The examples below all need enough content to overflow onto a second page. They are placed after intentional vertical filler so the tree must split at least once; in real documents the break is driven by whatever natural layout pushes the tree close to a page boundary.
856
857 The black line outlines the content area, while the red and blue lines indicate where the box and directory tree should break, respectively.
858
859 \subsection{Default cross-page rendering}
860
861 \begin{Verbatim}
862 \begin{dirtreex}[
863 box={true, border color=black,
864 background color=white, margin=6pt}]
865 \dir{project}{long tree}{
866 \dir{src}{source code}{
867 \file{a.py}{}\file{b.py}{}\file{c.py}{}
868 \file{d.py}{}\file{e.py}{}\file{f.py}{}
869 \file{g.py}{}\file{h.py}{}\file{i.py}{}
870 \file{j.py}{}
871 }
872 \dir{tests}{test suite}{
873 \file{test-a.py}{}\file{test-b.py}{}
874 \file{test-c.py}{}\file{test-d.py}{}
875 \file{test-e.py}{}
876 }
877 \dir{docs}{documentation}{
878 \file{intro.md}{}\file{api.md}{}
879 \file{tutorial.md}{}\file{changelog.md}{}
880 }
881 \file{Makefile}{}
882 \file{setup.py}{}
883 \file{README.md}{}
884 \file{LICENSE}{}
885 }
886 \end{dirtreex}
887 \end{Verbatim}
888
889 \debugvspace{3cm}
890
891 \debugboxedmarginlower{0cm}{1em}
892 \begin{dirtreex}[
893 box={true, border color=black,
894 background color=white, margin=6pt}]
895 \dir{project}{long tree}{
896 \dir{src}{source code}{
897 \file{a.py}{}\file{b.py}{}\file{c.py}{}
898 \file{d.py}{}\file{e.py}{}\file{f.py}{}
899 \file{g.py}{}\file{h.py}{}\file{i.py}{}
900 \file{j.py}{}
901 }
902 \dir{tests}{test suite}{
903 \file{test-a.py}{}\file{test-b.py}{}
904 \file{test-c.py}{}\file{test-d.py}{}
905 \file{test-e.py}{}
906 }
907 \dir{docs}{documentation}{
908 \file{intro.md}{}\file{api.md}{}
909 \file{tutorial.md}{}\file{changelog.md}{}
910 }
911 \file{Makefile}{}
912 \file{setup.py}{}
913 \file{README.md}{}
914 \file{LICENSE}{}
915 }
916 \end{dirtreex}
917 \debugboxedmarginupper{0pt}{1em}
918
919 \clearpage
920
921 \subsection{Cross-page with rounded elbows and per-entry colours}
922
923 \begin{Verbatim}
924 \begin{dirtreex}[
925 elbow radius=3pt,
926 box={true, corners=4pt, border color=black,
927 background color=white, margin=6pt}]
928 \dir{project}{colour across a page break}{
929 \dir[line color=red]{red-branch}{red}{
930 \file{r1.py}{}\file{r2.py}{}\file{r3.py}{}
931 \file{r4.py}{}\file{r5.py}{}\file{r6.py}{}
932 \file{r7.py}{}\file{r8.py}{}\file{r9.py}{}
933 \file{r10.py}{}
934 }
935 \dir[line color=blue]{blue-branch}{blue}{
936 \file{b1.py}{}\file{b2.py}{}\file{b3.py}{}
937 \file{b4.py}{}\file{b5.py}{}
938 }
939 \dir[line color=green!60!black]{green-branch}{green}{
940 \file{g1.py}{}\file{g2.py}{}\file{g3.py}{}
941 }
942 }
943 \end{dirtreex}
944 \end{Verbatim}
945
946 \debugvspace{12cm}
947
948 \debugboxedmarginlower{0cm}{1em}
949 \begin{dirtreex}[
950 elbow radius=3pt,
951 box={true, corners=4pt, border color=black,
952 background color=white, margin=6pt}]
953 \dir{project}{colour across a page break}{
954 \dir[line color=red]{red-branch}{red}{
955 \file{r1.py}{}\file{r2.py}{}\file{r3.py}{}
956 \file{r4.py}{}\file{r5.py}{}\file{r6.py}{}
957 \file{r7.py}{}\file{r8.py}{}\file{r9.py}{}
958 \file{r10.py}{}
959 }
960 \dir[line color=blue]{blue-branch}{blue}{
961 \file{b1.py}{}\file{b2.py}{}\file{b3.py}{}
962 \file{b4.py}{}\file{b5.py}{}
963 }
964 \dir[line color=green!60!black]{green-branch}{green}{
965 \file{g1.py}{}\file{g2.py}{}\file{g3.py}{}
966 }
967 }
968 \end{dirtreex}
969 \debugboxedmarginupper{0pt}{1em}
970
971 \clearpage
972
973 \subsection{Break offsets (\texttt{box break at} / \texttt{tree break at})}
974
975 \begin{Verbatim}
976 \begin{dirtreex}[
977 box={true, corners=4pt, border color=blue!60!black,
978 background color=blue!5, margin=6pt},
979 pagebreak={true, box break at=1em,
980 tree break at=2em}]
981 \dir{offsets}{box pulls back 4pt, tree pulls back 2pt}{
982 \dir{src}{}{
983 \file{a.py}{}\file{b.py}{}\file{c.py}{}
984 \file{d.py}{}\file{e.py}{}\file{f.py}{}
985 \file{g.py}{}\file{h.py}{}
986 }
987 \dir{docs}{}{
988 \file{x.md}{}\file{y.md}{}\file{z.md}{}
989 }
990 }
991 \end{dirtreex}
992 \end{Verbatim}
993
994 \debugvspace{14cm}
995
996 \debugboxedmarginlower{1em}{2em}
997 \begin{dirtreex}[
998 box={true, corners=4pt, border color=blue!60!black,
999 background color=blue!5, margin=6pt},
1000 pagebreak={true, box break at=1em,
1001 tree break at=2em}]
1002 \dir{offsets}{box pulls back 1em, tree pulls back 2em}{
1003 \dir{src}{}{
1004 \file{a.py}{}\file{b.py}{}\file{c.py}{}
1005 \file{d.py}{}\file{e.py}{}\file{f.py}{}
1006 \file{g.py}{}\file{h.py}{}
1007 }
1008 \dir{docs}{}{
1009 \file{x.md}{}\file{y.md}{}\file{z.md}{}
1010 }
1011 }
1012 \end{dirtreex}
1013 \debugboxedmarginupper{1em}{2em}
1014
1015 \clearpage
1016
1017 \subsection{Asymmetric break offsets (two values)}
1018
1019 \begin{Verbatim}
1020 \begin{dirtreex}[
1021 box={true, corners=4pt, border color=purple!60!black,
1022 background color=purple!5, margin=6pt},
1023 pagebreak={true, box break at={2em, 1em},
1024 tree break at={4em, 3em}}]
1025 \dir{asym}{first-piece-bottom=2em and 4em, next-piece-top=1em and 3em}{
1026 \dir{src}{}{
1027 \file{a.py}{}\file{b.py}{}\file{c.py}{}
1028 \file{d.py}{}\file{e.py}{}\file{f.py}{}
1029 \file{g.py}{}\file{h.py}{}
1030 }
1031 \dir{lib}{}{
1032 \file{x.py}{}\file{y.py}{}
1033 }
1034 }
1035 \end{dirtreex}
1036 \end{Verbatim}
1037
1038 \debugvspace{12cm}
1039
1040 \debugboxedmarginlower{2em}{4em}
1041 \begin{dirtreex}[
1042 box={true, corners=4pt, border color=purple!60!black,
1043 background color=purple!5, margin=6pt},
1044 pagebreak={true, box break at={2em, 1em},
1045 tree break at={4em, 3em}}]
1046 \dir{asym}{first-piece-bottom=2em and 4em, next-piece-top=1em and 3em}{
1047 \dir{src}{}{
1048 \file{a.py}{}\file{b.py}{}\file{c.py}{}
1049 \file{d.py}{}\file{e.py}{}\file{f.py}{}
1050 \file{g.py}{}\file{h.py}{}
1051 }
1052 \dir{lib}{}{
1053 \file{x.py}{}\file{y.py}{}
1054 }
1055 }
1056 \end{dirtreex}
1057 \debugboxedmarginupper{1em}{3em}
1058
1059 \clearpage
1060
1061 \subsection{Bare tree (\texttt{box=false}) across a page break}
1062
1063 With \texttt{box=false} there is no frame to draw, but the tree's own extension columns still need to stay coherent across the break: every active \texttt{|} continues to the page bottom, then resumes at the top of the continuation page so descendants under a parent on the previous page remain visually attached. \texttt{box break at} is ignored when the frame is off (there is no torn edge to pull back).
1064
1065 \begin{Verbatim}
1066 \begin{dirtreex}[box=false]
1067 \dir{bare-cross}{no frame, tree still breaks}{
1068 \dir{src}{}{
1069 \file{a.py}{}\file{b.py}{}\file{c.py}{}
1070 \file{d.py}{}\file{e.py}{}\file{f.py}{}
1071 \file{g.py}{}\file{h.py}{}\file{i.py}{}
1072 }
1073 \dir{tests}{}{
1074 \file{t1.py}{}\file{t2.py}{}\file{t3.py}{}
1075 \file{t4.py}{}
1076 }
1077 \file{README.md}{}\file{LICENSE}{}
1078 }
1079 \end{dirtreex}
1080 \end{Verbatim}
1081
1082 \debugvspace{10cm}
1083
1084 \debugbaremarginlower{0cm}
1085 \begin{dirtreex}[box=false]
1086 \dir{bare-cross}{no frame, tree still breaks}{
1087 \dir{src}{}{
1088 \file{a.py}{}\file{b.py}{}\file{c.py}{}
1089 \file{d.py}{}\file{e.py}{}\file{f.py}{}
1090 \file{g.py}{}\file{h.py}{}\file{i.py}{}
1091 }
1092 \dir{tests}{}{
1093 \file{t1.py}{}\file{t2.py}{}\file{t3.py}{}
1094 \file{t4.py}{}
1095 }
1096 \file{README.md}{}\file{LICENSE}{}
1097 }
1098 \end{dirtreex}
1099 \debugbaremarginupper{0pt}
1100
1101 \clearpage
1102
1103 \subsection{Bare tree with \texttt{tree break at} pull-back}
1104
1105 Even without a frame, \texttt{tree break at} still applies: the tree extension columns retract from the page edge by the configured distance on each side of the break. Setting it asymmetrically lets the bottom of the first piece and the top of the second piece pull back by different amounts.
1106
1107 \begin{Verbatim}
1108 \begin{dirtreex}[
1109 box=false,
1110 pagebreak={true, tree break at={2em, 4em}}]
1111 \dir{bare-pullback}{first-piece-bottom=2em, next-piece-top=4em}{
1112 \dir{src}{}{
1113 \file{a.py}{}\file{b.py}{}\file{c.py}{}
1114 \file{d.py}{}\file{e.py}{}\file{f.py}{}
1115 \file{g.py}{}\file{h.py}{}
1116 }
1117 \dir{docs}{}{
1118 \file{x.md}{}\file{y.md}{}\file{z.md}{}
1119 }
1120 }
1121 \end{dirtreex}
1122 \end{Verbatim}
1123
1124 \debugvspace{12cm}
1125
1126 \debugbaremarginlower{2em}
1127 \begin{dirtreex}[
1128 box=false,
1129 pagebreak={true, tree break at={2em, 4em}}]
1130 \dir{bare-pullback}{first-piece-bottom=2em, next-piece-top=4em}{
1131 \dir{src}{}{
1132 \file{a.py}{}\file{b.py}{}\file{c.py}{}
1133 \file{d.py}{}\file{e.py}{}\file{f.py}{}
1134 \file{g.py}{}\file{h.py}{}
1135 }
1136 \dir{docs}{}{
1137 \file{x.md}{}\file{y.md}{}\file{z.md}{}
1138 }
1139 }
1140 \end{dirtreex}
1141 \debugbaremarginupper{4em}
1142
1143 \clearpage
1144
1145 \subsection{\texttt{pagebreak=false} (tree spills past the page)}
1146
1147 With \texttt{pagebreak=false} the frame refuses to break; a tall tree simply overflows past the page boundary (it is never truncated). This example uses a small filler so the spillover is visible.
1148
1149 \begin{Verbatim}
1150 \begin{dirtreex}[
1151 pagebreak={false},
1152 box={true, border color=black!50,
1153 background color=black!3, margin=6pt}]
1154 \dir{no-break}{overflows past page bottom}{
1155 \file{a.txt}{}\file{b.txt}{}\file{c.txt}{}
1156 \file{d.txt}{}\file{e.txt}{}\file{f.txt}{}
1157 \file{g.txt}{}\file{h.txt}{}\file{i.txt}{}
1158 \file{j.txt}{}
1159 }
1160 \end{dirtreex}
1161 \end{Verbatim}
1162
1163 \debugvspace{14cm}
1164
1165 \begin{dirtreex}[
1166 pagebreak={false},
1167 box={true, border color=black!50,
1168 background color=black!3, margin=6pt}]
1169 \dir{no-break}{overflows past page bottom}{
1170 \file{a.txt}{}\file{b.txt}{}\file{c.txt}{}
1171 \file{d.txt}{}\file{e.txt}{}\file{f.txt}{}
1172 \file{g.txt}{}\file{h.txt}{}\file{i.txt}{}
1173 \file{j.txt}{}
1174 }
1175 \end{dirtreex}
1176
1177 \clearpage
1178
1179 % ============================================================
1180 \section{Multi-page mega-project}
1181 % ============================================================
1182
1183 A realistic tree large enough to span three or more pages. It exercises every cross-page mechanic at once: per-branch colours, nested directory depth, mixed leaf and subtree siblings, and the \texttt{|} extension columns continuing across two consecutive breaks. Each top-level branch carries its own \texttt{line color} override, which the package threads through every active column on every continuation page.
1184
1185 \begin{Verbatim}
1186 \begin{dirtreex}[
1187 fontsize=\small, elbow radius=3pt, line color=black,
1188 box={true, corners=0pt, border color=blue!60,
1189 border width=0.5pt, background color=blue!2,
1190 margin=6pt}]
1191 \dir{mega-project}{mega-project root}{
1192 \dir[line color=blue]{backend}{backend services}{
1193 \dir{api}{API layer}{
1194 \file{server.py}{HTTP server}
1195 \file{middleware.py}{middleware}
1196 \file{auth.py}{authentication}
1197 \file{rate\_limiter.py}{rate limiter}
1198 \dir{routes}{routes}{
1199 \file{users.py}{user routes}
1200 \file{projects.py}{project routes}
1201 \file{tasks.py}{task routes}
1202 \file{reports.py}{report routes}
1203 \file{admin.py}{admin routes}
1204 \file{webhooks.py}{webhook routes}
1205 }
1206 \dir{schemas}{schemas}{
1207 \file{user.py}{user schema}
1208 \file{project.py}{project schema}
1209 \file{task.py}{task schema}
1210 \file{report.py}{report schema}
1211 }
1212 }
1213 \dir{services}{service layer}{
1214 \file{user\_service.py}{user service}
1215 \file{project\_service.py}{project service}
1216 \file{task\_service.py}{task service}
1217 \file{notification\_service.py}{notifications}
1218 \file{email\_service.py}{email service}
1219 \file{cache\_service.py}{cache service}
1220 }
1221 \dir{database}{database layer}{
1222 \file{connection.py}{connection mgmt}
1223 \file{migrations.py}{migrations}
1224 \dir{models}{ORM models}{
1225 \file{user.py}{users table}
1226 \file{project.py}{projects table}
1227 \file{task.py}{tasks table}
1228 \file{audit\_log.py}{audit log table}
1229 }
1230 \dir{repositories}{repositories}{
1231 \file{user\_repo.py}{user repo}
1232 \file{project\_repo.py}{project repo}
1233 \file{task\_repo.py}{task repo}
1234 }
1235 }
1236 \dir{utils}{utilities}{
1237 \file{logger.py}{logging}
1238 \file{config.py}{config}
1239 \file{helpers.py}{helpers}
1240 \file{validators.py}{validators}
1241 \file{crypto.py}{crypto utils}
1242 }
1243 }
1244 \dir[line color=teal]{frontend}{frontend app}{
1245 \dir{src}{source}{
1246 \dir{components}{components}{
1247 \dir{common}{common}{
1248 \file{Button.tsx}{button}
1249 \file{Input.tsx}{input}
1250 \file{Modal.tsx}{modal}
1251 \file{Table.tsx}{table}
1252 \file{Pagination.tsx}{pagination}
1253 \file{Loading.tsx}{loading}
1254 \file{ErrorBoundary.tsx}{error boundary}
1255 }
1256 \dir{layout}{layout}{
1257 \file{Header.tsx}{header}
1258 \file{Sidebar.tsx}{sidebar}
1259 \file{Footer.tsx}{footer}
1260 \file{MainContent.tsx}{main content}
1261 }
1262 \dir{pages}{pages}{
1263 \file{Dashboard.tsx}{dashboard}
1264 \file{ProjectList.tsx}{project list}
1265 \file{ProjectDetail.tsx}{project detail}
1266 \file{TaskBoard.tsx}{task board}
1267 \file{UserProfile.tsx}{user profile}
1268 \file{Settings.tsx}{settings}
1269 \file{Login.tsx}{login}
1270 \file{Register.tsx}{register}
1271 }
1272 }
1273 \dir{hooks}{custom hooks}{
1274 \file{useAuth.ts}{auth hook}
1275 \file{useApi.ts}{api hook}
1276 \file{useWebSocket.ts}{websocket hook}
1277 \file{useLocalStorage.ts}{local storage hook}
1278 }
1279 \dir{stores}{stores}{
1280 \file{authStore.ts}{auth state}
1281 \file{projectStore.ts}{project state}
1282 \file{uiStore.ts}{ui state}
1283 }
1284 \dir{utils}{utilities}{
1285 \file{api.ts}{api client}
1286 \file{format.ts}{format}
1287 \file{validation.ts}{form validation}
1288 }
1289 \file{App.tsx}{app entry}
1290 \file{index.tsx}{render entry}
1291 \file{router.tsx}{router config}
1292 }
1293 \file{package.json}{dependencies}
1294 \file{tsconfig.json}{typescript config}
1295 \file{vite.config.ts}{vite config}
1296 }
1297 \dir[line color=orange]{devops}{devops \& deployment}{
1298 \dir{docker}{docker config}{
1299 \file{Dockerfile.backend}{backend image}
1300 \file{Dockerfile.frontend}{frontend image}
1301 \file{docker-compose.yml}{compose file}
1302 \file{docker-compose.dev.yml}{dev compose}
1303 }
1304 \dir[line color=green]{k8s}{k8s config}{
1305 \file{deployment.yaml}{deployment}
1306 \file{service.yaml}{service}
1307 \file{ingress.yaml}{ingress}
1308 \file{configmap.yaml}{configmap}
1309 \file{secret.yaml}{secret}
1310 \file{hpa.yaml}{horizontal autoscaler}
1311 }
1312 \dir{ci}{CI}{
1313 \file{.gitlab-ci.yml}{gitlab ci}
1314 \file{Jenkinsfile}{jenkins pipeline}
1315 }
1316 \dir{monitoring}{monitoring}{
1317 \file{prometheus.yml}{prometheus config}
1318 \file{grafana-dashboard.json}{grafana dashboard}
1319 \file{alertmanager.yml}{alert rules}
1320 }
1321 }
1322 \file{README.md}{project readme}
1323 \file{LICENSE}{license}
1324 \file{.gitignore}{git ignore rules}
1325 \file{Makefile}{build script}
1326 }
1327 \end{dirtreex}
1328 \end{Verbatim}
1329
1330 \begin{dirtreex}[
1331 fontsize=\small, elbow radius=3pt, line color=black,
1332 box={true, corners=0pt, border color=blue!60,
1333 border width=0.5pt, background color=blue!2,
1334 margin=6pt}]
1335 \dir{mega-project}{mega-project root}{
1336 \dir[line color=blue]{backend}{backend services}{
1337 \dir{api}{API layer}{
1338 \file{server.py}{HTTP server}
1339 \file{middleware.py}{middleware}
1340 \file{auth.py}{authentication}
1341 \file{rate\_limiter.py}{rate limiter}
1342 \dir{routes}{routes}{
1343 \file{users.py}{user routes}
1344 \file{projects.py}{project routes}
1345 \file{tasks.py}{task routes}
1346 \file{reports.py}{report routes}
1347 \file{admin.py}{admin routes}
1348 \file{webhooks.py}{webhook routes}
1349 }
1350 \dir{schemas}{schemas}{
1351 \file{user.py}{user schema}
1352 \file{project.py}{project schema}
1353 \file{task.py}{task schema}
1354 \file{report.py}{report schema}
1355 }
1356 }
1357 \dir{services}{service layer}{
1358 \file{user\_service.py}{user service}
1359 \file{project\_service.py}{project service}
1360 \file{task\_service.py}{task service}
1361 \file{notification\_service.py}{notifications}
1362 \file{email\_service.py}{email service}
1363 \file{cache\_service.py}{cache service}
1364 }
1365 \dir{database}{database layer}{
1366 \file{connection.py}{connection mgmt}
1367 \file{migrations.py}{migrations}
1368 \dir{models}{ORM models}{
1369 \file{user.py}{users table}
1370 \file{project.py}{projects table}
1371 \file{task.py}{tasks table}
1372 \file{audit\_log.py}{audit log table}
1373 }
1374 \dir{repositories}{repositories}{
1375 \file{user\_repo.py}{user repo}
1376 \file{project\_repo.py}{project repo}
1377 \file{task\_repo.py}{task repo}
1378 }
1379 }
1380 \dir{utils}{utilities}{
1381 \file{logger.py}{logging}
1382 \file{config.py}{config}
1383 \file{helpers.py}{helpers}
1384 \file{validators.py}{validators}
1385 \file{crypto.py}{crypto utils}
1386 }
1387 }
1388 \dir[line color=teal]{frontend}{frontend app}{
1389 \dir{src}{source}{
1390 \dir{components}{components}{
1391 \dir{common}{common}{
1392 \file{Button.tsx}{button}
1393 \file{Input.tsx}{input}
1394 \file{Modal.tsx}{modal}
1395 \file{Table.tsx}{table}
1396 \file{Pagination.tsx}{pagination}
1397 \file{Loading.tsx}{loading}
1398 \file{ErrorBoundary.tsx}{error boundary}
1399 }
1400 \dir{layout}{layout}{
1401 \file{Header.tsx}{header}
1402 \file{Sidebar.tsx}{sidebar}
1403 \file{Footer.tsx}{footer}
1404 \file{MainContent.tsx}{main content}
1405 }
1406 \dir{pages}{pages}{
1407 \file{Dashboard.tsx}{dashboard}
1408 \file{ProjectList.tsx}{project list}
1409 \file{ProjectDetail.tsx}{project detail}
1410 \file{TaskBoard.tsx}{task board}
1411 \file{UserProfile.tsx}{user profile}
1412 \file{Settings.tsx}{settings}
1413 \file{Login.tsx}{login}
1414 \file{Register.tsx}{register}
1415 }
1416 }
1417 \dir{hooks}{custom hooks}{
1418 \file{useAuth.ts}{auth hook}
1419 \file{useApi.ts}{api hook}
1420 \file{useWebSocket.ts}{websocket hook}
1421 \file{useLocalStorage.ts}{local storage hook}
1422 }
1423 \dir{stores}{stores}{
1424 \file{authStore.ts}{auth state}
1425 \file{projectStore.ts}{project state}
1426 \file{uiStore.ts}{ui state}
1427 }
1428 \dir{utils}{utilities}{
1429 \file{api.ts}{api client}
1430 \file{format.ts}{format}
1431 \file{validation.ts}{form validation}
1432 }
1433 \file{App.tsx}{app entry}
1434 \file{index.tsx}{render entry}
1435 \file{router.tsx}{router config}
1436 }
1437 \file{package.json}{dependencies}
1438 \file{tsconfig.json}{typescript config}
1439 \file{vite.config.ts}{vite config}
1440 }
1441 \dir[line color=orange]{devops}{devops \& deployment}{
1442 \dir{docker}{docker config}{
1443 \file{Dockerfile.backend}{backend image}
1444 \file{Dockerfile.frontend}{frontend image}
1445 \file{docker-compose.yml}{compose file}
1446 \file{docker-compose.dev.yml}{dev compose}
1447 }
1448 \dir[line color=green]{k8s}{k8s config}{
1449 \file{deployment.yaml}{deployment}
1450 \file{service.yaml}{service}
1451 \file{ingress.yaml}{ingress}
1452 \file{configmap.yaml}{configmap}
1453 \file{secret.yaml}{secret}
1454 \file{hpa.yaml}{horizontal autoscaler}
1455 }
1456 \dir{ci}{CI}{
1457 \file{.gitlab-ci.yml}{gitlab ci}
1458 \file{Jenkinsfile}{jenkins pipeline}
1459 }
1460 \dir{monitoring}{monitoring}{
1461 \file{prometheus.yml}{prometheus config}
1462 \file{grafana-dashboard.json}{grafana dashboard}
1463 \file{alertmanager.yml}{alert rules}
1464 }
1465 }
1466 \file{README.md}{project readme}
1467 \file{LICENSE}{license}
1468 \file{.gitignore}{git ignore rules}
1469 \file{Makefile}{build script}
1470 }
1471 \end{dirtreex}
1472
1473 \end{document}