doql 0.0.1__tar.gz

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.
Files changed (88) hide show
  1. doql-0.0.1/LICENSE +26 -0
  2. doql-0.0.1/PKG-INFO +252 -0
  3. doql-0.0.1/README.md +204 -0
  4. doql-0.0.1/doql/__init__.py +7 -0
  5. doql-0.0.1/doql/cli/__init__.py +19 -0
  6. doql-0.0.1/doql/cli/build.py +159 -0
  7. doql-0.0.1/doql/cli/commands/__init__.py +38 -0
  8. doql-0.0.1/doql/cli/commands/deploy.py +25 -0
  9. doql-0.0.1/doql/cli/commands/docs.py +21 -0
  10. doql-0.0.1/doql/cli/commands/export.py +36 -0
  11. doql-0.0.1/doql/cli/commands/generate.py +34 -0
  12. doql-0.0.1/doql/cli/commands/init.py +43 -0
  13. doql-0.0.1/doql/cli/commands/kiosk.py +20 -0
  14. doql-0.0.1/doql/cli/commands/plan.py +115 -0
  15. doql-0.0.1/doql/cli/commands/quadlet.py +22 -0
  16. doql-0.0.1/doql/cli/commands/query.py +31 -0
  17. doql-0.0.1/doql/cli/commands/render.py +26 -0
  18. doql-0.0.1/doql/cli/commands/run.py +25 -0
  19. doql-0.0.1/doql/cli/commands/validate.py +43 -0
  20. doql-0.0.1/doql/cli/context.py +60 -0
  21. doql-0.0.1/doql/cli/lockfile.py +88 -0
  22. doql-0.0.1/doql/cli/main.py +117 -0
  23. doql-0.0.1/doql/cli/sync.py +210 -0
  24. doql-0.0.1/doql/cli.py +62 -0
  25. doql-0.0.1/doql/generators/__init__.py +5 -0
  26. doql-0.0.1/doql/generators/api_gen/__init__.py +167 -0
  27. doql-0.0.1/doql/generators/api_gen/alembic.py +154 -0
  28. doql-0.0.1/doql/generators/api_gen/auth.py +141 -0
  29. doql-0.0.1/doql/generators/api_gen/common.py +79 -0
  30. doql-0.0.1/doql/generators/api_gen/database.py +35 -0
  31. doql-0.0.1/doql/generators/api_gen/main.py +74 -0
  32. doql-0.0.1/doql/generators/api_gen/models.py +82 -0
  33. doql-0.0.1/doql/generators/api_gen/routes.py +115 -0
  34. doql-0.0.1/doql/generators/api_gen/schemas.py +83 -0
  35. doql-0.0.1/doql/generators/api_gen.py +25 -0
  36. doql-0.0.1/doql/generators/ci_gen.py +112 -0
  37. doql-0.0.1/doql/generators/deploy.py +20 -0
  38. doql-0.0.1/doql/generators/desktop_gen.py +209 -0
  39. doql-0.0.1/doql/generators/docs_gen.py +24 -0
  40. doql-0.0.1/doql/generators/document_gen.py +182 -0
  41. doql-0.0.1/doql/generators/export_postman.py +25 -0
  42. doql-0.0.1/doql/generators/export_ts_sdk.py +26 -0
  43. doql-0.0.1/doql/generators/i18n_gen.py +168 -0
  44. doql-0.0.1/doql/generators/infra_gen.py +321 -0
  45. doql-0.0.1/doql/generators/integrations_gen.py +320 -0
  46. doql-0.0.1/doql/generators/mobile_gen.py +462 -0
  47. doql-0.0.1/doql/generators/report_gen.py +142 -0
  48. doql-0.0.1/doql/generators/web_gen/__init__.py +176 -0
  49. doql-0.0.1/doql/generators/web_gen/common.py +9 -0
  50. doql-0.0.1/doql/generators/web_gen/components.py +76 -0
  51. doql-0.0.1/doql/generators/web_gen/config.py +122 -0
  52. doql-0.0.1/doql/generators/web_gen/core.py +57 -0
  53. doql-0.0.1/doql/generators/web_gen/pages.py +163 -0
  54. doql-0.0.1/doql/generators/web_gen/pwa.py +109 -0
  55. doql-0.0.1/doql/generators/web_gen/router.py +43 -0
  56. doql-0.0.1/doql/generators/web_gen.py +34 -0
  57. doql-0.0.1/doql/generators/workflow_gen.py +304 -0
  58. doql-0.0.1/doql/lsp_server.py +364 -0
  59. doql-0.0.1/doql/parser.py +70 -0
  60. doql-0.0.1/doql/parsers/__init__.py +117 -0
  61. doql-0.0.1/doql/parsers/blocks.py +50 -0
  62. doql-0.0.1/doql/parsers/extractors.py +191 -0
  63. doql-0.0.1/doql/parsers/models.py +207 -0
  64. doql-0.0.1/doql/parsers/registry.py +267 -0
  65. doql-0.0.1/doql/parsers/validators.py +138 -0
  66. doql-0.0.1/doql/plugins.py +101 -0
  67. doql-0.0.1/doql/scaffolds/calibration-lab/.env.example +19 -0
  68. doql-0.0.1/doql/scaffolds/calibration-lab/app.doql +135 -0
  69. doql-0.0.1/doql/scaffolds/iot-fleet/.env.example +21 -0
  70. doql-0.0.1/doql/scaffolds/iot-fleet/app.doql +99 -0
  71. doql-0.0.1/doql/scaffolds/minimal/.env.example +8 -0
  72. doql-0.0.1/doql/scaffolds/minimal/app.doql +35 -0
  73. doql-0.0.1/doql/scaffolds/saas-multi-tenant/.env.example +22 -0
  74. doql-0.0.1/doql/scaffolds/saas-multi-tenant/app.doql +97 -0
  75. doql-0.0.1/doql/utils/__init__.py +6 -0
  76. doql-0.0.1/doql/utils/naming.py +37 -0
  77. doql-0.0.1/doql.egg-info/PKG-INFO +252 -0
  78. doql-0.0.1/doql.egg-info/SOURCES.txt +86 -0
  79. doql-0.0.1/doql.egg-info/dependency_links.txt +1 -0
  80. doql-0.0.1/doql.egg-info/entry_points.txt +3 -0
  81. doql-0.0.1/doql.egg-info/requires.txt +27 -0
  82. doql-0.0.1/doql.egg-info/top_level.txt +1 -0
  83. doql-0.0.1/pyproject.toml +123 -0
  84. doql-0.0.1/setup.cfg +4 -0
  85. doql-0.0.1/tests/test_generators.py +116 -0
  86. doql-0.0.1/tests/test_lsp.py +59 -0
  87. doql-0.0.1/tests/test_parser.py +173 -0
  88. doql-0.0.1/tests/test_plugins.py +118 -0
