Commit Graph

62 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
7104826828 Phase 4: Add 'use client' directives - Build successful
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2025-12-25 03:40:33 +00:00
copilot-swe-agent[bot]
2b752ce3b6 Complete Phase 3: Build compiles successfully, fix runtime errors next
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2025-12-25 03:32:08 +00:00
copilot-swe-agent[bot]
80110ea196 Fix build errors: Buffer types, Spark API stubs, and role type casts
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2025-12-25 03:28:09 +00:00
copilot-swe-agent[bot]
72c3c40620 Wire up DBAL with server-side integration and API route example
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2025-12-25 03:08:21 +00:00
copilot-swe-agent[bot]
0e658b79d0 Fix DBAL integration config and async context handling
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2025-12-25 02:41:04 +00:00
copilot-swe-agent[bot]
34013fe8af Phase 3: Fix Spark API compatibility and database imports
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2025-12-25 02:38:36 +00:00
copilot-swe-agent[bot]
3e9a3174d0 Phase 2: Fix Next.js build configuration and TypeScript errors
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2025-12-25 02:25:09 +00:00
copilot-swe-agent[bot]
355c273b16 Wire C++ and TypeScript DBAL into main MetaBuilder project
Integrated DBAL components throughout the application:

**Integration Layer (`src/lib/dbal-integration.ts`):**
- Singleton DBALIntegration class
- Manages DBAL client, tenant manager, KV store, and blob storage
- Provides high-level API for all DBAL operations
- Automatic tenant scoping (default tenant)
- Error handling utilities

**React Hooks (`src/hooks/useDBAL.ts`):**
- `useDBAL()` - Initialize and check DBAL readiness
- `useKVStore()` - Key-value store operations with auto error handling
- `useBlobStorage()` - Blob storage operations with toast notifications
- `useCachedData()` - Automatic caching with React state management

**Demo Component (`src/components/DBALDemo.tsx`):**
- Comprehensive demonstration of all DBAL features
- Three tabs: KV Store, Blob Storage, Cached Data
- Interactive examples with forms and buttons
- Real-time feedback with toast notifications
- Shows best practices for DBAL usage

**Path Configuration:**
- Updated `tsconfig.json` with `@/dbal/*` path alias
- Updated `vite.config.ts` with dbal path resolution
- Enables clean imports: `import { DBALClient } from '@/dbal/ts/src'`

**Features Integrated:**
- **Key-Value Store**: Store/retrieve any JSON-serializable data
- **List Management**: Arrays with add/get operations
- **Blob Storage**: Upload/download binary data (images, files)
- **Multi-Tenant**: Automatic tenant isolation (default tenant)
- **TTL Support**: Automatic expiration for cached data
- **Metadata**: Store custom metadata with blobs
- **Error Handling**: Graceful error handling with user feedback

**Usage Examples:**
```typescript
// In any component
import { useKVStore } from '@/hooks/useDBAL'

const kv = useKVStore()
await kv.set('user-prefs', { theme: 'dark' }, 3600)
const prefs = await kv.get('user-prefs')

// Blob storage
import { useBlobStorage } from '@/hooks/useDBAL'
const blob = useBlobStorage()
await blob.upload('avatar.png', imageData)

// Cached data
import { useCachedData } from '@/hooks/useDBAL'
const { data, save } = useCachedData('settings')
await save({ notifications: true })
```

**Documentation:**
- Complete integration guide (DBAL_INTEGRATION.md)
- Architecture diagrams
- API reference
- Usage examples
- Troubleshooting guide

**TypeScript Support:**
- Full type safety with generics
- IntelliSense support for all APIs
- Type-safe error handling

**Production Ready:**
- In-memory adapter for browser (development)
- HTTP adapter ready for C++ daemon (production)
- Multi-tenant support with quotas
- Access control ready
- Error handling and logging

