wadi 1.0.0

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 (294) hide show
  1. package/.agent/workflows/auto_sync.md +19 -0
  2. package/.agent/workflows/kivo_pipeline.md +27 -0
  3. package/.devcontainer/devcontainer.json +27 -0
  4. package/.github/workflows/kivo-cicd.yml +45 -0
  5. package/.github/workflows/monorepo-ci.yml +51 -0
  6. package/.github/workflows/wadi-ci.yml +38 -0
  7. package/.husky/pre-commit +2 -0
  8. package/.prettierignore +12 -0
  9. package/.prettierrc +9 -0
  10. package/.vscode/settings.json +19 -0
  11. package/CHANGELOG.md +56 -0
  12. package/CODE_OF_CONDUCT.md +43 -0
  13. package/CONTRIBUTING.md +42 -0
  14. package/DEPLOY_GUIDE.md +143 -0
  15. package/GO_LIVE_CHECKLIST.md +41 -0
  16. package/GO_LIVE_COMPLETE_REPORT.md +58 -0
  17. package/GO_LIVE_VALIDATION.md +39 -0
  18. package/LEGAL.md +38 -0
  19. package/MANIFESTO.md +40 -0
  20. package/MANUAL.md +82 -0
  21. package/OPS_PLAN.md +90 -0
  22. package/README.md +126 -0
  23. package/RELEASE_NOTES.md +51 -0
  24. package/ROADMAP.md +51 -0
  25. package/api_listado.txt +2197 -0
  26. package/apps/api/WADI_PROTOCOL.md +52 -0
  27. package/apps/api/debug-brain.js +11 -0
  28. package/apps/api/package.json +21 -0
  29. package/apps/api/src/core/analisis.js +17 -0
  30. package/apps/api/src/core/errors.js +31 -0
  31. package/apps/api/src/core/logger.js +32 -0
  32. package/apps/api/src/core/prompt-kivo.js +62 -0
  33. package/apps/api/src/index.js +212 -0
  34. package/apps/api/src/layers/human_pattern/composeResponse.js +35 -0
  35. package/apps/api/src/layers/human_pattern/detectPattern.js +39 -0
  36. package/apps/api/src/layers/human_pattern/heuristics.js +28 -0
  37. package/apps/api/src/layers/human_pattern/index.js +28 -0
  38. package/apps/api/src/layers/human_pattern/socialMemory.js +35 -0
  39. package/apps/api/src/middleware/errorHandler.js +24 -0
  40. package/apps/api/src/middleware/rateLimiter.js +38 -0
  41. package/apps/api/src/middleware/requestLogger.js +31 -0
  42. package/apps/api/src/middleware/upload.js +21 -0
  43. package/apps/api/src/middleware/validation.js +70 -0
  44. package/apps/api/src/modules/data.js +25 -0
  45. package/apps/api/src/modules/marketing.js +54 -0
  46. package/apps/api/src/modules/projects.js +40 -0
  47. package/apps/api/src/openai.js +16 -0
  48. package/apps/api/src/preferences/index.js +20 -0
  49. package/apps/api/src/register_user.js +22 -0
  50. package/apps/api/src/routes/kivo.js +58 -0
  51. package/apps/api/src/routes/monitoring.js +55 -0
  52. package/apps/api/src/routes.js +656 -0
  53. package/apps/api/src/supabase.js +17 -0
  54. package/apps/api/src/tools/index.js +57 -0
  55. package/apps/api/src/wadi-brain.js +171 -0
  56. package/apps/api/supabase/migrations/20251218_audit_logs.sql +27 -0
  57. package/apps/api/supabase/migrations/v2-chat-persistence.sql +83 -0
  58. package/apps/api/supabase/migrations/v3-cascade-delete.sql +11 -0
  59. package/apps/api/supabase/migrations/v3-security-fix.sql +90 -0
  60. package/apps/api/supabase/migrations/v3-storage.sql +36 -0
  61. package/apps/api/supabase/migrations/v4-gamification.sql +83 -0
  62. package/apps/api/supabase/migrations/v5-smoke-index.sql +6 -0
  63. package/apps/api/supabase/migrations/v6-schema-integrity-fix.sql +98 -0
  64. package/apps/api/supabase/migrations/v7-performance-indexes.sql +5 -0
  65. package/apps/api/supabase/migrations/v7-security-hardening.sql +132 -0
  66. package/apps/api/supabase/migrations/v8-security-hardening.sql +79 -0
  67. package/apps/api/test_human_pattern.js +30 -0
  68. package/apps/api/test_human_pattern_vague.js +30 -0
  69. package/apps/api/test_output.txt +76 -0
  70. package/apps/api/test_vague.js +30 -0
  71. package/apps/api/test_vague_block.js +30 -0
  72. package/apps/api/test_wadi.js +31 -0
  73. package/apps/api/tsconfig.json +13 -0
  74. package/apps/frontend/.env.local +3 -0
  75. package/apps/frontend/README.md +73 -0
  76. package/apps/frontend/eslint.config.js +27 -0
  77. package/apps/frontend/index.html +49 -0
  78. package/apps/frontend/package.json +41 -0
  79. package/apps/frontend/postcss.config.cjs +6 -0
  80. package/apps/frontend/public/cursors/wadi-neutral.svg +1 -0
  81. package/apps/frontend/public/cursors/wadi-select.svg +1 -0
  82. package/apps/frontend/public/icon-192.svg +1 -0
  83. package/apps/frontend/public/icon-512.svg +1 -0
  84. package/apps/frontend/public/manifest.webmanifest +23 -0
  85. package/apps/frontend/public/sw.js +57 -0
  86. package/apps/frontend/public/vite.svg +1 -0
  87. package/apps/frontend/public/wadi.svg +5 -0
  88. package/apps/frontend/src/assets/react.svg +1 -0
  89. package/apps/frontend/src/components/AuthLoader.tsx +50 -0
  90. package/apps/frontend/src/components/ChatInput.tsx +272 -0
  91. package/apps/frontend/src/components/ChatInterface.tsx +202 -0
  92. package/apps/frontend/src/components/ErrorBoundary.tsx +52 -0
  93. package/apps/frontend/src/components/InputArea.tsx +201 -0
  94. package/apps/frontend/src/components/Layout.tsx +73 -0
  95. package/apps/frontend/src/components/MessageBubble.tsx +66 -0
  96. package/apps/frontend/src/components/OnboardingModal.tsx +108 -0
  97. package/apps/frontend/src/components/SettingsModal.tsx +187 -0
  98. package/apps/frontend/src/components/Sidebar.tsx +171 -0
  99. package/apps/frontend/src/components/WadiOnboarding.tsx +71 -0
  100. package/apps/frontend/src/components/auditor/AuditReport.tsx +166 -0
  101. package/apps/frontend/src/components/auditor/AuditorHeader.tsx +34 -0
  102. package/apps/frontend/src/components/auditor/ContextPanel.tsx +138 -0
  103. package/apps/frontend/src/components/auditor/DataDeconstructor.tsx +85 -0
  104. package/apps/frontend/src/components/auditor/DecisionWall.tsx +65 -0
  105. package/apps/frontend/src/components/auditor/Dropzone.tsx +137 -0
  106. package/apps/frontend/src/components/common/Button.tsx +97 -0
  107. package/apps/frontend/src/components/common/Card.tsx +43 -0
  108. package/apps/frontend/src/components/common/Input.tsx +73 -0
  109. package/apps/frontend/src/components/common/Modal.tsx +53 -0
  110. package/apps/frontend/src/components/ui/Button.tsx +68 -0
  111. package/apps/frontend/src/components/ui/Card.tsx +86 -0
  112. package/apps/frontend/src/components/ui/Input.tsx +28 -0
  113. package/apps/frontend/src/components/ui/LogItem.tsx +64 -0
  114. package/apps/frontend/src/components/ui/MondayButton.tsx +40 -0
  115. package/apps/frontend/src/components/ui/MondayCard.tsx +24 -0
  116. package/apps/frontend/src/components/ui/Scouter.tsx +208 -0
  117. package/apps/frontend/src/components/ui/TerminalInput.tsx +202 -0
  118. package/apps/frontend/src/components/ui/Tooltip.tsx +67 -0
  119. package/apps/frontend/src/config/chatShortcuts.ts +20 -0
  120. package/apps/frontend/src/config/supabase.ts +6 -0
  121. package/apps/frontend/src/final_status.txt +3 -0
  122. package/apps/frontend/src/hooks/useScouter.ts +28 -0
  123. package/apps/frontend/src/hooks/useStoreHydration.ts +24 -0
  124. package/apps/frontend/src/improvement_status.txt +5 -0
  125. package/apps/frontend/src/index.css +88 -0
  126. package/apps/frontend/src/main.tsx +62 -0
  127. package/apps/frontend/src/monday_status.txt +7 -0
  128. package/apps/frontend/src/pages/ChatPage.tsx +201 -0
  129. package/apps/frontend/src/pages/DashboardPage.tsx +375 -0
  130. package/apps/frontend/src/pages/IntroWadi.tsx +114 -0
  131. package/apps/frontend/src/pages/LandingPage.tsx +103 -0
  132. package/apps/frontend/src/pages/Login.tsx +190 -0
  133. package/apps/frontend/src/pages/PrivacyPage.tsx +213 -0
  134. package/apps/frontend/src/pages/ProjectDetail.tsx +80 -0
  135. package/apps/frontend/src/pages/Projects.tsx +247 -0
  136. package/apps/frontend/src/pages/TermsPage.tsx +202 -0
  137. package/apps/frontend/src/router.tsx +83 -0
  138. package/apps/frontend/src/store/authStore.ts +152 -0
  139. package/apps/frontend/src/store/chatStore.ts +837 -0
  140. package/apps/frontend/src/store/documentStore.ts +89 -0
  141. package/apps/frontend/src/store/projectsStore.ts +111 -0
  142. package/apps/frontend/src/store/runsStore.ts +98 -0
  143. package/apps/frontend/src/utils/api.ts +34 -0
  144. package/apps/frontend/src/vite-env.d.ts +7 -0
  145. package/apps/frontend/tailwind.config.cjs +32 -0
  146. package/apps/frontend/tsconfig.app.json +27 -0
  147. package/apps/frontend/tsconfig.json +7 -0
  148. package/apps/frontend/tsconfig.node.json +26 -0
  149. package/apps/frontend/vite.config.ts +25 -0
  150. package/apps/kivo/.firebase/hosting.d3d3.cache +11 -0
  151. package/apps/kivo/.firebaserc +5 -0
  152. package/apps/kivo/BRANDING_GUIDE.md +71 -0
  153. package/apps/kivo/DEPLOYMENT_READY.md +46 -0
  154. package/apps/kivo/DEPLOY_URL.md +12 -0
  155. package/apps/kivo/IMPLEMENTATION_REPORT.md +35 -0
  156. package/apps/kivo/IMPLEMENTATION_REPORT_FINAL.md +49 -0
  157. package/apps/kivo/PLAN_MOBILE_2.0.md +44 -0
  158. package/apps/kivo/PWA_VERIFICATION_GUIDE.md +77 -0
  159. package/apps/kivo/README.md +28 -0
  160. package/apps/kivo/REBUILD_REPORT.md +34 -0
  161. package/apps/kivo/UPGRADE_REPORT.md +35 -0
  162. package/apps/kivo/android/app/build.gradle +54 -0
  163. package/apps/kivo/android/app/capacitor.build.gradle +19 -0
  164. package/apps/kivo/android/app/proguard-rules.pro +21 -0
  165. package/apps/kivo/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java +26 -0
  166. package/apps/kivo/android/app/src/main/AndroidManifest.xml +35 -0
  167. package/apps/kivo/android/app/src/main/java/com/kivo/app/MainActivity.java +5 -0
  168. package/apps/kivo/android/app/src/main/res/drawable/ic_launcher_background.xml +170 -0
  169. package/apps/kivo/android/app/src/main/res/drawable/splash.png +0 -0
  170. package/apps/kivo/android/app/src/main/res/drawable-land-hdpi/splash.png +0 -0
  171. package/apps/kivo/android/app/src/main/res/drawable-land-ldpi/splash.png +0 -0
  172. package/apps/kivo/android/app/src/main/res/drawable-land-mdpi/splash.png +0 -0
  173. package/apps/kivo/android/app/src/main/res/drawable-land-night-hdpi/splash.png +0 -0
  174. package/apps/kivo/android/app/src/main/res/drawable-land-night-ldpi/splash.png +0 -0
  175. package/apps/kivo/android/app/src/main/res/drawable-land-night-mdpi/splash.png +0 -0
  176. package/apps/kivo/android/app/src/main/res/drawable-land-night-xhdpi/splash.png +0 -0
  177. package/apps/kivo/android/app/src/main/res/drawable-land-night-xxhdpi/splash.png +0 -0
  178. package/apps/kivo/android/app/src/main/res/drawable-land-night-xxxhdpi/splash.png +0 -0
  179. package/apps/kivo/android/app/src/main/res/drawable-land-xhdpi/splash.png +0 -0
  180. package/apps/kivo/android/app/src/main/res/drawable-land-xxhdpi/splash.png +0 -0
  181. package/apps/kivo/android/app/src/main/res/drawable-land-xxxhdpi/splash.png +0 -0
  182. package/apps/kivo/android/app/src/main/res/drawable-night/splash.png +0 -0
  183. package/apps/kivo/android/app/src/main/res/drawable-port-hdpi/splash.png +0 -0
  184. package/apps/kivo/android/app/src/main/res/drawable-port-ldpi/splash.png +0 -0
  185. package/apps/kivo/android/app/src/main/res/drawable-port-mdpi/splash.png +0 -0
  186. package/apps/kivo/android/app/src/main/res/drawable-port-night-hdpi/splash.png +0 -0
  187. package/apps/kivo/android/app/src/main/res/drawable-port-night-ldpi/splash.png +0 -0
  188. package/apps/kivo/android/app/src/main/res/drawable-port-night-mdpi/splash.png +0 -0
  189. package/apps/kivo/android/app/src/main/res/drawable-port-night-xhdpi/splash.png +0 -0
  190. package/apps/kivo/android/app/src/main/res/drawable-port-night-xxhdpi/splash.png +0 -0
  191. package/apps/kivo/android/app/src/main/res/drawable-port-night-xxxhdpi/splash.png +0 -0
  192. package/apps/kivo/android/app/src/main/res/drawable-port-xhdpi/splash.png +0 -0
  193. package/apps/kivo/android/app/src/main/res/drawable-port-xxhdpi/splash.png +0 -0
  194. package/apps/kivo/android/app/src/main/res/drawable-port-xxxhdpi/splash.png +0 -0
  195. package/apps/kivo/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml +34 -0
  196. package/apps/kivo/android/app/src/main/res/layout/activity_main.xml +12 -0
  197. package/apps/kivo/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +9 -0
  198. package/apps/kivo/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +9 -0
  199. package/apps/kivo/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  200. package/apps/kivo/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png +0 -0
  201. package/apps/kivo/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png +0 -0
  202. package/apps/kivo/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  203. package/apps/kivo/android/app/src/main/res/mipmap-ldpi/ic_launcher.png +0 -0
  204. package/apps/kivo/android/app/src/main/res/mipmap-ldpi/ic_launcher_background.png +0 -0
  205. package/apps/kivo/android/app/src/main/res/mipmap-ldpi/ic_launcher_foreground.png +0 -0
  206. package/apps/kivo/android/app/src/main/res/mipmap-ldpi/ic_launcher_round.png +0 -0
  207. package/apps/kivo/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  208. package/apps/kivo/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png +0 -0
  209. package/apps/kivo/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png +0 -0
  210. package/apps/kivo/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  211. package/apps/kivo/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  212. package/apps/kivo/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png +0 -0
  213. package/apps/kivo/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png +0 -0
  214. package/apps/kivo/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  215. package/apps/kivo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  216. package/apps/kivo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png +0 -0
  217. package/apps/kivo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png +0 -0
  218. package/apps/kivo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  219. package/apps/kivo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  220. package/apps/kivo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png +0 -0
  221. package/apps/kivo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png +0 -0
  222. package/apps/kivo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  223. package/apps/kivo/android/app/src/main/res/values/ic_launcher_background.xml +4 -0
  224. package/apps/kivo/android/app/src/main/res/values/strings.xml +7 -0
  225. package/apps/kivo/android/app/src/main/res/values/styles.xml +22 -0
  226. package/apps/kivo/android/app/src/main/res/xml/file_paths.xml +5 -0
  227. package/apps/kivo/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java +18 -0
  228. package/apps/kivo/android/build.gradle +29 -0
  229. package/apps/kivo/android/capacitor.settings.gradle +3 -0
  230. package/apps/kivo/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  231. package/apps/kivo/android/gradle/wrapper/gradle-wrapper.properties +7 -0
  232. package/apps/kivo/android/gradle.properties +22 -0
  233. package/apps/kivo/android/gradlew +252 -0
  234. package/apps/kivo/android/gradlew.bat +94 -0
  235. package/apps/kivo/android/settings.gradle +5 -0
  236. package/apps/kivo/android/variables.gradle +16 -0
  237. package/apps/kivo/assets/icon.png +0 -0
  238. package/apps/kivo/assets/splash.png +0 -0
  239. package/apps/kivo/capacitor.config.json +16 -0
  240. package/apps/kivo/firebase.json +6 -0
  241. package/apps/kivo/jest.config.js +4 -0
  242. package/apps/kivo/package.json +26 -0
  243. package/apps/kivo/tests_disabled/logic.test.js +34 -0
  244. package/apps/kivo/www/assets/icon-192.png +0 -0
  245. package/apps/kivo/www/assets/icon-512.png +0 -0
  246. package/apps/kivo/www/assets/kivo-icon.png +0 -0
  247. package/apps/kivo/www/assets/pop.mp3 +0 -0
  248. package/apps/kivo/www/favicon.ico +0 -0
  249. package/apps/kivo/www/firebase-config.js +75 -0
  250. package/apps/kivo/www/index.html +38 -0
  251. package/apps/kivo/www/manifest.json +29 -0
  252. package/apps/kivo/www/script.js +72 -0
  253. package/apps/kivo/www/style.css +82 -0
  254. package/apps/kivo/www/sw.js +46 -0
  255. package/apps/kivo-brain-api/.env.example +2 -0
  256. package/apps/kivo-brain-api/KIVO_BACKEND_SETUP.md +27 -0
  257. package/apps/kivo-brain-api/controllers/kivoController.js +31 -0
  258. package/apps/kivo-brain-api/index.js +24 -0
  259. package/apps/kivo-brain-api/package.json +17 -0
  260. package/apps/kivo-brain-api/routes/message.js +8 -0
  261. package/apps/kivo-brain-api/services/openaiService.js +64 -0
  262. package/apps/tests/wadi-tests.js +155 -0
  263. package/apps/wadi-brain/docs/README_REMOVE_OPTIONS.md +26 -0
  264. package/cli/commands/deploy.js +10 -0
  265. package/cli/commands/docs.js +16 -0
  266. package/cli/commands/explain.js +29 -0
  267. package/cli/commands/lint.js +14 -0
  268. package/cli/index.js +26 -0
  269. package/cli/package.json +12 -0
  270. package/docs/CNAME +1 -0
  271. package/docs/README.md +38 -0
  272. package/docs/USO.md +30 -0
  273. package/docs/index.html +46 -0
  274. package/eslint.config.js +101 -0
  275. package/final_validation.json +27 -0
  276. package/frontend_listado.txt +33387 -0
  277. package/listado.txt +12591 -0
  278. package/package.json +46 -0
  279. package/packages/logger/index.js +43 -0
  280. package/packages/logger/package.json +19 -0
  281. package/packages/logger/test-logger.js +7 -0
  282. package/packages_listado.txt +801 -0
  283. package/pnpm-workspace.yaml +6 -0
  284. package/reseteador_existencial.ps1 +40 -0
  285. package/scripts/bump-version.js +26 -0
  286. package/scripts/env.ps1 +13 -0
  287. package/scripts/setup_android.ps1 +25 -0
  288. package/scripts/setup_virtual_env.ps1 +77 -0
  289. package/scripts/smoke-test.js +84 -0
  290. package/scripts/trigger_render_deploy.ps1 +3 -0
  291. package/scripts/validate-release.js +34 -0
  292. package/temp_check.js +57 -0
  293. package/tsconfig.json +5 -0
  294. package/validation_report.json +27 -0