doql-0.0.1/LICENSE ADDED
@@ -0,0 +1,26 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ Copyright 2026 Softreck
6
+
7
+ Licensed under the Apache License, Version 2.0 (the "License");
8
+ you may not use this file except in compliance with the License.
9
+ You may obtain a copy of the License at
10
+
11
+ http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ Unless required by applicable law or agreed to in writing, software
14
+ distributed under the License is distributed on an "AS IS" BASIS,
15
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ See the License for the specific language governing permissions and
17
+ limitations under the License.
18
+
19
+ Full license text: https://www.apache.org/licenses/LICENSE-2.0.txt
20
+
21
+ ---
22
+
23
+ Note: This Apache 2.0 license covers the `doql` open-core components.
24
+ Premium plugins (doql-plugin-gxp, doql-plugin-iso17025, doql-plugin-fleet)
25
+ and enterprise/SaaS hosting are distributed under separate commercial
26
+ terms — see https://doql.dev/pricing for details.
doql-0.0.1/PKG-INFO ADDED
@@ -0,0 +1,252 @@
1
+ Metadata-Version: 2.4
2
+ Name: doql
3
+ Version: 0.0.1
4
+ Summary: Declarative OQL — build complete applications from a single .doql file
5
+ Author-email: Softreck <hello@softreck.dev>, Tom Sapletta <tom@sapletta.com>
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/softreck/doql
8
+ Project-URL: Documentation, https://doql.dev
9
+ Project-URL: Repository, https://github.com/softreck/doql
10
+ Project-URL: Issues, https://github.com/softreck/doql/issues
11
+ Project-URL: Changelog, https://github.com/softreck/doql/blob/main/CHANGELOG.md
12
+ Keywords: dsl,code-generation,oqlos,low-code,saas,asset-management
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Topic :: Software Development :: Code Generators
20
+ Requires-Python: >=3.10
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: click>=8.1
24
+ Requires-Dist: pydantic>=2.0
25
+ Requires-Dist: pyyaml>=6.0
26
+ Requires-Dist: jinja2>=3.1
27
+ Requires-Dist: rich>=13.0
28
+ Requires-Dist: httpx>=0.25
29
+ Requires-Dist: goal>=2.1.0
30
+ Requires-Dist: costs>=0.1.20
31
+ Requires-Dist: pfix>=0.1.60
32
+ Provides-Extra: dev
33
+ Requires-Dist: pytest>=7.4; extra == "dev"
34
+ Requires-Dist: pytest-asyncio; extra == "dev"
35
+ Requires-Dist: ruff; extra == "dev"
36
+ Requires-Dist: mypy; extra == "dev"
37
+ Requires-Dist: goal>=2.1.0; extra == "dev"
38
+ Requires-Dist: costs>=0.1.20; extra == "dev"
39
+ Requires-Dist: pfix>=0.1.60; extra == "dev"
40
+ Provides-Extra: api
41
+ Requires-Dist: fastapi>=0.104; extra == "api"
42
+ Requires-Dist: sqlalchemy>=2.0; extra == "api"
43
+ Requires-Dist: alembic>=1.13; extra == "api"
44
+ Provides-Extra: lsp
45
+ Requires-Dist: pygls>=1.3; extra == "lsp"
46
+ Requires-Dist: lsprotocol>=2023.0.1; extra == "lsp"
47
+ Dynamic: license-file
48
+
49
+ # Rodzina OQL — paczka kompletna
50
+
51
+
52
+ ## AI Cost Tracking
53
+
54
+ ![PyPI](https://img.shields.io/badge/pypi-costs-blue) ![Version](https://img.shields.io/badge/version-0.0.1-blue) ![Python](https://img.shields.io/badge/python-3.9+-blue) ![License](https://img.shields.io/badge/license-Apache--2.0-green)
55
+ ![AI Cost](https://img.shields.io/badge/AI%20Cost-$0.75-orange) ![Human Time](https://img.shields.io/badge/Human%20Time-8.7h-blue) ![Model](https://img.shields.io/badge/Model-openrouter%2Fqwen%2Fqwen3--coder--next-lightgrey)
56
+
57
+ - šŸ¤– **LLM usage:** $0.7500 (5 commits)
58
+ - šŸ‘¤ **Human dev:** ~$871 (8.7h @ $100/h, 30min dedup)
59
+
60
+ Generated on 2026-04-17 using [openrouter/qwen/qwen3-coder-next](https://openrouter.ai/qwen/qwen3-coder-next)
61
+
62
+ ---
63
+
64
+ **Data wydania:** 2026-04-16
65
+ **Zawartość:** repo `doql/` + repo `articles/` + ten README
66
+
67
+ ---
68
+
69
+ ## Co jest w tej paczce
70
+
71
+ ### `doql/` — nowy projekt: generator deklaratywny
72
+ Kompletny projekt **doql** — warstwa deklaratywna nad `oqlos`, która z jednego pliku `.doql` generuje aplikacje, dokumenty, kioski, integracje API. Licencja Apache 2.0 (open core).
73
+
74
+ **Kluczowe dokumenty:**
75
+ - `README.md` — wprowadzenie, quick start, link do wszystkich sekcji
76
+ - `SPEC.md` — pełna specyfikacja języka v0.2 (16 sekcji, wszystkie typy artefaktów)
77
+ - `GLOSSARY.md` — **jednoznaczna semantyka OQL / DOQL / IQL** (niezbędne, jeśli komunikujesz projekt publicznie)
78
+ - `OQLOS-REQUIREMENTS.md` — lista zmian w oqlos (8 wymagań: 5 krytycznych, 3 dodane przy v0.2)
79
+ - `ROADMAP.md` — fazy 0-3 rozwoju, ~8 tygodni do produkcji
80
+ - `CHANGELOG.md` — historia wersji v0.1 i v0.2
81
+
82
+ **Pięć przykładów (gotowych `.doql`):**
83
+ - `examples/asset-management/` — klon DrƤgerware, pełen SaaS dla BHP
84
+ - `examples/calibration-lab/` — laboratorium ISO 17025 z 4-eyes i WORM
85
+ - `examples/iot-fleet/` — flota RPi z OTA canary i Prometheus
86
+ - `examples/document-generator/` — **nowy w v0.2** — tylko generator PDF bez backendu
87
+ - `examples/kiosk-station/` — **nowy w v0.2** — stanowisko operatora na tablecie
88
+
89
+ **Infrastruktura projektu:**
90
+ - `pyproject.toml` — pakowanie Python
91
+ - `doql/cli.py` — szkielet CLI z komendami init/validate/plan/build/run/deploy/sync/export/generate/render/query/kiosk/quadlet/docs
92
+ - `doql/scaffolds/minimal/` — szablon dla `doql init`
93
+ - `LICENSE` (Apache 2.0)
94
+ - `.gitignore`
95
+
96
+ ### `articles/` — artykuły WordPress
97
+ Sześć artykułów markdown z YAML front-matter gotowych do publikacji (kompatybilne z `wp-cli` i WordPress REST API). Każdy artykuł to jeden projekt / jedna nowość.
98
+
99
+ **Lista:**
100
+ 1. `01-oqlos-status-2026-q2.md` — status oqlos po refaktorze (CCĢ„ 3,7→3,2)
101
+ 2. `02-testql-status-2026-q2.md` — TestQL, porównanie z Playwright
102
+ 3. `03-saas-www-status-2026-q2.md` — SaaS oqlos.com, 5 bugów P0, diagnoza landingu
103
+ 4. `04-doql-ogloszenie.md` — ogłoszenie doql v0.1 (SaaS generator)
104
+ 5. `05-wizja-ekosystemu-oqlos.md` — wizja całej rodziny (4 warstwy, strategia open-core)
105
+ 6. `06-doql-v02-dokumenty-kiosk.md` — doql v0.2 (dokumenty, kiosk, semantyka)
106
+
107
+ Każdy 800-1800 słów, po polsku, gotowy do kopiuj-wklej do WordPressa.
108
+
109
+ ---
110
+
111
+ ## Jak to odpalić
112
+
113
+ ### Instalacja doql (po sklonowaniu do repo)
114
+
115
+ ```bash
116
+ cd doql/
117
+ pip install -e .
118
+ doql --version
119
+ ```
120
+
121
+ ### Szybki test — generator PDF
122
+
123
+ ```bash
124
+ doql init --template document-generator my-lab
125
+ cd my-lab
126
+ cp .env.example .env
127
+ doql validate
128
+ doql plan
129
+ ```
130
+
131
+ ### Szybki start z CLI shell
132
+
133
+ Użyj skryptu `doql.sh` do generowania i uruchamiania aplikacji jedną komendą:
134
+
135
+ ```bash
136
+ # Generuj i uruchom desktop app
137
+ ./doql.sh examples/notes-app/app.doql desktop
138
+
139
+ # Generuj i uruchom web
140
+ ./doql.sh examples/notes-app/app.doql web
141
+
142
+ # Generuj i uruchom API
143
+ ./doql.sh examples/notes-app/app.doql api
144
+
145
+ # Generuj wszystko
146
+ ./doql.sh examples/notes-app/app.doql all
147
+ ```
148
+
149
+ CLI shell automatycznie:
150
+ - Waliduje specyfikację
151
+ - Planuje generację
152
+ - Generuje wszystkie artefakty
153
+ - Uruchamia aplikację (desktop/web/api)
154
+
155
+ ### Publikacja artykułów
156
+
157
+ Opcja A — ręcznie do WP (najprostsze):
158
+ 1. Skopiuj treść pliku `.md` bez front-matter
159
+ 2. Wklej w edytorze WordPress (tryb Markdown jeśli masz plugin)
160
+ 3. Tytuł, slug, kategorie, tagi z YAML front-matter
161
+
162
+ Opcja B — `wp-cli`:
163
+ ```bash
164
+ for file in articles/*.md; do
165
+ # yq wyciąga pola z front-matter, sed wycina YAML z body
166
+ title=$(yq -r '.title' "$file")
167
+ slug=$(yq -r '.slug' "$file")
168
+ body=$(sed '/^---$/,/^---$/d' "$file")
169
+ wp post create --post_title="$title" --post_name="$slug" \
170
+ --post_content="$body" --post_status=publish
171
+ done
172
+ ```
173
+
174
+ Opcja C — GitHub Action z WP REST API (plik `.github/workflows/publish.yml` — nie dołączony, łatwo dopisać).
175
+
176
+ ---
177
+
178
+ ## Architektura — jak się to wszystko łączy
179
+
180
+ ```
181
+ ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
182
+ │ doql file (.doql) │
183
+ │ deklaracja CO ma powstać │
184
+ ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
185
+ │ doql build
186
+ ā–¼
187
+ ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
188
+ ā–¼ ā–¼ ā–¼ ā–¼
189
+ ā”Œā”€ā”€ā”€ā”€ā” ā”Œā”€ā”€ā”€ā”€ā” ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā” ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā” ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
190
+ │API │ │Web │ │ Mobile/ │ │Kiosk │ │Documents │
191
+ │ │ │ │ │ Desktop │ │ │ │PDF/HTML │
192
+ ā””ā”€ā”¬ā”€ā”€ā”˜ ā””ā”€ā”€ā”€ā”€ā”˜ ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜ ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜ ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
193
+ │
194
+ │ wywołuje scenariusze .oql
195
+ ā–¼
196
+ ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
197
+ │ oqlos runtime (interpretuje .oql) │
198
+ ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
199
+ │ Modbus / MQTT / USB / GPIO
200
+ ā–¼
201
+ ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
202
+ │ Hardware │
203
+ ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
204
+ ```
205
+
206
+ Testy aplikacji (`.iql`) → testql → Playwright-alternative z integracją hardware.
207
+
208
+ ---
209
+
210
+ ## Co dalej
211
+
212
+ **Tydzień 1 (najpilniejsze):**
213
+ - Naprawić 5 bugów P0 w www (szczegóły w artykule 03)
214
+ - Uzupełnić `en.json` i dodać `de.json` (targi w Niemczech)
215
+ - Dokończyć parser `.doql` v0.2
216
+
217
+ **Tydzień 2-4:**
218
+ - Publikować artykuły 01-06 w sekwencji
219
+ - Zaimplementować 3 krytyczne wymagania oqlos dla doql
220
+ - Pierwszy pilot klient dla doql (rozmowy wstępne toczą się)
221
+
222
+ **Miesiąc 2-3:**
223
+ - Faza 1 doql MVP — pełny generator
224
+ - Wdrożenie pilotażowe (lab kalibracyjny w Gdańsku)
225
+ - Przygotowanie prezentacji na targi w Niemczech
226
+
227
+ **Q3-Q4:**
228
+ - Marketplace szablonów `.doql`
229
+ - Premium plugins (GxP, ISO 17025, Fleet)
230
+ - Walidacja drugiego segmentu ICP (pharma / medtech)
231
+
232
+ ---
233
+
234
+ ## Licencja
235
+
236
+ - **doql** i wszystkie jego przykłady — Apache 2.0
237
+ - **articles** — CC BY 4.0 (można cytować i tłumaczyć z atrybucją)
238
+
239
+ Premium plugins doql (komercyjne) — osobne warunki, patrz `doql/LICENSE`.
240
+
241
+ ---
242
+
243
+ ## Kontakt
244
+
245
+ - Repo główne: github.com/softreck/oqlos
246
+ - Repo doql: github.com/softreck/doql
247
+ - Email: hello@softreck.dev
248
+
249
+
250
+ ## License
251
+
252
+ Licensed under Apache-2.0.
doql-0.0.1/README.md ADDED
@@ -0,0 +1,204 @@
1
+ # Rodzina OQL — paczka kompletna
2
+
3
+
4
+ ## AI Cost Tracking
5
+
6
+ ![PyPI](https://img.shields.io/badge/pypi-costs-blue) ![Version](https://img.shields.io/badge/version-0.0.1-blue) ![Python](https://img.shields.io/badge/python-3.9+-blue) ![License](https://img.shields.io/badge/license-Apache--2.0-green)
7
+ ![AI Cost](https://img.shields.io/badge/AI%20Cost-$0.75-orange) ![Human Time](https://img.shields.io/badge/Human%20Time-8.7h-blue) ![Model](https://img.shields.io/badge/Model-openrouter%2Fqwen%2Fqwen3--coder--next-lightgrey)
8
+
9
+ - šŸ¤– **LLM usage:** $0.7500 (5 commits)
10
+ - šŸ‘¤ **Human dev:** ~$871 (8.7h @ $100/h, 30min dedup)
11
+
12
+ Generated on 2026-04-17 using [openrouter/qwen/qwen3-coder-next](https://openrouter.ai/qwen/qwen3-coder-next)
13
+
14
+ ---
15
+
16
+ **Data wydania:** 2026-04-16
17
+ **Zawartość:** repo `doql/` + repo `articles/` + ten README
18
+
19
+ ---
20
+
21
+ ## Co jest w tej paczce
22
+
23
+ ### `doql/` — nowy projekt: generator deklaratywny
24
+ Kompletny projekt **doql** — warstwa deklaratywna nad `oqlos`, która z jednego pliku `.doql` generuje aplikacje, dokumenty, kioski, integracje API. Licencja Apache 2.0 (open core).
25
+
26
+ **Kluczowe dokumenty:**
27
+ - `README.md` — wprowadzenie, quick start, link do wszystkich sekcji
28
+ - `SPEC.md` — pełna specyfikacja języka v0.2 (16 sekcji, wszystkie typy artefaktów)
29
+ - `GLOSSARY.md` — **jednoznaczna semantyka OQL / DOQL / IQL** (niezbędne, jeśli komunikujesz projekt publicznie)
30
+ - `OQLOS-REQUIREMENTS.md` — lista zmian w oqlos (8 wymagań: 5 krytycznych, 3 dodane przy v0.2)
31
+ - `ROADMAP.md` — fazy 0-3 rozwoju, ~8 tygodni do produkcji
32
+ - `CHANGELOG.md` — historia wersji v0.1 i v0.2
33
+
34
+ **Pięć przykładów (gotowych `.doql`):**
35
+ - `examples/asset-management/` — klon DrƤgerware, pełen SaaS dla BHP
36
+ - `examples/calibration-lab/` — laboratorium ISO 17025 z 4-eyes i WORM
37
+ - `examples/iot-fleet/` — flota RPi z OTA canary i Prometheus
38
+ - `examples/document-generator/` — **nowy w v0.2** — tylko generator PDF bez backendu
39
+ - `examples/kiosk-station/` — **nowy w v0.2** — stanowisko operatora na tablecie
40
+
41
+ **Infrastruktura projektu:**
42
+ - `pyproject.toml` — pakowanie Python
43
+ - `doql/cli.py` — szkielet CLI z komendami init/validate/plan/build/run/deploy/sync/export/generate/render/query/kiosk/quadlet/docs
44
+ - `doql/scaffolds/minimal/` — szablon dla `doql init`
45
+ - `LICENSE` (Apache 2.0)
46
+ - `.gitignore`
47
+
48
+ ### `articles/` — artykuły WordPress
49
+ Sześć artykułów markdown z YAML front-matter gotowych do publikacji (kompatybilne z `wp-cli` i WordPress REST API). Każdy artykuł to jeden projekt / jedna nowość.
50
+
51
+ **Lista:**
52
+ 1. `01-oqlos-status-2026-q2.md` — status oqlos po refaktorze (CCĢ„ 3,7→3,2)
53
+ 2. `02-testql-status-2026-q2.md` — TestQL, porównanie z Playwright
54
+ 3. `03-saas-www-status-2026-q2.md` — SaaS oqlos.com, 5 bugów P0, diagnoza landingu
55
+ 4. `04-doql-ogloszenie.md` — ogłoszenie doql v0.1 (SaaS generator)
56
+ 5. `05-wizja-ekosystemu-oqlos.md` — wizja całej rodziny (4 warstwy, strategia open-core)
57
+ 6. `06-doql-v02-dokumenty-kiosk.md` — doql v0.2 (dokumenty, kiosk, semantyka)
58
+
59
+ Każdy 800-1800 słów, po polsku, gotowy do kopiuj-wklej do WordPressa.
60
+
61
+ ---
62
+
63
+ ## Jak to odpalić
64
+
65
+ ### Instalacja doql (po sklonowaniu do repo)
66
+
67
+ ```bash
68
+ cd doql/
69
+ pip install -e .
70
+ doql --version
71
+ ```
72
+
73
+ ### Szybki test — generator PDF
74
+
75
+ ```bash
76
+ doql init --template document-generator my-lab
77
+ cd my-lab
78
+ cp .env.example .env
79
+ doql validate
80
+ doql plan
81
+ ```
82
+
83
+ ### Szybki start z CLI shell
84
+
85
+ Użyj skryptu `doql.sh` do generowania i uruchamiania aplikacji jedną komendą:
86
+
87
+ ```bash
88
+ # Generuj i uruchom desktop app
89
+ ./doql.sh examples/notes-app/app.doql desktop
90
+
91
+ # Generuj i uruchom web
92
+ ./doql.sh examples/notes-app/app.doql web
93
+
94
+ # Generuj i uruchom API
95
+ ./doql.sh examples/notes-app/app.doql api
96
+
97
+ # Generuj wszystko
98
+ ./doql.sh examples/notes-app/app.doql all
99
+ ```
100
+
101
+ CLI shell automatycznie:
102
+ - Waliduje specyfikację
103
+ - Planuje generację
104
+ - Generuje wszystkie artefakty
105
+ - Uruchamia aplikację (desktop/web/api)
106
+
107
+ ### Publikacja artykułów
108
+
109
+ Opcja A — ręcznie do WP (najprostsze):
110
+ 1. Skopiuj treść pliku `.md` bez front-matter
111
+ 2. Wklej w edytorze WordPress (tryb Markdown jeśli masz plugin)
112
+ 3. Tytuł, slug, kategorie, tagi z YAML front-matter
113
+
114
+ Opcja B — `wp-cli`:
115
+ ```bash
116
+ for file in articles/*.md; do
117
+ # yq wyciąga pola z front-matter, sed wycina YAML z body
118
+ title=$(yq -r '.title' "$file")
119
+ slug=$(yq -r '.slug' "$file")
120
+ body=$(sed '/^---$/,/^---$/d' "$file")
121
+ wp post create --post_title="$title" --post_name="$slug" \
122
+ --post_content="$body" --post_status=publish
123
+ done
124
+ ```
125
+
126
+ Opcja C — GitHub Action z WP REST API (plik `.github/workflows/publish.yml` — nie dołączony, łatwo dopisać).
127
+
128
+ ---
129
+
130
+ ## Architektura — jak się to wszystko łączy
131
+
132
+ ```
133
+ ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
134
+ │ doql file (.doql) │
135
+ │ deklaracja CO ma powstać │
136
+ ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
137
+ │ doql build
138
+ ā–¼
139
+ ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
140
+ ā–¼ ā–¼ ā–¼ ā–¼
141
+ ā”Œā”€ā”€ā”€ā”€ā” ā”Œā”€ā”€ā”€ā”€ā” ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā” ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā” ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
142
+ │API │ │Web │ │ Mobile/ │ │Kiosk │ │Documents │
143
+ │ │ │ │ │ Desktop │ │ │ │PDF/HTML │
144
+ ā””ā”€ā”¬ā”€ā”€ā”˜ ā””ā”€ā”€ā”€ā”€ā”˜ ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜ ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜ ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
145
+ │
146
+ │ wywołuje scenariusze .oql
147
+ ā–¼
148
+ ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
149
+ │ oqlos runtime (interpretuje .oql) │
150
+ ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
151
+ │ Modbus / MQTT / USB / GPIO
152
+ ā–¼
153
+ ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
154
+ │ Hardware │
155
+ ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
156
+ ```
157
+
158
+ Testy aplikacji (`.iql`) → testql → Playwright-alternative z integracją hardware.
159
+
160
+ ---
161
+
162
+ ## Co dalej
163
+
164
+ **Tydzień 1 (najpilniejsze):**
165
+ - Naprawić 5 bugów P0 w www (szczegóły w artykule 03)
166
+ - Uzupełnić `en.json` i dodać `de.json` (targi w Niemczech)
167
+ - Dokończyć parser `.doql` v0.2
168
+
169
+ **Tydzień 2-4:**
170
+ - Publikować artykuły 01-06 w sekwencji
171
+ - Zaimplementować 3 krytyczne wymagania oqlos dla doql
172
+ - Pierwszy pilot klient dla doql (rozmowy wstępne toczą się)
173
+
174
+ **Miesiąc 2-3:**
175
+ - Faza 1 doql MVP — pełny generator
176
+ - Wdrożenie pilotażowe (lab kalibracyjny w Gdańsku)
177
+ - Przygotowanie prezentacji na targi w Niemczech
178
+
179
+ **Q3-Q4:**
180
+ - Marketplace szablonów `.doql`
181
+ - Premium plugins (GxP, ISO 17025, Fleet)
182
+ - Walidacja drugiego segmentu ICP (pharma / medtech)
183
+
184
+ ---
185
+
186
+ ## Licencja
187
+
188
+ - **doql** i wszystkie jego przykłady — Apache 2.0
189
+ - **articles** — CC BY 4.0 (można cytować i tłumaczyć z atrybucją)
190
+
191
+ Premium plugins doql (komercyjne) — osobne warunki, patrz `doql/LICENSE`.
192
+
193
+ ---
194
+
195
+ ## Kontakt
196
+
197
+ - Repo główne: github.com/softreck/oqlos
198
+ - Repo doql: github.com/softreck/doql
199
+ - Email: hello@softreck.dev
200
+
201
+
202
+ ## License
203
+
204
+ Licensed under Apache-2.0.
@@ -0,0 +1,7 @@
1
+ """doql — Declarative OQL.
2
+
3
+ Build complete applications, documents, kiosks, and API integrations
4
+ from a single .doql declaration file.
5
+ """
6
+
7
+ __version__ = "0.1.0a1"
@@ -0,0 +1,19 @@
1
+ """doql CLI package — modularized command-line interface."""
2
+ from __future__ import annotations
3
+
4
+ from .context import BuildContext, build_context, load_spec, scaffold_from_template, estimate_file_count
5
+ from .lockfile import read_lockfile, write_lockfile, diff_sections, spec_section_hashes
6
+ from .main import main
7
+
8
+ __all__ = [
9
+ "BuildContext",
10
+ "build_context",
11
+ "load_spec",
12
+ "scaffold_from_template",
13
+ "estimate_file_count",
14
+ "read_lockfile",
15
+ "write_lockfile",
16
+ "diff_sections",
17
+ "spec_section_hashes",
18
+ "main",
19
+ ]
@@ -0,0 +1,159 @@
1
+ """Full build logic for the build command.
2
+
3
+ This module handles complete rebuilds by running all applicable generators.
4
+ """
5
+ from __future__ import annotations
6
+
7
+ import sys
8
+ import argparse
9
+
10
+ from .. import parser as doql_parser
11
+ from ..generators import api_gen, web_gen, mobile_gen, desktop_gen, infra_gen, document_gen, report_gen, i18n_gen, integrations_gen, workflow_gen, ci_gen
12
+ from .. import plugins as _plugins
13
+ from .context import BuildContext, load_spec
14
+ from .lockfile import write_lockfile
15
+
16
+
17
+ def should_generate_interface(name: str, spec) -> bool:
18
+ """Check if interface should be generated.
19
+
20
+ Args:
21
+ name: Interface name (api, web, mobile, desktop, infra)
22
+ spec: Parsed DoqlSpec
23
+
24
+ Returns:
25
+ True if interface should be generated
26
+ """
27
+ if name == "infra":
28
+ return True
29
+ return any(i.name == name for i in spec.interfaces)
30
+
31
+
32
+ def run_core_generators(spec, env_vars, ctx: BuildContext) -> None:
33
+ """Run core interface generators (api, web, mobile, desktop, infra)."""
34
+ generators = {
35
+ "api": api_gen.generate,
36
+ "web": web_gen.generate,
37
+ "mobile": mobile_gen.generate,
38
+ "desktop": desktop_gen.generate,
39
+ "infra": infra_gen.generate,
40
+ }
41
+
42
+ for name, fn in generators.items():
43
+ if not should_generate_interface(name, spec):
44
+ continue
45
+
46
+ print(f"šŸ›  Generating {name}...")
47
+ if name == "infra":
48
+ target_dir = ctx.build_dir / name
49
+ else:
50
+ target_dir = ctx.build_dir / name
51
+ target_dir.mkdir(parents=True, exist_ok=True)
52
+ fn(spec, env_vars, target_dir)
53
+
54
+
55
+ def run_document_generators(spec, env_vars, ctx: BuildContext) -> None:
56
+ """Run document generators if documents are defined."""
57
+ if not spec.documents:
58
+ return
59
+
60
+ print("šŸ›  Generating documents...")
61
+ doc_dir = ctx.build_dir / "documents"
62
+ doc_dir.mkdir(parents=True, exist_ok=True)
63
+ document_gen.generate(spec, env_vars, doc_dir, project_root=ctx.root)
64
+
65
+
66
+ def run_report_generators(spec, env_vars, ctx: BuildContext) -> None:
67
+ """Run report generators if reports are defined."""
68
+ if not spec.reports:
69
+ return
70
+
71
+ print("šŸ›  Generating reports...")
72
+ rpt_dir = ctx.build_dir / "reports"
73
+ rpt_dir.mkdir(parents=True, exist_ok=True)
74
+ report_gen.generate(spec, env_vars, rpt_dir)
75
+
76
+
77
+ def run_i18n_generators(spec, env_vars, ctx: BuildContext) -> None:
78
+ """Run i18n generators if languages are defined."""
79
+ if not spec.languages:
80
+ return
81
+
82
+ print("šŸ›  Generating i18n...")
83
+ i18n_dir = ctx.build_dir / "i18n"
84
+ i18n_dir.mkdir(parents=True, exist_ok=True)
85
+ i18n_gen.generate(spec, env_vars, i18n_dir)
86
+
87
+
88
+ def run_integration_generators(spec, env_vars, ctx: BuildContext) -> None:
89
+ """Run integration generators if integrations are defined."""
90
+ if not (spec.integrations or spec.api_clients or spec.webhooks):
91
+ return
92
+
93
+ print("šŸ›  Generating integrations...")
94
+ svc_dir = ctx.build_dir / "api" / "services"
95
+ svc_dir.mkdir(parents=True, exist_ok=True)
96
+ integrations_gen.generate(spec, env_vars, svc_dir)
97
+
98
+
99
+ def run_workflow_generators(spec, env_vars, ctx: BuildContext) -> None:
100
+ """Run workflow generators if workflows are defined."""
101
+ if not spec.workflows:
102
+ return
103
+
104
+ print("šŸ›  Generating workflows...")
105
+ wf_dir = ctx.build_dir / "api" / "workflows"
106
+ wf_dir.mkdir(parents=True, exist_ok=True)
107
+ workflow_gen.generate(spec, env_vars, wf_dir)
108
+
109
+
110
+ def run_ci_generator(spec, env_vars, ctx: BuildContext) -> None:
111
+ """Run CI/CD generator (always into project root)."""
112
+ print("šŸ›  Generating CI...")
113
+ ci_gen.generate(spec, env_vars, ctx.root)
114
+
115
+
116
+ def run_plugins(spec, env_vars, ctx: BuildContext) -> None:
117
+ """Run plugin generators."""
118
+ _plugins.run_plugins(spec, env_vars, ctx.build_dir, ctx.root)
119
+
120
+
121
+ def cmd_build(args: argparse.Namespace) -> int:
122
+ """Generate all code for the project.
123
+
124
+ This command runs all applicable generators to create a complete build.
125
+ Validation is performed first unless --force is specified.
126
+ """
127
+ ctx = BuildContext(
128
+ root=__import__('pathlib').Path(getattr(args, "dir", None) or ".").resolve(),
129
+ doql_file=__import__('pathlib').Path(getattr(args, "dir", None) or ".").resolve() / (getattr(args, "file", None) or "app.doql"),
130
+ env_file=__import__('pathlib').Path(getattr(args, "dir", None) or ".").resolve() / ".env",
131
+ build_dir=__import__('pathlib').Path(getattr(args, "dir", None) or ".").resolve() / "build",
132
+ )
133
+
134
+ spec, env_vars = load_spec(ctx)
135
+
136
+ # Validate unless --force
137
+ issues = doql_parser.validate(spec, env_vars)
138
+ errors = [i for i in issues if i.severity == "error"]
139
+ if errors and not getattr(args, "force", False):
140
+ print("āŒ Validation errors (use --force to ignore):", file=sys.stderr)
141
+ for e in errors:
142
+ print(f" {e.path}: {e.message}", file=sys.stderr)
143
+ return 1
144
+
145
+ ctx.build_dir.mkdir(parents=True, exist_ok=True)
146
+
147
+ # Run all generators in order
148
+ run_core_generators(spec, env_vars, ctx)
149
+ run_document_generators(spec, env_vars, ctx)
150
+ run_report_generators(spec, env_vars, ctx)
151
+ run_i18n_generators(spec, env_vars, ctx)
152
+ run_integration_generators(spec, env_vars, ctx)
153
+ run_workflow_generators(spec, env_vars, ctx)
154
+ run_ci_generator(spec, env_vars, ctx)
155
+ run_plugins(spec, env_vars, ctx)
156
+
157
+ write_lockfile(spec, ctx)
158
+ print(f"\nāœ… Build complete — see {ctx.build_dir}/")
159
+ return 0