@geenius/ai 0.1.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 (165) hide show
  1. package/.changeset/config.json +11 -0
  2. package/.env.example +2 -0
  3. package/.github/CODEOWNERS +1 -0
  4. package/.github/ISSUE_TEMPLATE/bug_report.md +16 -0
  5. package/.github/ISSUE_TEMPLATE/feature_request.md +11 -0
  6. package/.github/PULL_REQUEST_TEMPLATE.md +10 -0
  7. package/.github/dependabot.yml +11 -0
  8. package/.github/workflows/ci.yml +23 -0
  9. package/.github/workflows/release.yml +29 -0
  10. package/.node-version +1 -0
  11. package/.nvmrc +1 -0
  12. package/.prettierrc +7 -0
  13. package/.project/ACCOUNT.yaml +4 -0
  14. package/.project/IDEAS.yaml +7 -0
  15. package/.project/PROJECT.yaml +11 -0
  16. package/.project/ROADMAP.yaml +15 -0
  17. package/CHANGELOG.md +15 -0
  18. package/CODE_OF_CONDUCT.md +26 -0
  19. package/CONTRIBUTING.md +61 -0
  20. package/LICENSE +21 -0
  21. package/README.md +1 -0
  22. package/SECURITY.md +18 -0
  23. package/SUPPORT.md +14 -0
  24. package/package.json +75 -0
  25. package/packages/convex/package.json +42 -0
  26. package/packages/convex/src/index.ts +8 -0
  27. package/packages/convex/src/mutations/messages.ts +29 -0
  28. package/packages/convex/src/queries/messages.ts +24 -0
  29. package/packages/convex/src/schema.ts +20 -0
  30. package/packages/convex/tsconfig.json +11 -0
  31. package/packages/convex/tsup.config.ts +17 -0
  32. package/packages/react/README.md +1 -0
  33. package/packages/react/package.json +60 -0
  34. package/packages/react/src/components/AILogTable.tsx +90 -0
  35. package/packages/react/src/components/ChatWindow.tsx +118 -0
  36. package/packages/react/src/components/GenerationCard.tsx +73 -0
  37. package/packages/react/src/components/ImageGenerator.tsx +103 -0
  38. package/packages/react/src/components/ModelSelector.tsx +44 -0
  39. package/packages/react/src/components/ModelTestRunner.tsx +148 -0
  40. package/packages/react/src/components/VoiceSelector.tsx +51 -0
  41. package/packages/react/src/components/index.ts +9 -0
  42. package/packages/react/src/hooks/index.ts +12 -0
  43. package/packages/react/src/hooks/useAI.ts +158 -0
  44. package/packages/react/src/hooks/useAILogs.ts +40 -0
  45. package/packages/react/src/hooks/useAIModels.ts +53 -0
  46. package/packages/react/src/hooks/useChat.ts +141 -0
  47. package/packages/react/src/hooks/useContentManager.ts +108 -0
  48. package/packages/react/src/hooks/useImageGeneration.ts +82 -0
  49. package/packages/react/src/hooks/useMemory.ts +161 -0
  50. package/packages/react/src/hooks/useModelTest.ts +126 -0
  51. package/packages/react/src/hooks/useRealtimeAudio.ts +203 -0
  52. package/packages/react/src/hooks/useSkills.ts +114 -0
  53. package/packages/react/src/hooks/useTextToSpeech.ts +99 -0
  54. package/packages/react/src/hooks/useTranscription.ts +119 -0
  55. package/packages/react/src/hooks/useVideoGeneration.ts +79 -0
  56. package/packages/react/src/index.ts +42 -0
  57. package/packages/react/src/pages/AILogsPage.tsx +98 -0
  58. package/packages/react/src/pages/ChatPage.tsx +42 -0
  59. package/packages/react/src/pages/ModelTestPage.tsx +33 -0
  60. package/packages/react/src/pages/index.ts +5 -0
  61. package/packages/react/tsconfig.json +26 -0
  62. package/packages/react/tsup.config.ts +22 -0
  63. package/packages/react-css/README.md +1 -0
  64. package/packages/react-css/package.json +45 -0
  65. package/packages/react-css/src/ai.css +857 -0
  66. package/packages/react-css/src/components/AILogTable.tsx +90 -0
  67. package/packages/react-css/src/components/ChatWindow.tsx +118 -0
  68. package/packages/react-css/src/components/GenerationCard.tsx +73 -0
  69. package/packages/react-css/src/components/ImageGenerator.tsx +103 -0
  70. package/packages/react-css/src/components/ModelSelector.tsx +44 -0
  71. package/packages/react-css/src/components/ModelTestRunner.tsx +148 -0
  72. package/packages/react-css/src/components/VoiceSelector.tsx +51 -0
  73. package/packages/react-css/src/components/index.ts +9 -0
  74. package/packages/react-css/src/hooks/index.ts +12 -0
  75. package/packages/react-css/src/hooks/useAI.ts +153 -0
  76. package/packages/react-css/src/hooks/useAILogs.ts +40 -0
  77. package/packages/react-css/src/hooks/useAIModels.ts +51 -0
  78. package/packages/react-css/src/hooks/useChat.ts +145 -0
  79. package/packages/react-css/src/hooks/useContentManager.ts +108 -0
  80. package/packages/react-css/src/hooks/useImageGeneration.ts +82 -0
  81. package/packages/react-css/src/hooks/useMemory.ts +161 -0
  82. package/packages/react-css/src/hooks/useModelTest.ts +122 -0
  83. package/packages/react-css/src/hooks/useRealtimeAudio.ts +203 -0
  84. package/packages/react-css/src/hooks/useSkills.ts +114 -0
  85. package/packages/react-css/src/hooks/useTextToSpeech.ts +99 -0
  86. package/packages/react-css/src/hooks/useTranscription.ts +119 -0
  87. package/packages/react-css/src/hooks/useVideoGeneration.ts +79 -0
  88. package/packages/react-css/src/index.ts +35 -0
  89. package/packages/react-css/src/pages/AILogsPage.tsx +98 -0
  90. package/packages/react-css/src/pages/ChatPage.tsx +42 -0
  91. package/packages/react-css/src/pages/ModelTestPage.tsx +33 -0
  92. package/packages/react-css/src/pages/index.ts +5 -0
  93. package/packages/react-css/src/styles.css +127 -0
  94. package/packages/react-css/tsconfig.json +26 -0
  95. package/packages/react-css/tsup.config.ts +2 -0
  96. package/packages/shared/README.md +1 -0
  97. package/packages/shared/package.json +71 -0
  98. package/packages/shared/src/__tests__/ai.test.ts +67 -0
  99. package/packages/shared/src/ai-client.ts +243 -0
  100. package/packages/shared/src/config.ts +235 -0
  101. package/packages/shared/src/content.ts +249 -0
  102. package/packages/shared/src/convex/helpers.ts +163 -0
  103. package/packages/shared/src/convex/index.ts +16 -0
  104. package/packages/shared/src/convex/schemas.ts +146 -0
  105. package/packages/shared/src/convex/validators.ts +136 -0
  106. package/packages/shared/src/index.ts +107 -0
  107. package/packages/shared/src/memory.ts +197 -0
  108. package/packages/shared/src/providers/base.ts +103 -0
  109. package/packages/shared/src/providers/elevenlabs.ts +155 -0
  110. package/packages/shared/src/providers/index.ts +28 -0
  111. package/packages/shared/src/providers/openai-compatible.ts +286 -0
  112. package/packages/shared/src/providers/registry.ts +113 -0
  113. package/packages/shared/src/providers/replicate-fal.ts +230 -0
  114. package/packages/shared/src/skills.ts +273 -0
  115. package/packages/shared/src/types.ts +501 -0
  116. package/packages/shared/tsconfig.json +25 -0
  117. package/packages/shared/tsup.config.ts +22 -0
  118. package/packages/shared/vitest.config.ts +4 -0
  119. package/packages/solidjs/README.md +1 -0
  120. package/packages/solidjs/package.json +59 -0
  121. package/packages/solidjs/src/components/ChatWindow.tsx +78 -0
  122. package/packages/solidjs/src/components/GenerationCard.tsx +62 -0
  123. package/packages/solidjs/src/components/ModelTestRunner.tsx +119 -0
  124. package/packages/solidjs/src/components/index.ts +5 -0
  125. package/packages/solidjs/src/index.ts +32 -0
  126. package/packages/solidjs/src/pages/ChatPage.tsx +22 -0
  127. package/packages/solidjs/src/pages/ModelTestPage.tsx +22 -0
  128. package/packages/solidjs/src/pages/index.ts +4 -0
  129. package/packages/solidjs/src/primitives/createAI.ts +79 -0
  130. package/packages/solidjs/src/primitives/createChat.ts +100 -0
  131. package/packages/solidjs/src/primitives/createContentManager.ts +61 -0
  132. package/packages/solidjs/src/primitives/createImageGeneration.ts +46 -0
  133. package/packages/solidjs/src/primitives/createMemory.ts +127 -0
  134. package/packages/solidjs/src/primitives/createModelTest.ts +89 -0
  135. package/packages/solidjs/src/primitives/createSkills.ts +83 -0
  136. package/packages/solidjs/src/primitives/createTextToSpeech.ts +56 -0
  137. package/packages/solidjs/src/primitives/createVideoGeneration.ts +46 -0
  138. package/packages/solidjs/src/primitives/index.ts +8 -0
  139. package/packages/solidjs/tsconfig.json +27 -0
  140. package/packages/solidjs/tsup.config.ts +21 -0
  141. package/packages/solidjs-css/README.md +1 -0
  142. package/packages/solidjs-css/package.json +44 -0
  143. package/packages/solidjs-css/src/ai.css +857 -0
  144. package/packages/solidjs-css/src/components/ChatWindow.tsx +78 -0
  145. package/packages/solidjs-css/src/components/GenerationCard.tsx +62 -0
  146. package/packages/solidjs-css/src/components/ModelTestRunner.tsx +119 -0
  147. package/packages/solidjs-css/src/components/index.ts +5 -0
  148. package/packages/solidjs-css/src/index.ts +26 -0
  149. package/packages/solidjs-css/src/pages/ChatPage.tsx +22 -0
  150. package/packages/solidjs-css/src/pages/ModelTestPage.tsx +22 -0
  151. package/packages/solidjs-css/src/pages/index.ts +4 -0
  152. package/packages/solidjs-css/src/primitives/createAI.ts +79 -0
  153. package/packages/solidjs-css/src/primitives/createChat.ts +100 -0
  154. package/packages/solidjs-css/src/primitives/createContentManager.ts +61 -0
  155. package/packages/solidjs-css/src/primitives/createImageGeneration.ts +46 -0
  156. package/packages/solidjs-css/src/primitives/createMemory.ts +127 -0
  157. package/packages/solidjs-css/src/primitives/createModelTest.ts +89 -0
  158. package/packages/solidjs-css/src/primitives/createSkills.ts +83 -0
  159. package/packages/solidjs-css/src/primitives/createTextToSpeech.ts +56 -0
  160. package/packages/solidjs-css/src/primitives/createVideoGeneration.ts +46 -0
  161. package/packages/solidjs-css/src/primitives/index.ts +1 -0
  162. package/packages/solidjs-css/src/styles.css +127 -0
  163. package/packages/solidjs-css/tsconfig.json +27 -0
  164. package/packages/solidjs-css/tsup.config.ts +2 -0
  165. package/pnpm-workspace.yaml +2 -0
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
3
+ "changelog": "@changesets/cli/changelog",
4
+ "commit": false,
5
+ "fixed": [],
6
+ "linked": [],
7
+ "access": "public",
8
+ "baseBranch": "main",
9
+ "updateInternalDependencies": "patch",
10
+ "ignore": []
11
+ }
package/.env.example ADDED
@@ -0,0 +1,2 @@
1
+ # No environment variables required for library development
2
+ # This file exists for compliance — the library has no runtime env dependencies
@@ -0,0 +1 @@
1
+ * @mxn2020
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: Bug Report
3
+ about: Report a bug
4
+ labels: bug
5
+ ---
6
+
7
+ ## Describe the bug
8
+
9
+ ## Steps to reproduce
10
+
11
+ ## Expected behavior
12
+
13
+ ## Environment
14
+ - Package version:
15
+ - Node version:
16
+ - OS:
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: Feature Request
3
+ about: Suggest a new feature
4
+ labels: enhancement
5
+ ---
6
+
7
+ ## Problem
8
+
9
+ ## Proposed solution
10
+
11
+ ## Alternatives considered
@@ -0,0 +1,10 @@
1
+ ## What
2
+
3
+ ## Why
4
+
5
+ ## How
6
+
7
+ ## Checklist
8
+ - [ ] Tests added/updated
9
+ - [ ] `pnpm changeset` run (if applicable)
10
+ - [ ] Documentation updated
@@ -0,0 +1,11 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "npm"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
7
+ open-pull-requests-limit: 10
8
+ - package-ecosystem: "github-actions"
9
+ directory: "/"
10
+ schedule:
11
+ interval: "weekly"
@@ -0,0 +1,23 @@
1
+ name: CI
2
+ on:
3
+ pull_request:
4
+ branches: [main]
5
+ push:
6
+ branches: [main]
7
+
8
+ jobs:
9
+ check:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ - uses: pnpm/action-setup@v4
14
+ with:
15
+ version: 10
16
+ - uses: actions/setup-node@v4
17
+ with:
18
+ node-version-file: '.nvmrc'
19
+ cache: 'pnpm'
20
+ - run: pnpm install --frozen-lockfile
21
+ - run: pnpm build
22
+ - run: pnpm lint
23
+ - run: pnpm test
@@ -0,0 +1,29 @@
1
+ name: Release
2
+ on:
3
+ push:
4
+ branches: [main]
5
+
6
+ concurrency: ${{ github.workflow }}-${{ github.ref }}
7
+
8
+ jobs:
9
+ release:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ - uses: pnpm/action-setup@v4
14
+ with:
15
+ version: 10
16
+ - uses: actions/setup-node@v4
17
+ with:
18
+ node-version-file: '.nvmrc'
19
+ cache: 'pnpm'
20
+ registry-url: 'https://registry.npmjs.org'
21
+ - run: pnpm install --frozen-lockfile
22
+ - run: pnpm build
23
+ - uses: changesets/action@v1
24
+ with:
25
+ publish: pnpm changeset publish
26
+ version: pnpm changeset version
27
+ env:
28
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
package/.node-version ADDED
@@ -0,0 +1 @@
1
+ 20
package/.nvmrc ADDED
@@ -0,0 +1 @@
1
+ 22
package/.prettierrc ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "semi": false,
3
+ "singleQuote": true,
4
+ "trailingComma": "all",
5
+ "printWidth": 120,
6
+ "tabWidth": 2
7
+ }
@@ -0,0 +1,4 @@
1
+ owner: Mehdi Nabhani
2
+ email: mehdi@geenius.app
3
+ github: mxn2020
4
+ organization: geenius
@@ -0,0 +1,7 @@
1
+ ideas:
2
+ - title: "CLI scaffolding"
3
+ description: "Add a create command to geenius-cli for this package"
4
+ priority: medium
5
+ - title: "Vue adapter"
6
+ description: "Add Vue 3 support alongside React and SolidJS"
7
+ priority: low
@@ -0,0 +1,11 @@
1
+ name: geenius-ai
2
+ description: "Geenius AI — Reusable AI packages for Convex apps (React + SolidJS)"
3
+ category: library
4
+ priority: high
5
+ tags:
6
+ - geenius
7
+ - npm-package
8
+ - react
9
+ - solidjs
10
+ deploy_url: null
11
+ npm_scope: "@geenius-ai"
@@ -0,0 +1,15 @@
1
+ version: "0.1"
2
+ milestones:
3
+ - name: "v0.1.0 — Initial Release"
4
+ status: in-progress
5
+ items:
6
+ - "Core shared types and logic"
7
+ - "React hooks and components"
8
+ - "SolidJS primitives"
9
+ - "npm publishing via Changesets"
10
+ - name: "v0.2.0 — Stability"
11
+ status: planned
12
+ items:
13
+ - "Test coverage ≥ 50%"
14
+ - "API documentation"
15
+ - "Convex adapter"
package/CHANGELOG.md ADDED
@@ -0,0 +1,15 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.0.1] - 2026-03-08
9
+
10
+ ### Added
11
+ - Initial release
12
+ - React hooks: `useAI`, `useChat`, `useAILogs`, `useModelTest`, `useAIModels`
13
+ - React components: `ChatWindow`, `ModelSelector`, `AILogTable`, `ModelTestRunner`, `GenerationCard`
14
+ - React pages: `ChatPage`, `ModelTestPage`, `AILogsPage`
15
+ - Shared types and model configurations
@@ -0,0 +1,26 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
6
+
7
+ ## Our Standards
8
+
9
+ Examples of behavior that contributes to a positive environment:
10
+ - Using welcoming and inclusive language
11
+ - Being respectful of differing viewpoints and experiences
12
+ - Gracefully accepting constructive criticism
13
+ - Focusing on what is best for the community
14
+
15
+ Examples of unacceptable behavior:
16
+ - Trolling, insulting/derogatory comments, and personal or political attacks
17
+ - Public or private harassment
18
+ - Publishing others' private information without explicit permission
19
+
20
+ ## Enforcement
21
+
22
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the project maintainers at support@geenius.app. All complaints will be reviewed and investigated.
23
+
24
+ ## Attribution
25
+
26
+ This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 2.1.
@@ -0,0 +1,61 @@
1
+ # Contributing to @geenius-ai
2
+
3
+ Thank you for your interest in contributing! This guide will help you get started.
4
+
5
+ ## Development Setup
6
+
7
+ ```bash
8
+ # Clone the repository
9
+ git clone https://github.com/mxn2020/geenius-ai.git
10
+ cd geenius-ai
11
+
12
+ # Install dependencies
13
+ pnpm install
14
+
15
+ # Build all packages
16
+ pnpm build
17
+
18
+ # Run tests
19
+ pnpm test
20
+
21
+ # Lint
22
+ pnpm lint
23
+ ```
24
+
25
+ ## Project Structure
26
+
27
+ ```
28
+ packages/
29
+ react/ — React hooks, components, and pages for AI
30
+ shared/ — Shared types, prompts, and model configs
31
+ solidjs/ — SolidJS hooks and components for AI
32
+ ```
33
+
34
+ ## Contribution Workflow
35
+
36
+ 1. **Fork** the repository
37
+ 2. **Create a branch** for your change: `git checkout -b feat/my-feature`
38
+ 3. **Make your changes** and add tests
39
+ 4. **Ensure checks pass**: `pnpm lint && pnpm test && pnpm build`
40
+ 5. **Commit** with a conventional message: `feat: add useStreamChat hook`
41
+ 6. **Push** and open a Pull Request
42
+
43
+ ## Commit Convention
44
+
45
+ We follow [Conventional Commits](https://www.conventionalcommits.org/):
46
+ - `feat:` — New feature or hook
47
+ - `fix:` — Bug fix
48
+ - `docs:` — Documentation only
49
+ - `refactor:` — Code change that neither fixes a bug nor adds a feature
50
+ - `test:` — Adding or updating tests
51
+ - `chore:` — Tooling, CI, dependencies
52
+
53
+ ## Code Style
54
+
55
+ - TypeScript strict mode
56
+ - Prettier for formatting
57
+ - ESLint for linting
58
+
59
+ ## Questions?
60
+
61
+ Open an issue or reach out at support@geenius.app.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Geenius
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1 @@
1
+ # ✦ geenius-ai\n\n> Geenius AI — Reusable AI packages for Convex apps (React + SolidJS)\n\n---\n\n## Overview\nBuilt with Steve Jobs-level minimalism and Jony Ive-level craftsmanship, this package is designed to deliver unparalleled developer experience (DX) and rock-solid performance.\n\n## Installation\n\n```bash\npnpm add geenius-ai\n```\n\n## Usage\n\n```typescript\nimport { init } from 'geenius-ai';\n\n// Initialize the module with absolute precision\ninit({\n mode: 'premium',\n});\n```\n\n## Architecture\n- **Zero-config**: It just works.\n- **Strictly Typed**: Fully written in TypeScript for flawless IntelliSense.\n- **Framework Agnostic**: seamlessly integrates into the Geenius ecosystem.\n\n---\n\n*Designed by Antigravity HQ*\n
package/SECURITY.md ADDED
@@ -0,0 +1,18 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ | Version | Supported |
6
+ |---------|-------------------|
7
+ | 0.0.x | ✅ Yes |
8
+
9
+ ## Reporting a Vulnerability
10
+
11
+ If you discover a security vulnerability, please report it responsibly:
12
+
13
+ 1. **Do NOT** open a public GitHub issue
14
+ 2. **Email** security@geenius.app with details
15
+ 3. Include steps to reproduce, impact assessment, and any suggested fix
16
+ 4. You will receive a response within **48 hours**
17
+
18
+ We will coordinate disclosure and credit you (if desired) once the issue is resolved.
package/SUPPORT.md ADDED
@@ -0,0 +1,14 @@
1
+ # Support
2
+
3
+ ## Getting Help
4
+
5
+ - **Documentation**: See the [README](./README.md) for usage and API reference
6
+ - **Issues**: [Open a GitHub issue](https://github.com/mxn2020/geenius-ai/issues) for bugs or feature requests
7
+ - **Discussions**: Use [GitHub Discussions](https://github.com/mxn2020/geenius-ai/discussions) for questions and community support
8
+ - **Email**: support@geenius.app for private inquiries
9
+
10
+ ## Response Times
11
+
12
+ - **Bug reports**: Within 48 hours
13
+ - **Feature requests**: Reviewed weekly
14
+ - **Security issues**: Within 24 hours (see [SECURITY.md](./SECURITY.md))
package/package.json ADDED
@@ -0,0 +1,75 @@
1
+ {
2
+ "name": "@geenius/ai",
3
+ "type": "module",
4
+ "version": "0.1.0",
5
+ "description": "Geenius AI — Reusable AI packages for Convex apps (React + SolidJS)",
6
+ "author": "Antigravity HQ",
7
+ "license": "MIT",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/mxn2020/geenius-ai.git"
11
+ },
12
+ "keywords": [
13
+ "ai",
14
+ "hooks",
15
+ "convex",
16
+ "react",
17
+ "solidjs",
18
+ "nvidia",
19
+ "geenius"
20
+ ],
21
+ "scripts": {
22
+ "dev": "pnpm -r --parallel type-check",
23
+ "build": "pnpm -r build",
24
+ "clean": "pnpm -r clean",
25
+ "lint": "pnpm -r --parallel type-check",
26
+ "test": "echo \"No tests configured yet\" && exit 0",
27
+ "type-check": "pnpm -r type-check",
28
+ "format": "prettier --write \"packages/*/src/**/*.{ts,tsx}\"",
29
+ "version:patch": "pnpm -r exec -- npm version patch --no-git-tag-version && npm version patch -m 'v%s'",
30
+ "version:minor": "pnpm -r exec -- npm version minor --no-git-tag-version && npm version minor -m 'v%s'",
31
+ "version:major": "pnpm -r exec -- npm version major --no-git-tag-version && npm version major -m 'v%s'",
32
+ "release": "git push && git push --tags",
33
+ "publish:all": "pnpm -r publish --access public",
34
+ "stop": "pkill -f 'vite.*geenius-ai' || true"
35
+ },
36
+ "devDependencies": {
37
+ "prettier": "^3.8.1",
38
+ "typescript": "~6.0.2"
39
+ },
40
+ "engines": {
41
+ "node": ">=20.0.0"
42
+ },
43
+ "exports": {
44
+ ".": {
45
+ "types": "./packages/shared/dist/index.d.ts",
46
+ "import": "./packages/shared/dist/index.js"
47
+ },
48
+ "./shared": {
49
+ "types": "./packages/shared/dist/index.d.ts",
50
+ "import": "./packages/shared/dist/index.js"
51
+ },
52
+ "./convex": {
53
+ "types": "./packages/convex/dist/index.d.ts",
54
+ "import": "./packages/convex/dist/index.js"
55
+ },
56
+ "./react": {
57
+ "types": "./packages/react/dist/index.d.ts",
58
+ "import": "./packages/react/dist/index.js"
59
+ },
60
+ "./react-css": {
61
+ "types": "./packages/react-css/dist/index.d.ts",
62
+ "import": "./packages/react-css/dist/index.js"
63
+ },
64
+ "./solidjs": {
65
+ "types": "./packages/solidjs/dist/index.d.ts",
66
+ "import": "./packages/solidjs/dist/index.js"
67
+ },
68
+ "./solidjs-css": {
69
+ "types": "./packages/solidjs-css/dist/index.d.ts",
70
+ "import": "./packages/solidjs-css/dist/index.js"
71
+ }
72
+ },
73
+ "main": "./packages/shared/dist/index.js",
74
+ "types": "./packages/shared/dist/index.d.ts"
75
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "@geenius-ai/convex",
3
+ "version": "0.1.0",
4
+ "private": false,
5
+ "type": "module",
6
+ "description": "Convex backend functions and schema for AI features",
7
+ "author": "Antigravity HQ",
8
+ "license": "MIT",
9
+ "publishConfig": {
10
+ "access": "public"
11
+ },
12
+ "main": "./dist/index.js",
13
+ "module": "./dist/index.js",
14
+ "types": "./dist/index.d.ts",
15
+ "exports": {
16
+ ".": {
17
+ "types": "./dist/index.d.ts",
18
+ "import": "./dist/index.js"
19
+ }
20
+ },
21
+ "files": [
22
+ "dist",
23
+ "src"
24
+ ],
25
+ "scripts": {
26
+ "build": "tsup",
27
+ "clean": "rm -rf dist",
28
+ "type-check": "tsc --noEmit",
29
+ "prepublishOnly": "pnpm clean && pnpm build"
30
+ },
31
+ "peerDependencies": {
32
+ "convex": "^1.34.0"
33
+ },
34
+ "devDependencies": {
35
+ "convex": "^1.34.0",
36
+ "tsup": "^8.5.1",
37
+ "typescript": "~6.0.2"
38
+ },
39
+ "engines": {
40
+ "node": ">=20.0.0"
41
+ }
42
+ }
@@ -0,0 +1,8 @@
1
+ // Schema exports
2
+ export { aiTables } from './schema'
3
+
4
+ // Query exports
5
+ export { getMessages, getConversation } from './queries/messages'
6
+
7
+ // Mutation exports
8
+ export { saveMessage, clearConversation } from './mutations/messages'
@@ -0,0 +1,29 @@
1
+ import { mutation } from 'convex/server'
2
+ import { v } from 'convex/values'
3
+
4
+ export const saveMessage = mutation({
5
+ args: {
6
+ userId: v.string(),
7
+ conversationId: v.optional(v.string()),
8
+ role: v.union(
9
+ v.literal('user'),
10
+ v.literal('assistant'),
11
+ v.literal('system'),
12
+ ),
13
+ content: v.string(),
14
+ model: v.optional(v.string()),
15
+ tokens: v.optional(v.number()),
16
+ },
17
+ handler: async (ctx, args) => {
18
+ // Placeholder: would save message to database
19
+ return null
20
+ },
21
+ })
22
+
23
+ export const clearConversation = mutation({
24
+ args: { conversationId: v.string() },
25
+ handler: async (ctx, args) => {
26
+ // Placeholder: would delete all messages in conversation from database
27
+ return null
28
+ },
29
+ })
@@ -0,0 +1,24 @@
1
+ import { query } from 'convex/server'
2
+ import { v } from 'convex/values'
3
+
4
+ export const getMessages = query({
5
+ args: {
6
+ userId: v.string(),
7
+ limit: v.optional(v.number()),
8
+ },
9
+ handler: async (ctx, args) => {
10
+ // Placeholder: would fetch messages for user from database
11
+ return []
12
+ },
13
+ })
14
+
15
+ export const getConversation = query({
16
+ args: {
17
+ conversationId: v.string(),
18
+ limit: v.optional(v.number()),
19
+ },
20
+ handler: async (ctx, args) => {
21
+ // Placeholder: would fetch conversation messages from database
22
+ return []
23
+ },
24
+ })
@@ -0,0 +1,20 @@
1
+ import { defineTable } from 'convex/server'
2
+ import { v } from 'convex/values'
3
+
4
+ export const aiTables = {
5
+ chatMessages: defineTable({
6
+ userId: v.string(),
7
+ conversationId: v.optional(v.string()),
8
+ role: v.union(
9
+ v.literal('user'),
10
+ v.literal('assistant'),
11
+ v.literal('system'),
12
+ ),
13
+ content: v.string(),
14
+ model: v.optional(v.string()),
15
+ tokens: v.optional(v.number()),
16
+ createdAt: v.number(),
17
+ })
18
+ .index('by_user', ['userId'])
19
+ .index('by_conversation', ['conversationId']),
20
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "extends": "../../tsconfig.json",
3
+ "compilerOptions": {
4
+ "rootDir": "./src",
5
+ "outDir": "./dist",
6
+ "declaration": true,
7
+ "declarationMap": true,
8
+ "sourceMap": true
9
+ },
10
+ "include": ["src"]
11
+ }
@@ -0,0 +1,17 @@
1
+ import { defineConfig } from 'tsup'
2
+
3
+ export default defineConfig({
4
+ entry: {
5
+ index: 'src/index.ts',
6
+ },
7
+ format: ['esm'],
8
+ dts: true,
9
+ clean: true,
10
+ sourcemap: true,
11
+ external: [
12
+ 'convex',
13
+ 'convex/server',
14
+ 'convex/values',
15
+ 'convex/react',
16
+ ],
17
+ })
@@ -0,0 +1 @@
1
+ # ✦ @geenius-ai/react\n\n> React hooks, components, and pages for geenius-ai\n\n---\n\n## Overview\nBuilt with Steve Jobs-level minimalism and Jony Ive-level craftsmanship, this package is designed to deliver unparalleled developer experience (DX) and rock-solid performance.\n\n## Installation\n\n```bash\npnpm add @geenius-ai/react\n```\n\n## Usage\n\n```typescript\nimport { init } from '@geenius-ai/react';\n\n// Initialize the module with absolute precision\ninit({\n mode: 'premium',\n});\n```\n\n## Architecture\n- **Zero-config**: It just works.\n- **Strictly Typed**: Fully written in TypeScript for flawless IntelliSense.\n- **Framework Agnostic**: seamlessly integrates into the Geenius ecosystem.\n\n---\n\n*Designed by Antigravity HQ*\n
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "@geenius-ai/react",
3
+ "version": "0.1.0",
4
+ "private": false,
5
+ "type": "module",
6
+ "description": "React hooks, components, and pages for geenius-ai",
7
+ "author": "Antigravity HQ",
8
+ "license": "MIT",
9
+ "main": "./dist/index.js",
10
+ "module": "./dist/index.js",
11
+ "types": "./dist/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/index.js"
16
+ },
17
+ "./hooks": {
18
+ "types": "./dist/hooks/index.d.ts",
19
+ "import": "./dist/hooks/index.js"
20
+ },
21
+ "./components": {
22
+ "types": "./dist/components/index.d.ts",
23
+ "import": "./dist/components/index.js"
24
+ },
25
+ "./pages": {
26
+ "types": "./dist/pages/index.d.ts",
27
+ "import": "./dist/pages/index.js"
28
+ }
29
+ },
30
+ "files": [
31
+ "dist",
32
+ "src"
33
+ ],
34
+ "scripts": {
35
+ "build": "tsup",
36
+ "clean": "rm -rf dist",
37
+ "type-check": "tsc --noEmit",
38
+ "prepublishOnly": "pnpm clean && pnpm build"
39
+ },
40
+ "dependencies": {
41
+ "@geenius-ai/shared": "workspace:*"
42
+ },
43
+ "peerDependencies": {
44
+ "convex": ">=1.0.0",
45
+ "react": ">=18.0.0"
46
+ },
47
+ "devDependencies": {
48
+ "@types/react": "^19.0.0",
49
+ "convex": "^1.34.0",
50
+ "react": "^19.2.4",
51
+ "tsup": "^8.5.1",
52
+ "typescript": "~6.0.2"
53
+ },
54
+ "engines": {
55
+ "node": ">=20.0.0"
56
+ },
57
+ "publishConfig": {
58
+ "access": "public"
59
+ }
60
+ }