Next steps: Use DBAL hooks in existing components to replace localStorage/sessionStorage.

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2025-12-25 01:04:07 +00:00
5c84ce4844 Generated by Spark: Atoms, Molecules, Organism structure for react components 2025-12-24 21:37:37 +00:00
cb45a3f45b Generated by Spark: Auto Merge - green, Deployment & Monitoring - red but top says greem 2025-12-24 21:30:55 +00:00
80e2b2c4b1 Generated by Spark: thing at top of actions screen doesnt consider Deployment & Monitoring 2025-12-24 21:28:14 +00:00
27e1d4da77 Generated by Spark: Fix all reported errors. 2025-12-24 21:24:32 +00:00
1145084815 Edited Spark 2025-12-24 21:22:25 +00:00
e6b75c11a5 Generated by Spark: download output from github actions page and analyse it 2025-12-24 21:20:29 +00:00
0491b9700a Generated by Spark: Fix all reported errors. 2025-12-24 21:15:55 +00:00
5092b06e37 Edited Spark 2025-12-24 21:13:15 +00:00
b129830574 Generated by Spark: download output from github actions page and analyse it 2025-12-24 21:06:29 +00:00
1009807afb Generated by Spark: Now use a tool like playwright to fetch the page, download a screenshot and have a look at it 2025-12-24 21:02:06 +00:00
f2e76c5f90 Generated by Spark: Add auto-refresh every 30 seconds for live build status 2025-12-24 20:58:58 +00:00
67f64448ea Generated by Spark: Make it really clear if most recent build passed or faled 2025-12-24 20:56:22 +00:00
f66332c149 Generated by Spark: Consider the data thats coming in and put a conclusion at the top with some badges 2025-12-24 20:54:07 +00:00
4ac5c16fe3 Generated by Spark: Oh wow it worked, now restore homepage and make this a tab 2025-12-24 20:52:17 +00:00
f69faf8086 Generated by Spark: is there any way to bypass? Access to fetch at 'https://github.com/johndoe6345789/metabuilder/actions' from origin 'https://supreme-space-xylophone-697v74xg4554hjrr-5000.app.github.dev' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. 2025-12-24 20:48:43 +00:00
0b4ebbf00d Generated by Spark: run a fetch() call on https://github.com/johndoe6345789/metabuilder/actions 2025-12-24 20:45:53 +00:00
d6265c47ed Generated by Spark: Phase 2: Hybrid Mode <-- do this, phase 3 is not realistic 2025-12-24 20:26:43 +00:00
5d45177b3a Generated by Spark: I want to set up Prisma through a C++ layer for security reasons - that way we are not giving users direct access to the database. Main issue is: How can I give Github Spark the ability to run this daemon? 2025-12-24 19:59:40 +00:00
5cd62c08e8 Generated by Spark: Each package in package folder has a unit tests folder 2025-12-24 19:51:20 +00:00
38b28c0dab Generated by Spark: header and footer can be 1 component esch 2025-12-24 19:12:35 +00:00
8fe11dd13c Generated by Spark: Check for any other components that can be atomic 2025-12-24 19:09:37 +00:00
5d411a5282 Generated by Spark: Keep all components small like <150LOC 2025-12-24 19:02:54 +00:00
66e22a4a1d Generated by Spark: Fix all reported errors. 2025-12-24 18:56:41 +00:00
750c7eff4c Generated by Spark: Ensure we use Prisma for database layer 2025-12-24 18:55:21 +00:00
b3428070c4 Merge remote-tracking branch 'origin/main' 2025-12-24 18:42:03 +00:00
929e05767c Generated by Spark: Fix all reported errors. 2025-12-24 18:42:02 +00:00
copilot-swe-agent[bot]
2270c5f32e Fix ESLint errors causing CI/CD pipeline failures
- Fixed unnecessary escape character in security-scanner.ts regex pattern
- Added eslint-disable comment for necessary this alias in lua-engine.ts
- Added comments to empty catch blocks in ComponentConfigDialog.tsx
- Wrapped case blocks with lexical declarations in braces:
  - FieldRenderer.tsx (relation case)
  - ModelListView.tsx (select case)
  - RenderComponent.tsx (Heading case)

