feat: update environment configuration and add new API utilities
- Added .env.example with self-hosted admin key and site URL. - Updated .gitignore to include .env files. - Generated new API utility files: api.d.ts, api.js, dataModel.d.ts, server.d.ts, and server.js. - Implemented auth configuration for JWT authentication. - Created GitHub starred query and HTTP routes for authentication and JWKS. - Defined schema for GitHub starred and user tables. - Updated package.json with new dependencies and author information. - Enhanced tsconfig.json with target and path configurations.
This commit is contained in:
29
convex/schema.ts
Normal file
29
convex/schema.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import { defineSchema, defineTable } from "convex/server";
|
||||
import { v } from "convex/values";
|
||||
|
||||
export default defineSchema({
|
||||
// Other tables here...
|
||||
github_starred: defineTable({
|
||||
author: v.string(),
|
||||
auto: v.string(),
|
||||
description: v.string(),
|
||||
last_updated: v.string(),
|
||||
link: v.string(),
|
||||
repo_id: v.float64(),
|
||||
stars: v.float64(),
|
||||
summary: v.string(),
|
||||
title: v.string(),
|
||||
}),
|
||||
users: defineTable({
|
||||
userId: v.string(), // 外部系统的用户 ID
|
||||
name: v.string(),
|
||||
createdAt: v.string(),
|
||||
lastLoginAt: v.optional(v.string()),
|
||||
}).index("userId", ["userId"]),
|
||||
sessions: defineTable({
|
||||
userId: v.id("users"),
|
||||
createdAt: v.string(),
|
||||
expiresAt: v.optional(v.string()),
|
||||
token: v.optional(v.string()),
|
||||
}).index("token", ["token"]),
|
||||
});
|
||||
Reference in New Issue
Block a user