rahman-resources 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "__APP_NAME__",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "next dev --turbo --port 3000",
8
+ "build": "next build",
9
+ "start": "next start",
10
+ "lint": "next lint",
11
+ "typecheck": "tsc --noEmit",
12
+ "convex:dev": "convex dev",
13
+ "convex:codegen": "convex dev --once"
14
+ },
15
+ "dependencies": {
16
+ "@convex-dev/auth": "^0.0.84",
17
+ "@radix-ui/react-label": "^2.1.0",
18
+ "@radix-ui/react-slot": "^1.1.0",
19
+ "class-variance-authority": "^0.7.1",
20
+ "clsx": "^2.1.1",
21
+ "convex": "^1.18.0",
22
+ "lucide-react": "^0.460.0",
23
+ "next": "^16.0.0",
24
+ "next-themes": "^0.4.4",
25
+ "react": "^19.0.0",
26
+ "react-dom": "^19.0.0",
27
+ "sonner": "^1.7.1",
28
+ "tailwind-merge": "^2.5.5"
29
+ },
30
+ "devDependencies": {
31
+ "@tailwindcss/postcss": "^4.0.0",
32
+ "@types/node": "^22.10.0",
33
+ "@types/react": "^19.0.0",
34
+ "@types/react-dom": "^19.0.0",
35
+ "postcss": "^8.5.0",
36
+ "tailwindcss": "^4.0.0",
37
+ "typescript": "^5.7.0"
38
+ }
39
+ }
@@ -0,0 +1,85 @@
1
+ @import "tailwindcss";
2
+
3
+ @theme {
4
+ --font-sans: var(--font-sans), ui-sans-serif, system-ui, sans-serif;
5
+ }
6
+
7
+ :root {
8
+ --background: oklch(1 0 0);
9
+ --foreground: oklch(0.145 0 0);
10
+ --card: oklch(1 0 0);
11
+ --card-foreground: oklch(0.145 0 0);
12
+ --popover: oklch(1 0 0);
13
+ --popover-foreground: oklch(0.145 0 0);
14
+ --primary: oklch(0.205 0 0);
15
+ --primary-foreground: oklch(0.985 0 0);
16
+ --secondary: oklch(0.97 0 0);
17
+ --secondary-foreground: oklch(0.205 0 0);
18
+ --muted: oklch(0.97 0 0);
19
+ --muted-foreground: oklch(0.556 0 0);
20
+ --accent: oklch(0.97 0 0);
21
+ --accent-foreground: oklch(0.205 0 0);
22
+ --destructive: oklch(0.577 0.245 27.325);
23
+ --destructive-foreground: oklch(0.985 0 0);
24
+ --border: oklch(0.922 0 0);
25
+ --input: oklch(0.922 0 0);
26
+ --ring: oklch(0.708 0 0);
27
+ --radius: 0.625rem;
28
+ }
29
+
30
+ .dark {
31
+ --background: oklch(0.145 0 0);
32
+ --foreground: oklch(0.985 0 0);
33
+ --card: oklch(0.205 0 0);
34
+ --card-foreground: oklch(0.985 0 0);
35
+ --popover: oklch(0.205 0 0);
36
+ --popover-foreground: oklch(0.985 0 0);
37
+ --primary: oklch(0.985 0 0);
38
+ --primary-foreground: oklch(0.205 0 0);
39
+ --secondary: oklch(0.269 0 0);
40
+ --secondary-foreground: oklch(0.985 0 0);
41
+ --muted: oklch(0.269 0 0);
42
+ --muted-foreground: oklch(0.708 0 0);
43
+ --accent: oklch(0.269 0 0);
44
+ --accent-foreground: oklch(0.985 0 0);
45
+ --destructive: oklch(0.704 0.191 22.216);
46
+ --destructive-foreground: oklch(0.985 0 0);
47
+ --border: oklch(1 0 0 / 0.1);
48
+ --input: oklch(1 0 0 / 0.15);
49
+ --ring: oklch(0.556 0 0);
50
+ }
51
+
52
+ @theme inline {
53
+ --color-background: var(--background);
54
+ --color-foreground: var(--foreground);
55
+ --color-card: var(--card);
56
+ --color-card-foreground: var(--card-foreground);
57
+ --color-popover: var(--popover);
58
+ --color-popover-foreground: var(--popover-foreground);
59
+ --color-primary: var(--primary);
60
+ --color-primary-foreground: var(--primary-foreground);
61
+ --color-secondary: var(--secondary);
62
+ --color-secondary-foreground: var(--secondary-foreground);
63
+ --color-muted: var(--muted);
64
+ --color-muted-foreground: var(--muted-foreground);
65
+ --color-accent: var(--accent);
66
+ --color-accent-foreground: var(--accent-foreground);
67
+ --color-destructive: var(--destructive);
68
+ --color-destructive-foreground: var(--destructive-foreground);
69
+ --color-border: var(--border);
70
+ --color-input: var(--input);
71
+ --color-ring: var(--ring);
72
+ --radius-sm: calc(var(--radius) - 4px);
73
+ --radius-md: calc(var(--radius) - 2px);
74
+ --radius-lg: var(--radius);
75
+ --radius-xl: calc(var(--radius) + 4px);
76
+ }
77
+
78
+ * {
79
+ border-color: var(--color-border);
80
+ }
81
+
82
+ body {
83
+ background: var(--color-background);
84
+ color: var(--color-foreground);
85
+ }
@@ -0,0 +1,23 @@
1
+ import type { Metadata } from "next";
2
+ import { Inter } from "next/font/google";
3
+ import { ConvexClientProvider } from "@/components/convex-provider";
4
+ import { Toaster } from "sonner";
5
+ import "./globals.css";
6
+
7
+ const inter = Inter({ subsets: ["latin"], variable: "--font-sans" });
8
+
9
+ export const metadata: Metadata = {
10
+ title: { default: "__APP_NAME__", template: "%s — __APP_NAME__" },
11
+ description: "Built with rahman-resources kitab.",
12
+ };
13
+
14
+ export default function RootLayout({ children }: { children: React.ReactNode }) {
15
+ return (
16
+ <html lang="en" suppressHydrationWarning>
17
+ <body className={`${inter.variable} font-sans antialiased`}>
18
+ <ConvexClientProvider>{children}</ConvexClientProvider>
19
+ <Toaster position="bottom-right" />
20
+ </body>
21
+ </html>
22
+ );
23
+ }
@@ -0,0 +1,26 @@
1
+ import Link from "next/link";
2
+ import { Button } from "@/components/ui/button";
3
+
4
+ export default function HomePage() {
5
+ return (
6
+ <main className="flex min-h-screen flex-col items-center justify-center gap-6 p-8 text-center">
7
+ <div className="max-w-xl space-y-3">
8
+ <h1 className="text-4xl font-bold tracking-tight">__APP_NAME__</h1>
9
+ <p className="text-muted-foreground">
10
+ Scaffolded with <code className="rounded bg-muted px-1.5 py-0.5 font-mono text-sm">rahman-resources</code>.
11
+ Drop in a layout next:
12
+ </p>
13
+ </div>
14
+ <pre className="rounded-md bg-muted px-4 py-3 text-left text-sm">
15
+ {`npx rahman-resources add personal-brand-os .
16
+ npx rahman-resources add landing-bento .
17
+ npx rahman-resources list`}
18
+ </pre>
19
+ <Button asChild>
20
+ <Link href="https://github.com/rahmanef63/resource-site" target="_blank" rel="noreferrer">
21
+ Browse the kitab
22
+ </Link>
23
+ </Button>
24
+ </main>
25
+ );
26
+ }
@@ -0,0 +1,13 @@
1
+ "use client";
2
+
3
+ import { ConvexAuthNextjsProvider } from "@convex-dev/auth/nextjs";
4
+ import { ConvexReactClient } from "convex/react";
5
+ import type { ReactNode } from "react";
6
+
7
+ const url = process.env.NEXT_PUBLIC_CONVEX_URL;
8
+ const convex = url ? new ConvexReactClient(url) : null;
9
+
10
+ export function ConvexClientProvider({ children }: { children: ReactNode }) {
11
+ if (!convex) return <>{children}</>;
12
+ return <ConvexAuthNextjsProvider client={convex}>{children}</ConvexAuthNextjsProvider>;
13
+ }
@@ -0,0 +1,43 @@
1
+ import * as React from "react";
2
+ import { Slot } from "@radix-ui/react-slot";
3
+ import { cva, type VariantProps } from "class-variance-authority";
4
+ import { cn } from "@/lib/utils";
5
+
6
+ const buttonVariants = cva(
7
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0",
8
+ {
9
+ variants: {
10
+ variant: {
11
+ default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
12
+ destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
13
+ outline: "border bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
14
+ secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
15
+ ghost: "hover:bg-accent hover:text-accent-foreground",
16
+ link: "text-primary underline-offset-4 hover:underline",
17
+ },
18
+ size: {
19
+ default: "h-9 px-4 py-2",
20
+ sm: "h-8 rounded-md px-3 text-xs",
21
+ lg: "h-10 rounded-md px-8",
22
+ icon: "h-9 w-9",
23
+ },
24
+ },
25
+ defaultVariants: { variant: "default", size: "default" },
26
+ },
27
+ );
28
+
29
+ export interface ButtonProps
30
+ extends React.ButtonHTMLAttributes<HTMLButtonElement>,
31
+ VariantProps<typeof buttonVariants> {
32
+ asChild?: boolean;
33
+ }
34
+
35
+ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
36
+ ({ className, variant, size, asChild = false, ...props }, ref) => {
37
+ const Comp = asChild ? Slot : "button";
38
+ return <Comp className={cn(buttonVariants({ variant, size, className }))} ref={ref} {...props} />;
39
+ },
40
+ );
41
+ Button.displayName = "Button";
42
+
43
+ export { Button, buttonVariants };
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema.json",
3
+ "style": "new-york",
4
+ "rsc": true,
5
+ "tsx": true,
6
+ "tailwind": {
7
+ "config": "",
8
+ "css": "app/globals.css",
9
+ "baseColor": "neutral",
10
+ "cssVariables": true,
11
+ "prefix": ""
12
+ },
13
+ "aliases": {
14
+ "components": "@/components",
15
+ "utils": "@/lib/utils",
16
+ "ui": "@/components/ui",
17
+ "lib": "@/lib",
18
+ "hooks": "@/hooks"
19
+ },
20
+ "iconLibrary": "lucide"
21
+ }
@@ -0,0 +1,6 @@
1
+ import { convexAuth } from "@convex-dev/auth/server";
2
+ import { Password } from "@convex-dev/auth/providers/Password";
3
+
4
+ export const { auth, signIn, signOut, store, isAuthenticated } = convexAuth({
5
+ providers: [Password()],
6
+ });
@@ -0,0 +1,7 @@
1
+ import { httpRouter } from "convex/server";
2
+ import { auth } from "./auth";
3
+
4
+ const http = httpRouter();
5
+ auth.addHttpRoutes(http);
6
+
7
+ export default http;
@@ -0,0 +1,14 @@
1
+ import { authTables } from "@convex-dev/auth/server";
2
+ import { defineSchema, defineTable } from "convex/server";
3
+ import { v } from "convex/values";
4
+
5
+ export default defineSchema({
6
+ ...authTables,
7
+ // Add app tables here. Example:
8
+ // notes: defineTable({
9
+ // userId: v.id("users"),
10
+ // title: v.string(),
11
+ // body: v.string(),
12
+ // createdAt: v.number(),
13
+ // }).index("by_user", ["userId"]),
14
+ });
@@ -0,0 +1,6 @@
1
+ import { clsx, type ClassValue } from "clsx";
2
+ import { twMerge } from "tailwind-merge";
3
+
4
+ export function cn(...inputs: ClassValue[]) {
5
+ return twMerge(clsx(inputs));
6
+ }
@@ -0,0 +1,16 @@
1
+ /** @type {import('next').NextConfig} */
2
+ const nextConfig = {
3
+ cacheComponents: true,
4
+ experimental: {
5
+ serverActions: {
6
+ bodySizeLimit: "5mb",
7
+ },
8
+ },
9
+ images: {
10
+ remotePatterns: [
11
+ { protocol: "https", hostname: "images.unsplash.com" },
12
+ ],
13
+ },
14
+ };
15
+
16
+ export default nextConfig;
@@ -0,0 +1,3 @@
1
+ export default {
2
+ plugins: { "@tailwindcss/postcss": {} },
3
+ };
@@ -0,0 +1,12 @@
1
+ // Next 16 proxy (renamed from middleware.ts).
2
+ // Stub — extend with auth gate via convexAuthNextjsToken() when ready.
3
+ import { NextResponse } from "next/server";
4
+ import type { NextRequest } from "next/server";
5
+
6
+ export function proxy(_req: NextRequest) {
7
+ return NextResponse.next();
8
+ }
9
+
10
+ export const config = {
11
+ matcher: ["/((?!api|_next/static|_next/image|favicon.ico).*)"],
12
+ };
@@ -0,0 +1,23 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "lib": ["dom", "dom.iterable", "esnext"],
5
+ "allowJs": true,
6
+ "skipLibCheck": true,
7
+ "strict": true,
8
+ "noEmit": true,
9
+ "esModuleInterop": true,
10
+ "module": "esnext",
11
+ "moduleResolution": "bundler",
12
+ "resolveJsonModule": true,
13
+ "isolatedModules": true,
14
+ "jsx": "preserve",
15
+ "incremental": true,
16
+ "plugins": [{ "name": "next" }],
17
+ "paths": {
18
+ "@/*": ["./*"]
19
+ }
20
+ },
21
+ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
22
+ "exclude": ["node_modules", "convex/_generated"]
23
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rahman-resources",
3
- "version": "0.1.0",
4
- "description": "Template installer for Rahman Resources kitab — npx rahman-resources add <template> <target>",
3
+ "version": "0.3.0",
4
+ "description": "Scaffolder + installer for Rahman Resources kitab — npx rahman-resources init <app>; add <template>; list; info",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "author": "Rahman <casadezian@gmail.com>",
@@ -24,7 +24,8 @@
24
24
  },
25
25
  "scripts": {
26
26
  "gen": "node scripts/gen-manifest.mjs",
27
- "prepublishOnly": "node scripts/gen-manifest.mjs"
27
+ "validate": "node scripts/validate.mjs",
28
+ "prepublishOnly": "node scripts/validate.mjs"
28
29
  },
29
30
  "dependencies": {
30
31
  "kleur": "^4.1.5",