All 10 ESLint errors have been resolved. Lint now passes with 0 errors, 331 warnings.

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2025-12-24 03:56:39 +00:00
32268472c3 Generated by Spark: one package may have several lua scripts. sub folder? 2025-12-24 00:21:11 +00:00
2d282e6790 Generated by Spark: have like /packages/admin_dialog/ then in there /seed/ /static_content/ the seed folder has everything it needs lua scripts, component props the works. Apply this to a variety of components, then its just a case of gluing the packages together on the page. 2025-12-24 00:15:38 +00:00
a6a0a77868 Generated by Spark: Try to reduce dependence on hardcoded tsx files by making stuff generic and procedurally generated. We have a powerful concept with good documentation. Write the project with as little typescript as possible.
The seed data will be huge though, which is fine. You can handle this by making the seed data modular then glueing it together at last minute. Better still, put it all in an isolated folder structure.
2025-12-24 00:02:47 +00:00
cc3f48ae3a Generated by Spark: Try to reduce dependence on hardcoded tsx files by making stuff generic and procedurally generated. We have a powerful concept with good documentation. 2025-12-23 23:50:04 +00:00
70f12bc460 Generated by Spark: Convert Forum component to declarative JSON and Lua 2025-12-23 23:37:20 +00:00
241d5cf3ff Generated by Spark: Rewrite IRC as a bunch of declarative json and lua. then remove its tsx file. Upgrade related code to support this. 2025-12-23 23:33:56 +00:00
3b914e573e Generated by Spark: Theme editor, Dark Mode, Light Mode
Password reset email - probably generate a 16 char scrambled password for them.

No password box on register, just email a scrambled one. Change password button in user profile emails them a new password. Option to contact administrator for help.

Configuration area: Smtp email configuration page.

IRC Style Webchat package.

Default passwords are scrambled.
2025-12-23 23:26:01 +00:00
641b8b0b82 Generated by Spark: Improve security, sandbox as much stuff as possible and scan and filter malicious code - probably warn user if some virus code has been inputted. 2025-12-23 23:10:24 +00:00
9af357c344 Generated by Spark: Make UI simpler with nerd mode is off and dont expose so many code windows. 2025-12-23 22:58:38 +00:00
38bc7e7bea Generated by Spark: Ability to turn nerd mode on/off, enables a little corner of god tier panel that has a full web ide with virtual folder tree, github/gitlab integration and testing/debugging tools. 2025-12-23 22:51:40 +00:00
d1b659ea65 Generated by Spark: Import / export packages as zips, various images and other asserts can go in same zip 2025-12-23 22:43:58 +00:00
60023b7a2c Generated by Spark: Multi tenancy, might need a Super God level. He has ability to get his user as the homepage. Else other gods will be fighting over rights for the homepage. Maybe could make it so you can only ever have one super god and the super god can transfer his powers to someone else and get downgraded to a god. 2025-12-23 22:37:32 +00:00
ea7a6c4749 Generated by Spark: Docker style package system --> I can drop in a forum, guestbook, retro game site, youtube clone, spotify clone and its all powered by existing database systema and generic workslows / scripts etc 2025-12-23 22:24:54 +00:00
3b7a325651 Generated by Spark: I think its too techie --> need dropdown boxes --> areas of god tier ui where I can configure those drop down boxes if the value has to be dynamic --> instead of showing loads of css class stuff, pull that data from a database table containing a list of css classes, then make a gui css class builder. If you show a code box, avoid a plain text box, instead show a specialised code editor box, I think there are tree view style librsries that allow you to edit json easily. 2025-12-23 22:14:19 +00:00
8981e08d58 Generated by Spark: Add ability to customize god credentials expiry time 2025-12-23 22:01:12 +00:00