Initialize repository with Better-Auth compatible schema and package configuration #1
+342
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Set up @objectstack/plugin-auth as an ObjectStack plugin that wraps Better-Auth with ObjectQL storage adapter support.
Structure
src/adapter/- ObjectQL adapter (empty, ready for implementation)src/schema/auth.gql- GraphQL entity definitionssrc/client/- React hooks (empty, ready for implementation)src/server/- Server initialization (empty, ready for implementation)Schema (
src/schema/auth.gql)Defines four entities compatible with Better-Auth's table structure:
id,email,emailVerified,name,image, timestampstoken,expiresAt,userId, optionalipAddress/userAgentprovider,providerAccountId,accessToken,refreshToken, etc.)identifier,token,expiresAtfor email verification flowsAll entities use ObjectQL directives (
@entity,@primary,@unique,@index,@relation,@updatedAt) and include bidirectional relations where needed.Package Configuration
@objectstack/protocol,@objectstack/ql,reactreact-jsxtransform and DOM types/,/client,/serverpathsPlugin Config (
objectstack.config.ts)Registers as
type: 'plugin'with entities loaded from./src/schema/*.gql.This enables authentication data to persist in any ObjectQL-supported backend (Postgres, Redis, Excel, etc.) while maintaining full Better-Auth compatibility.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.