@@ -0,0 +1,190 @@
1
+ import { useState } from "react";
2
+ import type { FormEvent } from "react";
3
+ import { useNavigate } from "react-router-dom";
4
+ import { useAuthStore } from "../store/authStore";
5
+ import { Card } from "../components/common/Card";
6
+ import { Input } from "../components/common/Input";
7
+ import { Button } from "../components/common/Button";
8
+
9
+ import HCaptcha from "@hcaptcha/react-hcaptcha";
10
+
11
+ export default function Login() {
12
+ const navigate = useNavigate();
13
+ const { signIn, signUp, loading } = useAuthStore();
14
+
15
+ const [isRegistering, setIsRegistering] = useState(false);
16
+ const [email, setEmail] = useState("");
17
+ const [password, setPassword] = useState("");
18
+ const [errorMsg, setErrorMsg] = useState("");
19
+ const [captchaToken, setCaptchaToken] = useState("");
20
+
21
+ const handleSubmit = async (e: FormEvent) => {
22
+ e.preventDefault();
23
+ setErrorMsg("");
24
+
25
+ if (!email || !password) {
26
+ setErrorMsg("Por favor completá todos los campos.");
27
+ return;
28
+ }
29
+
30
+ try {
31
+ if (isRegistering) {
32
+ if (!captchaToken) {
33
+ setErrorMsg("Por favor completá el CAPTCHA.");
34
+ return;
35
+ }
36
+ const { error } = await signUp(email, password, captchaToken);
37
+ if (error) throw error;
38
+ navigate("/projects");
39
+ } else {
40
+ const { error } = await signIn(email, password);
41
+ if (error) throw error;
42
+ navigate("/projects");
43
+ }
44
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
45
+ } catch (err: any) {
46
+ setErrorMsg(err.message || "Ocurrió un error inesperado.");
47
+ }
48
+ };
49
+
50
+ return (
51
+ <div
52
+ style={{
53
+ width: "100vw",
54
+ height: "100vh",
55
+ display: "flex",
56
+ alignItems: "center",
57
+ justifyContent: "center",
58
+ background: "var(--bg-app)",
59
+ color: "var(--text-primary)",
60
+ }}
61
+ >
62
+ <Card
63
+ style={{
64
+ width: "100%",
65
+ maxWidth: "400px",
66
+ textAlign: "center",
67
+ boxShadow: "var(--shadow-lg)",
68
+ }}
69
+ >
70
+ {/* LOGO / BRAND */}
71
+ <div style={{ marginBottom: "2rem" }}>
72
+ <h1
73
+ style={{
74
+ fontSize: "2rem",
75
+ fontWeight: 700,
76
+ textTransform: "uppercase",
77
+ letterSpacing: "2px",
78
+ margin: 0,
79
+ }}
80
+ >
81
+ WADI
82
+ </h1>
83
+ <p style={{ color: "var(--text-secondary)", marginTop: "0.5rem" }}>
84
+ {isRegistering ? "Creá tu cuenta" : "Bienvenido de nuevo"}
85
+ </p>
86
+ </div>
87
+
88
+ {/* ERROR */}
89
+ {errorMsg && (
90
+ <div
91
+ style={{
92
+ background: "rgba(255, 80, 80, 0.1)",
93
+ border: "1px solid rgba(255, 80, 80, 0.3)",
94
+ color: "#ff6b6b",
95
+ padding: "10px",
96
+ borderRadius: "8px",
97
+ marginBottom: "1rem",
98
+ fontSize: "0.9rem",
99
+ }}
100
+ >
101
+ {errorMsg}
102
+ </div>
103
+ )}
104
+
105
+ {/* FORM */}
106
+ {/* FORM */}
107
+ <form
108
+ onSubmit={handleSubmit}
109
+ style={{ display: "flex", flexDirection: "column", gap: "1rem" }}
110
+ >
111
+ <Input
112
+ label="Email"
113
+ type="email"
114
+ value={email}
115
+ onChange={(e) => setEmail(e.target.value)}
116
+ placeholder="nombre@ejemplo.com"
117
+ />
118
+
119
+ <Input
120
+ label="Contraseña"
121
+ type="password"
122
+ value={password}
123
+ onChange={(e) => setPassword(e.target.value)}
124
+ placeholder="••••••••"
125
+ />
126
+
127
+ {isRegistering && (
128
+ <div
129
+ style={{
130
+ display: "flex",
131
+ justifyContent: "center",
132
+ marginTop: "1rem",
133
+ }}
134
+ >
135
+ <HCaptcha
136
+ sitekey={
137
+ import.meta.env.VITE_HCAPTCHA_SITE_KEY ||
138
+ "10000000-ffff-ffff-ffff-000000000001"
139
+ }
140
+ onVerify={(token) => setCaptchaToken(token)}
141
+ />
142
+ </div>
143
+ )}
144
+
145
+ <Button
146
+ type="submit"
147
+ disabled={loading}
148
+ fullWidth
149
+ style={{ marginTop: "1rem" }}
150
+ >
151
+ {loading
152
+ ? "Procesando..."
153
+ : isRegistering
154
+ ? "Registrarse"
155
+ : "Continuar"}
156
+ </Button>
157
+ </form>
158
+
159
+ {/* TOGGLE LOGIN/REGISTER */}
160
+ <div
161
+ style={{
162
+ marginTop: "1.5rem",
163
+ fontSize: "0.9rem",
164
+ color: "var(--text-secondary)",
165
+ }}
166
+ >
167
+ {isRegistering ? "¿Ya tenés cuenta? " : "¿No tenés cuenta? "}
168
+ <button
169
+ type="button"
170
+ onClick={() => {
171
+ setIsRegistering(!isRegistering);
172
+ setErrorMsg("");
173
+ setCaptchaToken(""); // Reset captcha on toggle
174
+ }}
175
+ style={{
176
+ background: "none",
177
+ border: "none",
178
+ color: "var(--accent-primary)",
179
+ fontWeight: 600,
180
+ cursor: "pointer",
181
+ padding: 0,
182
+ }}
183
+ >
184
+ {isRegistering ? "Iniciar Sesión" : "Registrate"}
185
+ </button>
186
+ </div>
187
+ </Card>
188
+ </div>
189
+ );
190
+ }
@@ -0,0 +1,213 @@
1
+ import { useNavigate } from "react-router-dom";
2
+
3
+ export default function PrivacyPage() {
4
+ const navigate = useNavigate();
5
+
6
+ return (
7
+ <div
8
+ style={{
9
+ fontFamily: "'Inter', sans-serif",
10
+ color: "#111827",
11
+ backgroundColor: "#F5F7FB",
12
+ minHeight: "100vh",
13
+ padding: "4rem 2rem",
14
+ }}
15
+ >
16
+ <main
17
+ style={{
18
+ maxWidth: "700px",
19
+ margin: "0 auto",
20
+ background: "#fff",
21
+ padding: "2rem",
22
+ borderRadius: "24px",
23
+ boxShadow: "0 10px 40px rgba(0,0,0,0.05)",
24
+ }}
25
+ >
26
+ <button
27
+ onClick={() => navigate("/")}
28
+ style={{
29
+ marginBottom: "2rem",
30
+ background: "transparent",
31
+ border: "none",
32
+ color: "#7C6CFF",
33
+ fontWeight: 600,
34
+ cursor: "pointer",
35
+ }}
36
+ >
37
+ ← Volver al inicio
38
+ </button>
39
+
40
+ <h1
41
+ style={{
42
+ fontSize: "2rem",
43
+ fontWeight: 800,
44
+ marginBottom: "2rem",
45
+ color: "#111827",
46
+ }}
47
+ >
48
+ Política de Privacidad de WADI
49
+ </h1>
50
+
51
+ <section style={{ marginBottom: "2rem" }}>
52
+ <h2
53
+ style={{
54
+ fontSize: "1.25rem",
55
+ fontWeight: 700,
56
+ marginBottom: "1rem",
57
+ }}
58
+ >
59
+ 1. Datos que procesamos
60
+ </h2>
61
+ <p style={{ lineHeight: 1.6, color: "#4B5563" }}>
62
+ Procesamos el contenido de las conversaciones que mantienes con WADI
63
+ para generar respuestas. También recopilamos datos técnicos básicos
64
+ necesarios para el funcionamiento del servicio, como dirección IP y
65
+ metadatos de uso, únicamente con fines de seguridad y mejora del
66
+ servicio.
67
+ </p>
68
+ </section>
69
+
70
+ <section style={{ marginBottom: "2rem" }}>
71
+ <h2
72
+ style={{
73
+ fontSize: "1.25rem",
74
+ fontWeight: 700,
75
+ marginBottom: "1rem",
76
+ }}
77
+ >
78
+ 2. Uso de la información
79
+ </h2>
80
+ <p style={{ lineHeight: 1.6, color: "#4B5563" }}>
81
+ Utilizamos la información para:
82
+ </p>
83
+ <ul
84
+ style={{
85
+ lineHeight: 1.6,
86
+ color: "#4B5563",
87
+ listStyleType: "disc",
88
+ paddingLeft: "1.5rem",
89
+ marginTop: "0.5rem",
90
+ }}
91
+ >
92
+ <li>Proveer y mantener el servicio operativo.</li>
93
+ <li>Generar respuestas contextualizadas a tus consultas.</li>
94
+ <li>Mejorar la calidad de nuestro modelo y herramientas.</li>
95
+ <li>Garantizar la seguridad de la plataforma.</li>
96
+ </ul>
97
+ </section>
98
+
99
+ <section style={{ marginBottom: "2rem" }}>
100
+ <h2
101
+ style={{
102
+ fontSize: "1.25rem",
103
+ fontWeight: 700,
104
+ marginBottom: "1rem",
105
+ }}
106
+ >
107
+ 3. Compartición de datos
108
+ </h2>
109
+ <p style={{ lineHeight: 1.6, color: "#4B5563" }}>
110
+ No vendemos tus datos personales. Compartimos información
111
+ estrictamente necesaria con proveedores de infraestructura (como
112
+ servicios de hosting y proveedores de modelos de lenguaje) que
113
+ operan bajo acuerdos de confidencialidad. También podemos divulgar
114
+ información si así lo exige la ley.
115
+ </p>
116
+ </section>
117
+
118
+ <section style={{ marginBottom: "2rem" }}>
119
+ <h2
120
+ style={{
121
+ fontSize: "1.25rem",
122
+ fontWeight: 700,
123
+ marginBottom: "1rem",
124
+ }}
125
+ >
126
+ 4. Retención y eliminación
127
+ </h2>
128
+ <p style={{ lineHeight: 1.6, color: "#4B5563" }}>
129
+ Mantenemos los datos mientras tu cuenta esté activa o sea necesario
130
+ para prestar el servicio. Puedes solicitar la eliminación de tu
131
+ cuenta y datos asociados en cualquier momento contactándonos.
132
+ </p>
133
+ </section>
134
+
135
+ <section style={{ marginBottom: "2rem" }}>
136
+ <h2
137
+ style={{
138
+ fontSize: "1.25rem",
139
+ fontWeight: 700,
140
+ marginBottom: "1rem",
141
+ }}
142
+ >
143
+ 5. Seguridad
144
+ </h2>
145
+ <p style={{ lineHeight: 1.6, color: "#4B5563" }}>
146
+ Implementamos medidas de seguridad técnicas y organizativas para
147
+ proteger tus datos contra el acceso no autorizado, la pérdida o la
148
+ alteración.
149
+ </p>
150
+ </section>
151
+
152
+ <section style={{ marginBottom: "2rem" }}>
153
+ <h2
154
+ style={{
155
+ fontSize: "1.25rem",
156
+ fontWeight: 700,
157
+ marginBottom: "1rem",
158
+ }}
159
+ >
160
+ 6. Derechos del usuario
161
+ </h2>
162
+ <p style={{ lineHeight: 1.6, color: "#4B5563" }}>
163
+ Tienes derecho a acceder, corregir y eliminar tus datos personales.
164
+ Para ejercer estos derechos, contáctanos en:{" "}
165
+ <a
166
+ href="mailto:privacidad@wadi.app"
167
+ style={{ color: "#7C6CFF", fontWeight: 600 }}
168
+ >
169
+ privacidad@wadi.app
170
+ </a>
171
+ </p>
172
+ </section>
173
+
174
+ <section style={{ marginBottom: "2rem" }}>
175
+ <h2
176
+ style={{
177
+ fontSize: "1.25rem",
178
+ fontWeight: 700,
179
+ marginBottom: "1rem",
180
+ }}
181
+ >
182
+ 7. Uso con menores
183
+ </h2>
184
+ <p style={{ lineHeight: 1.6, color: "#4B5563" }}>
185
+ WADI no está dirigido a menores de 13 años. No recopilamos
186
+ intencionalmente información personal de niños menores de esta edad.
187
+ </p>
188
+ </section>
189
+
190
+ <section>
191
+ <h2
192
+ style={{
193
+ fontSize: "1.25rem",
194
+ fontWeight: 700,
195
+ marginBottom: "1rem",
196
+ }}
197
+ >
198
+ 8. Cambios en la política
199
+ </h2>
200
+ <p style={{ lineHeight: 1.6, color: "#4B5563" }}>
201
+ Podemos actualizar esta política ocasionalmente. Notificaremos los
202
+ cambios publicando la nueva política en esta página.
203
+ </p>
204
+ <p
205
+ style={{ marginTop: "1rem", fontSize: "0.9rem", color: "#6B7280" }}
206
+ >
207
+ Última actualización: Diciembre 2025
208
+ </p>
209
+ </section>
210
+ </main>
211
+ </div>
212
+ );
213
+ }
@@ -0,0 +1,80 @@
1
+ import { useEffect, useMemo } from "react";
2
+ import { useParams } from "react-router-dom";
3
+ import { useRunsStore } from "../store/runsStore";
4
+ import { ChatInterface } from "../components/ChatInterface";
5
+ import type { ChatMessage } from "../components/ChatInterface";
6
+ import { Layout } from "../components/Layout";
7
+
8
+ export default function ProjectDetail() {
9
+ const { id } = useParams();
10
+ const { runs, fetchRuns, createRun, loading } = useRunsStore();
11
+
12
+ useEffect(() => {
13
+ if (id) {
14
+ fetchRuns(id);
15
+ }
16
+ }, [id, fetchRuns]);
17
+
18
+ const handleSend = async (text: string) => {
19
+ if (!id || !text.trim()) return;
20
+ await createRun(id, text);
21
+ };
22
+
23
+ // Transform runs (Run[]) into ChatMessage[]
24
+ // Runs are stored [newest, ..., oldest] in store
25
+ // We want to display [oldest, ..., newest] in ChatInterface typically
26
+ const messages = useMemo(() => {
27
+ const msgs: ChatMessage[] = [];
28
+
29
+ // Process in reverse (oldest first) to build chat history
30
+ // Since 'runs' is [newest...oldest], we slice().reverse()
31
+ const sortedRuns = runs.slice().reverse();
32
+
33
+ sortedRuns.forEach((run) => {
34
+ // User Message
35
+ msgs.push({
36
+ id: `${run.id}-user`,
37
+ role: "user",
38
+ content: run.input,
39
+ timestamp: new Date(run.created_at).toLocaleTimeString([], {
40
+ hour: "2-digit",
41
+ minute: "2-digit",
42
+ }),
43
+ });
44
+
45
+ // Assistant Message (if output exists)
46
+ if (run.output) {
47
+ msgs.push({
48
+ id: `${run.id}-ai`,
49
+ role: "assistant",
50
+ content: run.output,
51
+ timestamp: new Date(run.created_at).toLocaleTimeString([], {
52
+ hour: "2-digit",
53
+ minute: "2-digit",
54
+ }),
55
+ // Technically output might be later, but for now using run time is fine
56
+ });
57
+ }
58
+ });
59
+
60
+ return msgs;
61
+ }, [runs]);
62
+
63
+ return (
64
+ <Layout>
65
+ <ChatInterface
66
+ title={`Project ${id}`}
67
+ status={loading ? "Processing..." : "Ready"}
68
+ messages={messages}
69
+ onSendMessage={handleSend}
70
+ isThinking={loading}
71
+ suggestions={[
72
+ "Analyze this code",
73
+ "Explain the architecture",
74
+ "Suggest improvements",
75
+ "Write a test case",
76
+ ]}
77
+ />
78
+ </Layout>
79
+ );
80
+ }