25 | {action}
26 |
27 |
28 | )
29 | })}
30 |
31 |
32 | )
33 | }
34 |
--------------------------------------------------------------------------------
/apps/deploy-workflow/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # @libra/deploy-workflow
2 |
3 | ## 1.0.5
4 |
5 | ### Patch Changes
6 |
7 | - update deps
8 | - Updated dependencies
9 | - @libra/common@1.0.3
10 | - @libra/auth@1.0.5
11 |
12 | ## 1.0.4
13 |
14 | ### Patch Changes
15 |
16 | - bug fix
17 | - Updated dependencies
18 | - @libra/sandbox@1.0.2
19 | - @libra/common@1.0.2
20 | - @libra/auth@1.0.3
21 |
22 | ## 1.0.3
23 |
24 | ### Patch Changes
25 |
26 | - update deps
27 |
28 | ## 1.0.2
29 |
30 | ### Patch Changes
31 |
32 | - update deps
33 |
34 | ## 1.0.1
35 |
36 | ### Patch Changes
37 |
38 | - update deps
39 |
40 | ## 1.0.0
41 |
42 | ### Major Changes
43 |
44 | - first release major version
45 |
46 | ### Patch Changes
47 |
48 | - Updated dependencies
49 | - @libra/db@1.0.0
50 | - @libra/auth@1.0.0
51 | - @libra/common@1.0.0
52 | - @libra/middleware@1.0.0
53 | - @libra/sandbox@1.0.0
54 | - @libra/templates@1.0.0
55 | - @libra/typescript-config@1.0.0
56 |
--------------------------------------------------------------------------------
/apps/docs/content/platform/usinglibra/deploy/index.zh.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "部署你的网站"
3 | description: "关于托管、部署以及管理你的 Libra 项目的相关信息"
4 | mode: "center"
5 | icon: Globe
6 | ---
7 |
8 | ## 我可以发布我的应用吗?
9 |
10 | 当然可以!
11 |
12 | 你可以在 Libra 中直接一键发布你的应用。
13 |
14 | 只需点击页眉中的"发布"按钮即可完成。
15 |
16 | 如果你是免费版、专业版或旗舰版订阅用户,还可以选择一个可用的子域名,例如 https://demo.libra.sh
17 |
18 | 
19 |
20 | ## 发布流程
21 |
22 | ### 1. 准备发布
23 |
24 | 在发布之前,请确保:
25 | - 你的应用已经完成开发
26 | - 应用在预览中运行正常
27 |
28 | ### 2. 一键发布
29 |
30 | 1. 在 Libra 工作区中,找到页面顶部的"发布"按钮
31 | 2. 点击"发布"按钮启动部署流程
32 | 3. 系统将自动处理构建和部署过程
33 |
34 | ### 3. 选择域名
35 |
36 | 根据你的订阅计划:
37 |
38 | - **免费版用户**:可以使用默认的 Libra 子域名
39 | - **专业版用户**:可以选择自定义子域名
40 | - **旗舰版用户**:可以选择自定义子域名
41 |
42 | ### 4. 部署完成
43 |
44 | 部署完成后,你将获得:
45 | - 应用的实时访问链接
46 |
47 | ## 管理已发布的应用
48 |
49 | 发布后,你可以:
50 |
51 | - **更新应用**:对代码进行修改后重新发布
52 | - **域名管理**:修改或升级你的域名设置
53 |
54 |
55 | ---
56 |
57 | *开始你的部署之旅,让世界看到你的创意!*
--------------------------------------------------------------------------------
/packages/api/src/router/project.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * project.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | // Re-export the modular project router
22 | export { projectRouter } from './project/index'
--------------------------------------------------------------------------------
/apps/builder/src/components/ui/input.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 |
3 | import { cn } from "@/lib/utils"
4 |
5 | export interface InputProps
6 | extends React.InputHTMLAttributes {}
7 |
8 | const Input = React.forwardRef(
9 | ({ className, type, ...props }, ref) => {
10 | return (
11 |
20 | )
21 | }
22 | )
23 | Input.displayName = "Input"
24 |
25 | export { Input }
26 |
--------------------------------------------------------------------------------
/packages/ui/postcss.config.mjs:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * postcss.config.mjs
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | const config = {
22 | plugins: ['@tailwindcss/postcss'],
23 | }
24 |
25 | export default config
26 |
--------------------------------------------------------------------------------
/apps/vite-shadcn-template/src/components/ui/input.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 |
3 | import { cn } from "@/lib/utils"
4 |
5 | export interface InputProps
6 | extends React.InputHTMLAttributes {}
7 |
8 | const Input = React.forwardRef(
9 | ({ className, type, ...props }, ref) => {
10 | return (
11 |
20 | )
21 | }
22 | )
23 | Input.displayName = "Input"
24 |
25 | export { Input }
26 |
--------------------------------------------------------------------------------
/apps/builder/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
4 | "target": "ES2024",
5 | "lib": [
6 | "ES2024",
7 | "DOM",
8 | "DOM.Iterable"
9 | ],
10 | "types": ["@cloudflare/workers-types"],
11 | "useDefineForClassFields": true,
12 | "module": "ESNext",
13 | "skipLibCheck": true,
14 | "moduleResolution": "bundler",
15 | "allowImportingTsExtensions": true,
16 | "isolatedModules": true,
17 | "moduleDetection": "force",
18 | "noEmit": true,
19 | "jsx": "react-jsx",
20 | "strict": true,
21 | "noUnusedLocals": true,
22 | "noUnusedParameters": true,
23 | "noFallthroughCasesInSwitch": true,
24 | "noUncheckedSideEffectImports": true,
25 | "baseUrl": ".",
26 | "paths": {
27 | "@/*": [
28 | "./src/*"
29 | ]
30 | }
31 | },
32 | "include": [
33 | "src"
34 | ],
35 | "exclude": [
36 | "cloudflare-env.d.ts"
37 | ]
38 | }
39 |
--------------------------------------------------------------------------------
/apps/deploy-workflow/src/db.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * db.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | // Re-export database functions for backward compatibility
22 | export { getPostgresDb, isPostgresDbAvailable, getAuthDb } from './database'
23 |
--------------------------------------------------------------------------------
/apps/web/components/common/user-button/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * index.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | export * from './constants'
22 | export * from './utils'
23 | export * from './user-avatar'
24 | export * from './usage-display'
--------------------------------------------------------------------------------
/apps/web/components/common/user-button.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * user-button.tsx
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | // Refactored user button component - exported from subcomponent
22 | export { default } from './user-button/user-button'
23 |
--------------------------------------------------------------------------------
/apps/builder/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # vite-shadcn-builder-libra
2 |
3 | ## 1.0.12
4 |
5 | ### Patch Changes
6 |
7 | - docs bug fix & deps update
8 |
9 | ## 1.0.11
10 |
11 | ### Patch Changes
12 |
13 | - update deps
14 |
15 | ## 1.0.10
16 |
17 | ### Patch Changes
18 |
19 | - bug fix
20 |
21 | ## 1.0.9
22 |
23 | ### Patch Changes
24 |
25 | - update deps
26 |
27 | ## 1.0.8
28 |
29 | ### Patch Changes
30 |
31 | - update deps
32 |
33 | ## 1.0.7
34 |
35 | ### Patch Changes
36 |
37 | - update deps
38 |
39 | ## 1.0.6
40 |
41 | ### Patch Changes
42 |
43 | - update deps
44 |
45 | ## 1.0.5
46 |
47 | ### Patch Changes
48 |
49 | - update deps
50 |
51 | ## 1.0.4
52 |
53 | ### Patch Changes
54 |
55 | - update deps
56 |
57 | ## 1.0.3
58 |
59 | ### Patch Changes
60 |
61 | - mini update & fix
62 |
63 | ## 1.0.2
64 |
65 | ### Patch Changes
66 |
67 | - update deps
68 |
69 | ## 1.0.1
70 |
71 | ### Patch Changes
72 |
73 | - update deps
74 |
75 | ## 1.0.0
76 |
77 | ### Major Changes
78 |
79 | - first release major version
80 |
--------------------------------------------------------------------------------
/apps/web/app/(frontend)/not-found.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * not-found.tsx
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | import NotFound from '@/components/ui/not-found'
22 |
23 | export default function RootNotFound() {
24 | return
25 | }
26 |
--------------------------------------------------------------------------------
/apps/vite-shadcn-template/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
4 | "target": "ES2024",
5 | "lib": [
6 | "ES2024",
7 | "DOM",
8 | "DOM.Iterable"
9 | ],
10 | "types": ["@cloudflare/workers-types"],
11 | "useDefineForClassFields": true,
12 | "module": "ESNext",
13 | "skipLibCheck": true,
14 | "moduleResolution": "bundler",
15 | "allowImportingTsExtensions": true,
16 | "isolatedModules": true,
17 | "moduleDetection": "force",
18 | "noEmit": true,
19 | "jsx": "react-jsx",
20 | "strict": true,
21 | "noUnusedLocals": true,
22 | "noUnusedParameters": true,
23 | "noFallthroughCasesInSwitch": true,
24 | "noUncheckedSideEffectImports": true,
25 | "baseUrl": ".",
26 | "paths": {
27 | "@/*": [
28 | "./src/*"
29 | ]
30 | }
31 | },
32 | "include": [
33 | "src"
34 | ],
35 | "exclude": [
36 | "cloudflare-env.d.ts"
37 | ]
38 | }
39 |
--------------------------------------------------------------------------------
/apps/web/app/(frontend)/(marketing)/terms/page.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * page.tsx
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | import TermsPage from '@/components/privacy/terms'
22 |
23 | export default function Terms() {
24 | return
25 | }
26 |
--------------------------------------------------------------------------------
/apps/builder/src/components/ui/sonner.tsx:
--------------------------------------------------------------------------------
1 | import { useTheme } from "next-themes"
2 | import { Toaster as Sonner } from "sonner"
3 |
4 | type ToasterProps = React.ComponentProps
5 |
6 | const Toaster = ({ ...props }: ToasterProps) => {
7 | const { theme = "system" } = useTheme()
8 |
9 | return (
10 |
26 | )
27 | }
28 |
29 | export { Toaster }
30 |
--------------------------------------------------------------------------------
/apps/web/app/(frontend)/(marketing)/(auth)/login/page.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * page.tsx
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | import AuthForm from '@/components/auth/AuthForm'
22 |
23 | export default function LoginPage() {
24 | return
25 | }
26 |
--------------------------------------------------------------------------------
/apps/web/app/(frontend)/(marketing)/privacy/page.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * page.tsx
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | import PrivacyPage from '@/components/privacy/privacy'
22 |
23 | export default function Privacy() {
24 | return
25 | }
26 |
--------------------------------------------------------------------------------
/apps/web/components/dashboard/create-project-dialog.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * create-project-dialog.tsx
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | 'use client'
22 |
23 | // Redirect to refactored component
24 | export { CreateProjectDialog } from './create-project'
25 |
--------------------------------------------------------------------------------
/apps/web/configs/flags.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * flags.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | export const NO_INDEX = process.env.NO_INDEX === '1'
22 | const VERBOSE =
23 | process.env.NODE_ENV === 'development' ||
24 | process.env.NEXT_PUBLIC_VERBOSE === '1'
25 |
--------------------------------------------------------------------------------
/packages/email/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * index.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | import { Resend } from 'resend';
22 | import {env} from "./env.mjs";
23 |
24 | export const resend = new Resend(env.RESEND_API_KEY);
25 |
26 | export * from './utils/email'
--------------------------------------------------------------------------------
/apps/dispatcher/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@libra/dispatcher",
3 | "version": "1.0.12",
4 | "type": "module",
5 | "scripts": {
6 | "dev": "wrangler dev --port 3007 --persist-to=../web/.wrangler/state",
7 | "deploy": "bun with-env wrangler deploy --minify",
8 | "cf-typegen": "wrangler types --env-interface CloudflareBindings",
9 | "typecheck": "tsc --noEmit",
10 | "with-env": "dotenv -e .env --",
11 | "update": "bun update"
12 | },
13 | "dependencies": {
14 | "drizzle-orm": "^0.44.5",
15 | "@libra/db": "*",
16 | "@libra/common": "*",
17 | "@libra/middleware": "*",
18 | "hono": "^4.9.8",
19 | "pg": "^8.16.3",
20 | "zod": "^4.1.11",
21 | "@hono/zod-openapi": "^0.19.10",
22 | "@scalar/hono-api-reference": "^0.9.19"
23 | },
24 | "devDependencies": {
25 | "wrangler": "4.27.0",
26 | "@cloudflare/workers-types": "^4.20250924.0",
27 | "typescript": "^5.9.2",
28 | "dotenv": "^17.2.2",
29 | "dotenv-cli": "^10.0.0",
30 | "@libra/typescript-config": "*"
31 | }
32 | }
--------------------------------------------------------------------------------
/apps/vite-shadcn-template/src/components/ui/sonner.tsx:
--------------------------------------------------------------------------------
1 | import { useTheme } from "next-themes"
2 | import { Toaster as Sonner } from "sonner"
3 |
4 | type ToasterProps = React.ComponentProps
5 |
6 | const Toaster = ({ ...props }: ToasterProps) => {
7 | const { theme = "system" } = useTheme()
8 |
9 | return (
10 |
26 | )
27 | }
28 |
29 | export { Toaster }
30 |
--------------------------------------------------------------------------------
/apps/web/app/(frontend)/layout.config.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * layout.config.tsx
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 |
22 | export const baseOptions = {
23 | nav: {
24 | transparentMode: 'top',
25 | component: true,
26 | },
27 | disableThemeSwitch: true,
28 | }
29 |
--------------------------------------------------------------------------------
/apps/web/app/(frontend)/(dashboard)/dashboard/page.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * page.tsx
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | import { SectionCards } from '@/components/dashboard/section-cards'
22 |
23 | export default function DashboardPage() {
24 | return
25 | }
26 |
--------------------------------------------------------------------------------
/apps/web/components/dashboard/project-details-dialogs/index.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * index.tsx
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | 'use client'
22 |
23 | export { DeleteConfirmDialog } from './delete-confirm-dialog'
24 | export { UnsavedChangesDialog } from './unsaved-changes-dialog'
--------------------------------------------------------------------------------
/apps/web/components/ide/libra/github-integration/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * index.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | export { default as GitHubModal } from './github-modal'
22 | export { useGitHubIntegration } from './use-github-integration'
23 | export * from './types'
24 |
--------------------------------------------------------------------------------
/packages/templates/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * index.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | export type { TemplateConfig } from './types'
22 | import { fileStructure } from './vite-shadcn-template'
23 |
24 | export const templateConfigs = {
25 | vite: fileStructure
26 | }
27 |
--------------------------------------------------------------------------------
/apps/web/app/(frontend)/(dashboard)/dashboard/teams/page.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * page.tsx
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | import { TeamsManagement } from '@/components/teams/teams-management'
22 |
23 | export default function TeamsPage() {
24 | return
25 | }
26 |
--------------------------------------------------------------------------------
/apps/web/app/(frontend)/fonts.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * fonts.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | import { Mona_Sans } from 'next/font/google'
22 |
23 | export const mono = Mona_Sans({
24 | subsets: ['latin'],
25 | variable: '--font-mono-sans',
26 | weight: ['400', '700'],
27 | })
--------------------------------------------------------------------------------
/packages/ui/src/lib/utils.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * utils.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | import { type ClassValue, clsx } from 'clsx'
22 | import { twMerge } from 'tailwind-merge'
23 |
24 | export function cn(...inputs: ClassValue[]) {
25 | return twMerge(clsx(inputs))
26 | }
27 |
--------------------------------------------------------------------------------
/packages/shikicode/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@libra/shikicode",
3 | "version": "1.0.3",
4 | "private": true,
5 | "description": "shikicode",
6 | "type": "module",
7 | "main": "lib/index.js",
8 | "types": "./src/index.ts",
9 | "scripts": {
10 | "build": "tsup",
11 | "clean": "rm -rf dist .turbo node_modules",
12 | "typecheck": "tsc --noEmit",
13 | "update": "bun update"
14 | },
15 | "devDependencies": {
16 | "shiki": "^3.13.0",
17 | "@libra/typescript-config": "*"
18 | },
19 | "exports": {
20 | ".": {
21 | "types": "./src/index.ts",
22 | "import": {
23 | "development": "./src/index.ts",
24 | "default": "./lib/index.js"
25 | },
26 | "default": "./lib/index.js"
27 | },
28 | "./plugins": {
29 | "types": "./src/plugins/index.ts",
30 | "import": {
31 | "development": "./src/plugins/index.ts",
32 | "default": "./lib/plugins/index.js"
33 | },
34 | "default": "./lib/plugins/index.js"
35 | },
36 | "./package.json": "./package.json"
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/apps/docs/app/page.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * page.tsx
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | import { redirect } from 'next/navigation';
22 | import { i18n } from '@/lib/i18n';
23 |
24 | export default function RootPage() {
25 | // Redirect to the default language
26 | redirect(`/${i18n.defaultLanguage}`);
27 | }
28 |
--------------------------------------------------------------------------------
/apps/web/app/api/auth/[...all]/route.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * route.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | import { initAuth } from '@libra/auth/auth-server'
22 | import { toNextJsHandler } from 'better-auth/next-js'
23 |
24 | const auth = await initAuth();
25 | export const { GET, POST } = toNextJsHandler(auth.handler)
26 |
--------------------------------------------------------------------------------
/apps/dispatcher/src/db/custom-domain.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * custom-domain.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | // Re-export the unified database functions from @libra/db
22 | export type { CustomDomainProject, DatabaseQueryResult } from '@libra/db'
23 | export { getProjectByCustomDomain, validateCustomDomainProject } from '@libra/db'
--------------------------------------------------------------------------------
/packages/better-auth-cloudflare/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@libra/better-auth-cloudflare",
3 | "version": "1.0.10",
4 | "description": "Cloudflare integration plugin for Better Auth",
5 | "keywords": [
6 | "cloudflare",
7 | "auth",
8 | "better-auth",
9 | "plugin",
10 | "d1",
11 | "kv"
12 | ],
13 | "private": true,
14 | "main": "./index.js",
15 | "types": "./index.ts",
16 | "type": "module",
17 | "scripts": {
18 | "build": "tsup",
19 | "clean": "rm -rf dist .turbo node_modules",
20 | "typecheck": "tsc --noEmit",
21 | "update": "bun update"
22 | },
23 | "exports": {
24 | ".": {
25 | "types": "./index.ts",
26 | "default": "./index.ts"
27 | },
28 | "./client": {
29 | "types": "./client.ts",
30 | "default": "./client.ts"
31 | }
32 | },
33 | "dependencies": {
34 | "better-auth": "^1.3.16"
35 | },
36 | "devDependencies": {
37 | "@libra/typescript-config": "*"
38 | },
39 | "peerDependencies": {
40 | "@cloudflare/workers-types": "^4.20250924.0",
41 | "@opennextjs/cloudflare": "^1.8.5"
42 | }
43 | }
--------------------------------------------------------------------------------
/packages/db/cloudflare-env.d.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * cloudflare-env.d.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | // Type definitions for Cloudflare environment variables
22 | declare global {
23 | interface CloudflareEnv {
24 | HYPERDRIVE?: {
25 | connectionString: string;
26 | };
27 | POSTGRES_URL?: string;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/packages/email/components/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * index.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | export * from './button'
22 | export * from './content-section'
23 | export * from './email-container'
24 | export * from './email-footer'
25 | export * from './email-header'
26 | export * from './info-box'
27 | export * from './otp-code'
28 |
--------------------------------------------------------------------------------
/apps/web/configs/urls.ts:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | * SPDX-License-Identifier: AGPL-3.0-only
4 | * urls.ts
5 | * Copyright (C) 2025 Nextify Limited
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | */
21 |
22 | export const BASE_URL = process.env.VERCEL_ENV
23 | ? process.env.VERCEL_ENV === 'production'
24 | ? `https://${process.env.VERCEL_PROJECT_PRODUCTION_URL}`
25 | : `https://${process.env.VERCEL_BRANCH_URL}`
26 | : 'http://localhost:3000'
27 |
--------------------------------------------------------------------------------
/packages/auth/utils/subscription-limits/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * index.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | // Export types and constants
22 | export * from './types'
23 | export * from './constants'
24 |
25 | // Export utility functions
26 | export * from './utils'
27 |
28 | // Export core business functions
29 | export * from './core'
--------------------------------------------------------------------------------
/apps/docs/source.config.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * source.config.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | import { defineConfig, defineDocs } from "fumadocs-mdx/config";
22 |
23 | export const docs = defineDocs({
24 | dir: "content",
25 | });
26 |
27 | export default defineConfig({
28 | mdxOptions: {
29 | // MDX options
30 | },
31 | });
--------------------------------------------------------------------------------
/packages/auth/webhooks/shared/constants.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * constants.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | // Valid subscription statuses for renewal detection
22 | export const VALID_RENEWAL_STATUSES = ['active'] as const
23 |
24 | // Time tolerance for period comparison (1 second in milliseconds)
25 | export const PERIOD_TIME_TOLERANCE = 1000
--------------------------------------------------------------------------------
/packages/ui/src/components/skeleton.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * skeleton.tsx
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | import { cn } from '../lib/utils'
22 |
23 | function Skeleton({ className, ...props }: React.HTMLAttributes) {
24 | return
25 | }
26 |
27 | export { Skeleton }
28 |
--------------------------------------------------------------------------------
/packages/db/env.mjs:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * env.mjs
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | import { createEnv } from '@t3-oss/env-nextjs'
22 | import { z } from 'zod'
23 |
24 | export const env = createEnv({
25 | server: {
26 | POSTGRES_URL: z.string().min(1),
27 | },
28 | client: {},
29 | runtimeEnv: {
30 | POSTGRES_URL: process.env['POSTGRES_URL'],
31 | },
32 | })
33 |
--------------------------------------------------------------------------------
/packages/templates/tsup.config.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * tsup.config.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | import { defineConfig } from 'tsup'
22 |
23 | export default defineConfig({
24 | entry: ['index.ts'],
25 | format: ['cjs', 'esm'],
26 | dts: true,
27 | clean: true,
28 | sourcemap: true,
29 | external: [],
30 | splitting: false,
31 | treeshake: true,
32 | })
33 |
--------------------------------------------------------------------------------
/tooling/typescript-config/base.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://json.schemastore.org/tsconfig",
3 | "compilerOptions": {
4 | "target": "ES2024",
5 | "lib": ["ES2024", "DOM", "DOM.Iterable"],
6 | "allowJs": true,
7 | "checkJs": true,
8 | "skipLibCheck": true,
9 | "strict": true,
10 | "forceConsistentCasingInFileNames": true,
11 | "noEmit": true,
12 | "esModuleInterop": true,
13 | "module": "Preserve",
14 | "moduleResolution": "Bundler",
15 | "resolveJsonModule": true,
16 | "moduleDetection": "force",
17 | "isolatedModules": true,
18 | "jsx": "preserve",
19 | "incremental": true,
20 | "noUncheckedIndexedAccess": true,
21 | "disableSourceOfProjectReferenceRedirect": true,
22 | "allowSyntheticDefaultImports": true,
23 | "tsBuildInfoFile": "${configDir}/.cache/tsbuildinfo.json",
24 | "pretty": true,
25 | "sourceMap": false,
26 | "inlineSourceMap": false,
27 | "allowUnusedLabels": false,
28 | "allowUnreachableCode": false,
29 | "declaration": false,
30 | "declarationMap": false
31 | },
32 | "exclude": ["node_modules", "build", "dist", ".next", ".expo"]
33 | }
34 |
--------------------------------------------------------------------------------
/apps/web/lib/hooks/use-is-mounted.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * use-is-mounted.tsx
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | import { useLayoutEffect, useState } from 'react'
22 |
23 | export default function useIsMounted() {
24 | const [isMounted, setIsMounted] = useState(false)
25 |
26 | useLayoutEffect(() => {
27 | setIsMounted(true)
28 | }, [])
29 |
30 | return isMounted
31 | }
32 |
--------------------------------------------------------------------------------
/packages/auth/utils/__tests__/admin-utils.test.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * admin-utils.test.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | */
6 |
7 | import { describe, it, expect } from 'vitest'
8 | import type { AdminPermission, UserRole, OrganizationRole } from '../admin-utils'
9 |
10 | describe('Admin Utils Types', () => {
11 | it('should have correct AdminPermission types', () => {
12 | const permissions: AdminPermission[] = [
13 | 'user:create',
14 | 'user:list',
15 | 'user:ban',
16 | 'user:unban',
17 | 'user:delete',
18 | 'user:impersonate',
19 | 'user:set-role',
20 | 'session:list',
21 | 'session:revoke',
22 | 'organization:manage',
23 | ]
24 |
25 | expect(permissions).toHaveLength(10)
26 | })
27 |
28 | it('should have correct UserRole types', () => {
29 | const roles: UserRole[] = ['user', 'admin', 'superadmin']
30 | expect(roles).toHaveLength(3)
31 | })
32 |
33 | it('should have correct OrganizationRole types', () => {
34 | const orgRoles: OrganizationRole[] = ['owner', 'admin', 'member']
35 | expect(orgRoles).toHaveLength(3)
36 | })
37 | })
38 |
--------------------------------------------------------------------------------
/packages/better-auth-stripe/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@libra/better-auth-stripe",
3 | "version": "1.0.5",
4 | "main": "./src/index.ts",
5 | "private": true,
6 | "description": "Stripe plugin for Better Auth",
7 | "keywords": [
8 | "stripe",
9 | "authentication",
10 | "better-auth",
11 | "plugin"
12 | ],
13 | "scripts": {
14 | "build": "tsup",
15 | "clean": "rm -rf dist .turbo node_modules",
16 | "test": "vitest",
17 | "update": "bun update"
18 | },
19 | "exports": {
20 | ".": {
21 | "types": "./src/index.ts",
22 | "import": "./src/index.ts",
23 | "require": "./src/index.ts"
24 | },
25 | "./client": {
26 | "types": "./src/client.ts",
27 | "import": "./src/client.ts",
28 | "require": "./src/client.ts"
29 | }
30 | },
31 | "typesVersions": {
32 | "*": {
33 | "*": [
34 | "./src/index.ts"
35 | ],
36 | "client": [
37 | "./src/client.ts"
38 | ]
39 | }
40 | },
41 | "dependencies": {
42 | "better-auth": "^1.3.16"
43 | },
44 | "devDependencies": {
45 | "@libra/typescript-config": "*",
46 | "better-call": "^1.0.19"
47 | }
48 | }
--------------------------------------------------------------------------------
/apps/web/components/ide/libra/navbar/components/deployment/molecules/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * index.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | export { StageHeader } from './stage-header'
22 | export { FeatureCard } from './feature-card'
23 | export { FeatureStatusBar } from './feature-status-bar'
24 | export { ProgressDisplay } from './progress-display'
25 | export { SuccessActions } from './success-actions'
26 |
--------------------------------------------------------------------------------
/packages/common/tsup.config.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * tsup.config.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | import { defineConfig } from 'tsup'
22 |
23 | export default defineConfig({
24 | entry: ['src/index.ts'],
25 | format: ['cjs', 'esm'],
26 | dts: true,
27 | clean: true,
28 | sourcemap: true,
29 | external: [
30 | 'resend',
31 | 'zod',
32 | ],
33 | splitting: false,
34 | treeshake: true,
35 | })
36 |
--------------------------------------------------------------------------------
/packages/shikicode/src/scroll.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * scroll.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | export function hookScroll(input: HTMLElement, output: HTMLElement) {
22 | const onScroll = () => {
23 | output.scrollTo(input.scrollLeft, input.scrollTop)
24 | }
25 |
26 | input.addEventListener('scroll', onScroll)
27 |
28 | return () => {
29 | input.removeEventListener('scroll', onScroll)
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/packages/shikicode/tsup.config.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * tsup.config.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | import { defineConfig } from 'tsup'
22 |
23 | export default defineConfig({
24 | entry: {
25 | index: 'src/index.ts',
26 | 'plugins/index': 'src/plugins/index.ts'
27 | },
28 | format: ['esm'],
29 | dts: true,
30 | splitting: false,
31 | sourcemap: true,
32 | clean: true,
33 | outDir: 'lib'
34 | })
--------------------------------------------------------------------------------
/apps/builder/src/components/ui/checkbox.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 | import * as CheckboxPrimitive from "@radix-ui/react-checkbox"
3 | import { Check } from "lucide-react"
4 |
5 | import { cn } from "@/lib/utils"
6 |
7 | const Checkbox = React.forwardRef<
8 | React.ElementRef,
9 | React.ComponentPropsWithoutRef
10 | >(({ className, ...props }, ref) => (
11 |
19 |
22 |
23 |
24 |
25 | ))
26 | Checkbox.displayName = CheckboxPrimitive.Root.displayName
27 |
28 | export { Checkbox }
29 |
--------------------------------------------------------------------------------
/packages/auth/plugins/captcha-plugin.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * captcha-plugin.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | import { captcha } from 'better-auth/plugins'
22 | import { env } from '../env.mjs'
23 |
24 | export const captchaPlugin = captcha({
25 | provider: 'cloudflare-turnstile', // or google-recaptcha, hcaptcha
26 | secretKey: env.TURNSTILE_SECRET_KEY,
27 | endpoints: ['/email-otp/send-verification-otp'],
28 | })
29 |
--------------------------------------------------------------------------------
/apps/builder/src/components/ui/slider.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 | import * as SliderPrimitive from "@radix-ui/react-slider"
3 |
4 | import { cn } from "@/lib/utils"
5 |
6 | const Slider = React.forwardRef<
7 | React.ElementRef,
8 | React.ComponentPropsWithoutRef
9 | >(({ className, ...props }, ref) => (
10 |
18 |
19 |
20 |
21 |
22 |
23 | ))
24 | Slider.displayName = SliderPrimitive.Root.displayName
25 |
26 | export { Slider }
27 |
--------------------------------------------------------------------------------
/apps/docs/content/platform/usinglibra/timeMachine/index.zh.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "版本历史"
3 | description: "了解如何管理、查看和恢复 Libra 项目的历史版本"
4 | mode: "center"
5 | icon: History
6 | ---
7 |
8 | # 版本历史
9 |
10 | 记录项目的所有变化,随时回到任何之前的版本
11 |
12 | ## 什么是版本历史?
13 |
14 | 把版本历史想象成项目的相册。每次您让 Libra 做修改时,它都会给项目拍一张"照片"(创建一个版本)。您可以随时翻看这些"照片",甚至回到项目之前的样子。
15 |
16 | ## 版本历史能做什么?
17 |
18 | 有了版本历史,您可以:
19 |
20 | - **回到过去**:让项目回到之前的版本
21 | - **制作副本**:复制任何版本来尝试不同的想法
22 |
23 | *版本管理界面 - 与项目版本交互*
24 |
25 | ## 回到旧版本
26 |
27 | 当您"恢复"到旧版本时,会发生这些事情:
28 |
29 | - 您的项目回到那个时候的样子
30 | - 那个时间点之后的所有新版本都会被永久删除
31 | - 您可以从那个旧版本开始做新的修改
32 |
33 | 
34 |
35 |
36 | ⚠️ **重要提醒**:一旦回到过去,就无法撤销!之后的所有版本都会被永久删除。
37 |
38 |
39 | ## 安全地尝试不同想法
40 |
41 | 想要保留当前版本,同时尝试旧版本的内容?这样做:
42 |
43 | 1. 找到您喜欢的旧版本
44 | 2. 点击"复制"制作副本,创建新项目
45 | 3. 现在您有两个项目了 - 想改哪个就改哪个!
46 |
47 | 
48 |
49 |
50 | 💡 **小贴士**:制作副本非常适合尝试不同想法,而不会丢失当前的工作。
51 |
52 |
53 | ## 使用小贴士
54 |
55 | ### 1. 每次只改一点
56 |
57 | 一次只要求改一个东西,不要一次改很多。这样每个版本都很容易理解。
58 |
59 | ### 2. 仔细确认再回去
60 |
61 | 在点击"恢复"之前,确保选择了正确的版本 - 记住,这个操作无法撤销!
62 |
63 | ### 3. 不确定就复制
64 |
65 | 如果不确定,就制作副本而不是直接回去。这样可以保证所有东西都安全!
66 |
--------------------------------------------------------------------------------
/apps/vite-shadcn-template/src/components/ui/checkbox.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 | import * as CheckboxPrimitive from "@radix-ui/react-checkbox"
3 | import { Check } from "lucide-react"
4 |
5 | import { cn } from "@/lib/utils"
6 |
7 | const Checkbox = React.forwardRef<
8 | React.ElementRef,
9 | React.ComponentPropsWithoutRef
10 | >(({ className, ...props }, ref) => (
11 |
19 |
22 |
23 |
24 |
25 | ))
26 | Checkbox.displayName = CheckboxPrimitive.Root.displayName
27 |
28 | export { Checkbox }
29 |
--------------------------------------------------------------------------------
/apps/web/components/billing/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * index.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | export { StatusIndicator, getUsageStatus } from './status-indicator'
22 | export type { UsageStatus } from './status-indicator'
23 |
24 | export { UsageCard, UsageCardCompact } from './usage-card'
25 |
26 | export { PlanOverviewCard } from './plan-overview-card'
27 |
28 | export { UpgradeRecommendation } from './upgrade-recommendation'
29 |
--------------------------------------------------------------------------------
/apps/vite-shadcn-template/src/components/ui/slider.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 | import * as SliderPrimitive from "@radix-ui/react-slider"
3 |
4 | import { cn } from "@/lib/utils"
5 |
6 | const Slider = React.forwardRef<
7 | React.ElementRef,
8 | React.ComponentPropsWithoutRef
9 | >(({ className, ...props }, ref) => (
10 |
18 |
19 |
20 |
21 |
22 |
23 | ))
24 | Slider.displayName = SliderPrimitive.Root.displayName
25 |
26 | export { Slider }
27 |
--------------------------------------------------------------------------------
/packages/db/tsup.config.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * tsup.config.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | import { defineConfig } from 'tsup'
22 |
23 | export default defineConfig({
24 | entry: ['index.ts'],
25 | format: ['cjs', 'esm'],
26 | dts: true,
27 | clean: true,
28 | sourcemap: true,
29 | external: [
30 | '@paralleldrive/cuid2',
31 | 'pg',
32 | 'drizzle-orm',
33 | ],
34 | splitting: false,
35 | treeshake: true,
36 | })
37 |
--------------------------------------------------------------------------------
/apps/web/components/common/upgrade-modal/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * index.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | export { UpgradeModalProvider } from './upgrade-modal-provider'
22 | export { useUpgradeModal } from './use-upgrade-modal'
23 | export { UpgradeModal } from './upgrade-modal'
24 | export type {
25 | UpgradeScenario,
26 | UpgradeModalVariant,
27 | UpgradeFeature,
28 | UpgradeModalConfig,
29 | UpgradeModalContextValue
30 | } from './types'
--------------------------------------------------------------------------------
/packages/email/env.mjs:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * env.mjs
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | import { createEnv } from '@t3-oss/env-nextjs'
22 | import { z } from 'zod'
23 |
24 | export const env = createEnv({
25 | server: {
26 | RESEND_FROM: z.string().min(1).email(),
27 | RESEND_API_KEY: z.string().min(1),
28 | },
29 | runtimeEnv: {
30 | RESEND_FROM: process.env['RESEND_FROM'],
31 | RESEND_API_KEY: process.env['RESEND_API_KEY'],
32 | },
33 | })
34 |
--------------------------------------------------------------------------------
/apps/web/components/ide/libra/utils/messageValidation.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * messageValidation.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | export function validateMessages(initialMessages: any[]): any[] {
22 | if (!initialMessages || !Array.isArray(initialMessages)) {
23 | return []
24 | }
25 |
26 | return initialMessages.filter((msg) => {
27 | if (!msg || typeof msg !== 'object' || !msg.type) {
28 | return false
29 | }
30 | return true
31 | })
32 | }
--------------------------------------------------------------------------------
/packages/db/drizzle.config.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * drizzle.config.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | import "dotenv/config"
22 | import type { Config } from "drizzle-kit"
23 | import { defineConfig } from "drizzle-kit"
24 | import { env } from './env.mjs'
25 |
26 | export default defineConfig({
27 | out: "./drizzle",
28 | schema: "./schema",
29 | dialect: "postgresql",
30 | dbCredentials: {
31 | url: env.POSTGRES_URL,
32 | },
33 | }) satisfies Config
34 |
--------------------------------------------------------------------------------
/packages/templates/types.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * types.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | export interface TemplateConfig {
22 | id: string
23 | name: string
24 | runCommand: string
25 | fileStructure: {
26 | [key: string]: {
27 | purpose: string
28 | description: string
29 | }
30 | }
31 | conventions: string[]
32 | dependencies?: {
33 | [key: string]: string
34 | }
35 | scripts?: {
36 | [key: string]: string
37 | }
38 | }
--------------------------------------------------------------------------------
/packages/api/src/router/hello.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * hello.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | import type { TRPCRouterRecord } from '@trpc/server'
22 | import { protectedProcedure, publicProcedure } from '../trpc'
23 |
24 | export const helloRouter = {
25 | pub: publicProcedure.query(() => {
26 | return { status: 'ok' }
27 | }),
28 | private: protectedProcedure.query(() => {
29 | return { status: 'authenticated' }
30 | }),
31 | } satisfies TRPCRouterRecord
32 |
--------------------------------------------------------------------------------
/packages/auth/plugins/stripe/subscription-handlers.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * subscription-handlers.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | // Re-export all subscription handlers from their respective modules
22 | export {
23 | onSubscriptionComplete,
24 | onSubscriptionCancel,
25 | onSubscriptionDeleted,
26 | } from './subscription-lifecycle'
27 |
28 | export { onSubscriptionUpdate } from './subscription-updates'
29 |
30 | export { onCustomerCreate } from './customer-handlers'
31 |
--------------------------------------------------------------------------------
/apps/docs/middleware.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * middleware.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | import { createI18nMiddleware } from 'fumadocs-core/i18n/middleware';
22 | import { i18n } from '@/lib/i18n';
23 |
24 | export default createI18nMiddleware(i18n);
25 |
26 | export const config = {
27 | // Matcher ignoring `/_next/`, `/api/`, and static assets
28 | matcher: ['/((?!api|_next/static|_next/image|favicon.ico|.*\\.png|.*\\.jpg|.*\\.jpeg|.*\\.gif|.*\\.svg|.*\\.ico).*)'],
29 | };
30 |
--------------------------------------------------------------------------------
/apps/web/app/(frontend)/robot.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * robot.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | import type { MetadataRoute } from 'next'
22 |
23 | export default function robots(): MetadataRoute.Robots {
24 |
25 | return {
26 | rules: {
27 | userAgent: '*',
28 | allow: '/',
29 | disallow: ["/*/dashboard", "/*/dashboard/*", "/*/project/*" ,"/*/project/*"],
30 | },
31 | sitemap: 'https://libra.dev/sitemap.xml',
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/apps/web/public/anthropic.svg:
--------------------------------------------------------------------------------
1 |
20 |
21 |
--------------------------------------------------------------------------------
/apps/web/public/images/file-icons/vue.svg:
--------------------------------------------------------------------------------
1 |
20 |
21 |
--------------------------------------------------------------------------------
/apps/builder/src/components/ui/switch.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 | import * as SwitchPrimitives from "@radix-ui/react-switch"
3 |
4 | import { cn } from "@/lib/utils"
5 |
6 | const Switch = React.forwardRef<
7 | React.ElementRef,
8 | React.ComponentPropsWithoutRef
9 | >(({ className, ...props }, ref) => (
10 |
18 |
23 |
24 | ))
25 | Switch.displayName = SwitchPrimitives.Root.displayName
26 |
27 | export { Switch }
28 |
--------------------------------------------------------------------------------
/apps/dispatcher/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # @libra/dispatcher
2 |
3 | ## 1.0.12
4 |
5 | ### Patch Changes
6 |
7 | - docs bug fix & deps update
8 |
9 | ## 1.0.11
10 |
11 | ### Patch Changes
12 |
13 | - update deps
14 | - Updated dependencies
15 | - @libra/common@1.0.3
16 |
17 | ## 1.0.10
18 |
19 | ### Patch Changes
20 |
21 | - bug fix
22 | - Updated dependencies
23 | - @libra/common@1.0.2
24 |
25 | ## 1.0.9
26 |
27 | ### Patch Changes
28 |
29 | - update deps
30 |
31 | ## 1.0.8
32 |
33 | ### Patch Changes
34 |
35 | - update deps
36 |
37 | ## 1.0.7
38 |
39 | ### Patch Changes
40 |
41 | - update deps
42 |
43 | ## 1.0.6
44 |
45 | ### Patch Changes
46 |
47 | - update deps
48 |
49 | ## 1.0.5
50 |
51 | ### Patch Changes
52 |
53 | - update deps
54 |
55 | ## 1.0.4
56 |
57 | ### Patch Changes
58 |
59 | - update deps
60 |
61 | ## 1.0.3
62 |
63 | ### Patch Changes
64 |
65 | - mini update & fix
66 |
67 | ## 1.0.2
68 |
69 | ### Patch Changes
70 |
71 | - update deps
72 |
73 | ## 1.0.1
74 |
75 | ### Patch Changes
76 |
77 | - update deps
78 |
79 | ## 1.0.0
80 |
81 | ### Major Changes
82 |
83 | - first release major version
84 |
85 | ### Patch Changes
86 |
87 | - Updated dependencies
88 | - @libra/db@1.0.0
89 | - @libra/common@1.0.0
90 | - @libra/middleware@1.0.0
91 |
--------------------------------------------------------------------------------
/apps/docs/lib/i18n.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * i18n.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | import type { I18nConfig } from 'fumadocs-core/i18n';
22 |
23 | export const i18n: I18nConfig = {
24 | defaultLanguage: 'en',
25 | languages: ['en', 'zh'],
26 | };
27 |
28 | export const locales = [
29 | {
30 | name: 'English',
31 | locale: 'en',
32 | },
33 | {
34 | name: '中文',
35 | locale: 'zh',
36 | },
37 | ] as const;
38 |
39 | export type Locale = typeof i18n.languages[number];
40 |
--------------------------------------------------------------------------------
/apps/docs/lib/translations.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * translations.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | import type { Translations } from 'fumadocs-ui/i18n';
22 |
23 | export const zhTranslations: Partial = {
24 | search: '搜索',
25 | searchNoResult: '没有找到结果',
26 | toc: '目录',
27 | tocNoHeadings: '没有标题',
28 | lastUpdate: '最后更新',
29 | chooseLanguage: '选择语言',
30 | nextPage: '下一页',
31 | previousPage: '上一页',
32 | chooseTheme: '选择主题',
33 | editOnGithub: '在 GitHub 上编辑',
34 | };
35 |
--------------------------------------------------------------------------------
/apps/builder/src/components/ui/tooltip.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 | import * as TooltipPrimitive from "@radix-ui/react-tooltip"
3 |
4 | import { cn } from "@/lib/utils"
5 |
6 | const TooltipProvider = TooltipPrimitive.Provider
7 |
8 | const Tooltip = TooltipPrimitive.Root
9 |
10 | const TooltipTrigger = TooltipPrimitive.Trigger
11 |
12 | const TooltipContent = React.forwardRef<
13 | React.ElementRef,
14 | React.ComponentPropsWithoutRef
15 | >(({ className, sideOffset = 4, ...props }, ref) => (
16 |
25 | ))
26 | TooltipContent.displayName = TooltipPrimitive.Content.displayName
27 |
28 | export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }
29 |
--------------------------------------------------------------------------------
/packages/auth/utils/stripe-config.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * stripe-config.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | import { Stripe } from 'stripe'
22 | import { env } from '../env.mjs'
23 |
24 | // Initialize Stripe client (will only be used if the plugin is added)
25 | export const stripeClient = env.STRIPE_SECRET_KEY
26 | ? new Stripe(env.STRIPE_SECRET_KEY, {
27 | apiVersion: '2025-08-27.basil',
28 | httpClient: Stripe.createFetchHttpClient(),
29 | typescript: true,
30 | })
31 | : null
32 |
--------------------------------------------------------------------------------
/apps/vite-shadcn-template/src/components/ui/switch.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 | import * as SwitchPrimitives from "@radix-ui/react-switch"
3 |
4 | import { cn } from "@/lib/utils"
5 |
6 | const Switch = React.forwardRef<
7 | React.ElementRef,
8 | React.ComponentPropsWithoutRef
9 | >(({ className, ...props }, ref) => (
10 |
18 |
23 |
24 | ))
25 | Switch.displayName = SwitchPrimitives.Root.displayName
26 |
27 | export { Switch }
28 |
--------------------------------------------------------------------------------
/packages/auth/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@libra/auth",
3 | "version": "1.0.6",
4 | "private": true,
5 | "main": "auth-server.ts",
6 | "types": "./index.ts",
7 | "scripts": {
8 | "auth:generate": "NODE_OPTIONS=--experimental-detect-module bun with-env bunx @better-auth/cli generate --config auth-server.ts --output ./db/schema/auth-schema.ts -y",
9 | "db:generate": "bun with-env drizzle-kit generate",
10 | "db:migrate": "bun with-env bunx drizzle-kit migrate",
11 | "db:migrate-remote": "bun with-env wrangler d1 migrations apply libra --remote",
12 | "db:studio": "bun with-env drizzle-kit studio --port 3002",
13 | "test": "bun with-env vitest",
14 | "test:watch": "bun with-env vitest watch",
15 | "test:coverage": "bun with-env vitest --coverage",
16 | "with-env": "dotenv -e ../../.env --",
17 | "update": "bun update"
18 | },
19 | "dependencies": {
20 | "better-auth-harmony": "^1.2.5",
21 | "stripe": "^18.5.0",
22 | "@libra/ui": "*",
23 | "@libra/db": "*",
24 | "@libra/common": "*",
25 | "@libra/email": "*",
26 | "@libra/better-auth-cloudflare": "*",
27 | "@libra/better-auth-stripe": "*"
28 | },
29 | "devDependencies": {
30 | "@libra/typescript-config": "*",
31 | "@better-auth/cli": "^1.3.16"
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/apps/vite-shadcn-template/src/components/ui/tooltip.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 | import * as TooltipPrimitive from "@radix-ui/react-tooltip"
3 |
4 | import { cn } from "@/lib/utils"
5 |
6 | const TooltipProvider = TooltipPrimitive.Provider
7 |
8 | const Tooltip = TooltipPrimitive.Root
9 |
10 | const TooltipTrigger = TooltipPrimitive.Trigger
11 |
12 | const TooltipContent = React.forwardRef<
13 | React.ElementRef,
14 | React.ComponentPropsWithoutRef
15 | >(({ className, sideOffset = 4, ...props }, ref) => (
16 |
25 | ))
26 | TooltipContent.displayName = TooltipPrimitive.Content.displayName
27 |
28 | export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }
29 |
--------------------------------------------------------------------------------
/apps/web/components/ide/libra/chat-panel/components/hooks/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * index.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | // hooks directory index file - export all hooks categorized by functionality
22 |
23 | // =====================
24 | // Message processing related hooks
25 | // =====================
26 | export {
27 | useMessageContent,
28 | useMessageClassification,
29 | useAvailableTabs,
30 | useTabState
31 | } from './use-message-hooks';
32 |
33 | // Note: More hooks exports will be added in the future
--------------------------------------------------------------------------------
/packages/email/tsup.config.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * tsup.config.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | import { defineConfig } from 'tsup'
22 |
23 | export default defineConfig({
24 | entry: {
25 | index: 'index.ts',
26 | templates: 'templates/index.tsx',
27 | },
28 | format: ['cjs', 'esm'],
29 | dts: true,
30 | clean: true,
31 | sourcemap: true,
32 | external: [
33 | '@react-email/components',
34 | 'resend',
35 | 'react',
36 | ],
37 | splitting: false,
38 | treeshake: true,
39 | })
40 |
--------------------------------------------------------------------------------
/apps/vite-shadcn-template/src/worker.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Cloudflare Worker for vite-shadcn-template
3 | *
4 | * This worker serves the SPA and provides optional API endpoints.
5 | * The SPA assets are automatically served by Cloudflare's asset handling
6 | * with single-page-application mode enabled.
7 | */
8 |
9 | import { Hono } from 'hono'
10 | import { cors } from 'hono/cors'
11 |
12 | // Define the Cloudflare environment interface
13 | interface Env {
14 | ASSETS: Fetcher
15 | ENVIRONMENT: string
16 | }
17 |
18 | const app = new Hono<{ Bindings: Env }>()
19 |
20 | // Enable CORS for all routes
21 | app.use(
22 | '*',
23 | cors({
24 | origin: ['http://localhost:5173', 'http://localhost:3000'],
25 | allowMethods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'],
26 | allowHeaders: ['Content-Type', 'Authorization'],
27 | })
28 | )
29 |
30 | // Catch-all route for SPA
31 | // This will only be reached if the request doesn't match any static assets
32 | // and doesn't match any of the API routes above
33 | app.get('*', async () => {
34 | // For navigation requests, let Cloudflare handle SPA routing automatically
35 | // This fallback is mainly for non-navigation requests that don't match assets
36 | return new Response('Not Found', { status: 404 })
37 | })
38 |
39 | export default app
40 |
--------------------------------------------------------------------------------
/packages/shikicode/src/plugins/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * index.ts
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | import type { EditorOptions, ShikiCode } from '../core.js'
22 |
23 | export type IDisposable = () => void
24 | export type { EditorOptions, IndentOptions, ShikiCode } from '../core.js'
25 |
26 | export type EditorPlugin = {
27 | (editor: ShikiCode, options: EditorOptions): IDisposable
28 | }
29 |
30 | export * from './autoload'
31 | export * from './closing_pairs'
32 | export * from './comments'
33 | export * from './tab'
34 |
--------------------------------------------------------------------------------
/apps/builder/src/components/ui/badge.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 | import { cva, type VariantProps } from "class-variance-authority"
3 |
4 | import { cn } from "@/lib/utils"
5 |
6 | const badgeVariants = cva(
7 | "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
8 | {
9 | variants: {
10 | variant: {
11 | default:
12 | "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
13 | secondary:
14 | "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
15 | destructive:
16 | "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
17 | outline: "text-foreground",
18 | },
19 | },
20 | defaultVariants: {
21 | variant: "default",
22 | },
23 | }
24 | )
25 |
26 | export interface BadgeProps
27 | extends React.HTMLAttributes,
28 | VariantProps {}
29 |
30 | function Badge({ className, variant, ...props }: BadgeProps) {
31 | return (
32 |
33 | )
34 | }
35 |
36 | export { Badge, badgeVariants }
37 |
--------------------------------------------------------------------------------
/apps/docs/content/platform/community/index.zh.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "社区与动态"
3 | description: "与 Libra AI 社区保持联系,获取最新动态"
4 | icon: Users
5 | ---
6 |
7 | # 社区与动态
8 | 与 Libra AI 社区保持联系,获取最新动态
9 |
10 | ## 加入社区
11 | 我们拥有一个充满活力的 Libra AI 用户和开发者社区。通过以下渠道与我们联系:
12 |
13 | - **GitHub** - 我们的开源开发、问题反馈和贡献的中心枢纽
14 | - **X / Twitter** - 关注 [@nextify2024](https://x.com/nextify2024) 获取最新更新和公告
15 |
16 |
17 | ## 分享您的作品
18 | 我们很乐意看到您使用 Libra AI 构建的项目!您可以通过以下方式分享:
19 |
20 | - 在我们的 GitHub Discussions 中创建展示帖子
21 | - 在社交媒体上标记我们 [@nextify2024](https://x.com/nextify2024)
22 | - 为我们的社区示例仓库贡献代码
23 |
24 | ## 开源贡献
25 | Libra AI 是开源项目,我们欢迎各种形式的贡献:
26 |
27 | - **报告问题** - 通过报告错误或建议功能帮助我们改进
28 | - **提交拉取请求** - 贡献代码改进和新功能
29 | - **文档完善** - 帮助改进我们的文档和指南
30 | - **社区支持** - 在讨论和论坛中帮助其他用户
31 |
32 | 访问我们的 [GitHub 仓库](https://github.com/nextify-limited/libra) 开始贡献。
33 |
34 | ## 保持更新
35 | 获取最新功能、改进和公司新闻:
36 |
37 | - 关注我们的 [GitHub 发布](https://github.com/nextify-limited/libra/releases)
38 | - 查看我们的开发路线图
39 | - 订阅我们的新闻通讯(即将推出)
40 |
41 | ## 企业支持
42 | 为企业客户和大型组织提供:
43 |
44 | - **优先支持** - 获得更快的技术问题响应时间
45 | - **定制集成** - 与我们的团队合作开发定制解决方案
46 | - **培训与入门** - 为团队采用提供专门支持
47 |
48 | 联系我们获取企业咨询和定制解决方案。
49 |
50 | ## 社区准则
51 | 为了维护一个友好和高效的社区:
52 |
53 | - 在所有互动中保持尊重和包容
54 | - 帮助他人学习和成长
55 | - 分享知识和最佳实践
56 | - 遵守我们的行为准则
57 | - 保持讨论相关性和建设性
58 |
59 | 加入我们,共同构建 AI 驱动开发的未来!
60 |
--------------------------------------------------------------------------------
/apps/vite-shadcn-template/src/components/ui/badge.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 | import { cva, type VariantProps } from "class-variance-authority"
3 |
4 | import { cn } from "@/lib/utils"
5 |
6 | const badgeVariants = cva(
7 | "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
8 | {
9 | variants: {
10 | variant: {
11 | default:
12 | "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
13 | secondary:
14 | "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
15 | destructive:
16 | "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
17 | outline: "text-foreground",
18 | },
19 | },
20 | defaultVariants: {
21 | variant: "default",
22 | },
23 | }
24 | )
25 |
26 | export interface BadgeProps
27 | extends React.HTMLAttributes,
28 | VariantProps {}
29 |
30 | function Badge({ className, variant, ...props }: BadgeProps) {
31 | return (
32 |
33 | )
34 | }
35 |
36 | export { Badge, badgeVariants }
37 |
--------------------------------------------------------------------------------
/apps/web/components/dashboard/ui/skeleton-card.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: AGPL-3.0-only
3 | * skeleton-card.tsx
4 | * Copyright (C) 2025 Nextify Limited
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation, either version 3 of the
9 | * License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see .
18 | *
19 | */
20 |
21 | import { Skeleton } from '@libra/ui/components/skeleton'
22 |
23 | export function SkeletonCard() {
24 | return (
25 |