create-rotor 0.1.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.
package/package.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "create-rotor",
3
+ "version": "0.1.0",
4
+ "description": "Scaffold Next.js projects with Bun, Tailwind, Biome, and more",
5
+ "type": "module",
6
+ "bin": "dist/index.js",
7
+ "files": ["dist", "template"],
8
+ "scripts": {
9
+ "build": "bun build src/index.ts --outdir dist --target node",
10
+ "dev": "bun run src/index.ts",
11
+ "check": "bunx @biomejs/biome check --write src/"
12
+ },
13
+ "dependencies": {
14
+ "@clack/prompts": "1.1.0"
15
+ },
16
+ "devDependencies": {
17
+ "@biomejs/biome": "2.4.7",
18
+ "@types/node": "25.5.0",
19
+ "typescript": "5.9.3"
20
+ },
21
+ "keywords": ["create", "nextjs", "bun", "tailwind", "scaffold", "template"],
22
+ "license": "MIT"
23
+ }
@@ -0,0 +1,9 @@
1
+ # [drizzle]
2
+ DATABASE_URL=postgresql://user:password@localhost:5432/dbname
3
+ SUPABASE_URL=https://your-project.supabase.co
4
+ SUPABASE_ANON_KEY=your-anon-key
5
+ # [/drizzle]
6
+
7
+ # [ai]
8
+ OPENAI_API_KEY=sk-your-key
9
+ # [/ai]
@@ -0,0 +1 @@
1
+ bunx lint-staged
@@ -0,0 +1,3 @@
1
+ {
2
+ "*": ["biome check --write --no-errors-on-unmatched"]
3
+ }
@@ -0,0 +1,12 @@
1
+ # {{PROJECT_NAME}}
2
+
3
+ Built with [create-rotor](https://github.com/yikzero/rotor).
4
+
5
+ ## Getting Started
6
+
7
+ ```bash
8
+ bun install
9
+ bun dev
10
+ ```
11
+
12
+ Open [http://localhost:3000](http://localhost:3000).
File without changes
@@ -0,0 +1,65 @@
1
+ @import 'tailwindcss';
2
+
3
+ /* [shadcn] */
4
+ @theme inline {
5
+ --color-background: var(--background);
6
+ --color-foreground: var(--foreground);
7
+ --color-primary: var(--primary);
8
+ --color-primary-foreground: var(--primary-foreground);
9
+ --color-secondary: var(--secondary);
10
+ --color-secondary-foreground: var(--secondary-foreground);
11
+ --color-muted: var(--muted);
12
+ --color-muted-foreground: var(--muted-foreground);
13
+ --color-accent: var(--accent);
14
+ --color-accent-foreground: var(--accent-foreground);
15
+ --color-destructive: var(--destructive);
16
+ --color-border: var(--border);
17
+ --color-input: var(--input);
18
+ --color-ring: var(--ring);
19
+ --radius-sm: calc(var(--radius) - 4px);
20
+ --radius-md: calc(var(--radius) - 2px);
21
+ --radius-lg: var(--radius);
22
+ --radius-xl: calc(var(--radius) + 4px);
23
+ }
24
+
25
+ :root {
26
+ --background: oklch(1 0 0);
27
+ --foreground: oklch(0.145 0 0);
28
+ --primary: oklch(0.205 0 0);
29
+ --primary-foreground: oklch(0.985 0 0);
30
+ --secondary: oklch(0.97 0 0);
31
+ --secondary-foreground: oklch(0.205 0 0);
32
+ --muted: oklch(0.97 0 0);
33
+ --muted-foreground: oklch(0.556 0 0);
34
+ --accent: oklch(0.97 0 0);
35
+ --accent-foreground: oklch(0.205 0 0);
36
+ --destructive: oklch(0.577 0.245 27.325);
37
+ --border: oklch(0.922 0 0);
38
+ --input: oklch(0.922 0 0);
39
+ --ring: oklch(0.708 0 0);
40
+ --radius: 0.625rem;
41
+ }
42
+
43
+ .dark {
44
+ --background: oklch(0.145 0 0);
45
+ --foreground: oklch(0.985 0 0);
46
+ --primary: oklch(0.985 0 0);
47
+ --primary-foreground: oklch(0.205 0 0);
48
+ --secondary: oklch(0.269 0 0);
49
+ --secondary-foreground: oklch(0.985 0 0);
50
+ --muted: oklch(0.269 0 0);
51
+ --muted-foreground: oklch(0.708 0 0);
52
+ --accent: oklch(0.269 0 0);
53
+ --accent-foreground: oklch(0.985 0 0);
54
+ --destructive: oklch(0.396 0.141 25.723);
55
+ --border: oklch(0.269 0 0);
56
+ --input: oklch(0.269 0 0);
57
+ --ring: oklch(0.439 0 0);
58
+ }
59
+
60
+ @layer base {
61
+ body {
62
+ @apply bg-background text-foreground;
63
+ }
64
+ }
65
+ /* [/shadcn] */
@@ -0,0 +1,19 @@
1
+ import type { Metadata } from 'next';
2
+ import './globals.css';
3
+
4
+ export const metadata: Metadata = {
5
+ title: '{{PROJECT_NAME}}',
6
+ description: '',
7
+ };
8
+
9
+ export default function RootLayout({
10
+ children,
11
+ }: Readonly<{
12
+ children: React.ReactNode;
13
+ }>) {
14
+ return (
15
+ <html lang="en">
16
+ <body>{children}</body>
17
+ </html>
18
+ );
19
+ }
@@ -0,0 +1,7 @@
1
+ export default function Home() {
2
+ return (
3
+ <main className="flex min-h-screen flex-col items-center justify-center p-24">
4
+ <h1 className="text-4xl font-bold">{{PROJECT_NAME}}</h1>
5
+ </main>
6
+ );
7
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "https://biomejs.dev/schemas/2.4.7/schema.json",
3
+ "formatter": {
4
+ "indentStyle": "space",
5
+ "indentWidth": 2
6
+ },
7
+ "javascript": {
8
+ "formatter": {
9
+ "quoteStyle": "single",
10
+ "trailingCommas": "all"
11
+ }
12
+ },
13
+ "linter": {
14
+ "rules": {
15
+ "recommended": true
16
+ }
17
+ },
18
+ "files": {
19
+ "includes": ["app/**", "lib/**", "components/**"]
20
+ }
21
+ }
File without changes
@@ -0,0 +1,20 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema.json",
3
+ "style": "base-vega",
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
+ }
@@ -0,0 +1,10 @@
1
+ import { defineConfig } from 'drizzle-kit';
2
+
3
+ export default defineConfig({
4
+ out: './drizzle',
5
+ schema: './lib/schema.ts',
6
+ dialect: 'postgresql',
7
+ dbCredentials: {
8
+ url: process.env.DATABASE_URL!,
9
+ },
10
+ });
@@ -0,0 +1,28 @@
1
+ # dependencies
2
+ node_modules/
3
+ .pnp
4
+ .pnp.js
5
+
6
+ # next.js
7
+ .next/
8
+ out/
9
+
10
+ # production
11
+ build/
12
+
13
+ # misc
14
+ .DS_Store
15
+ *.pem
16
+
17
+ # debug
18
+ npm-debug.log*
19
+ yarn-debug.log*
20
+ yarn-error.log*
21
+
22
+ # env
23
+ .env
24
+ .env*.local
25
+
26
+ # typescript
27
+ *.tsbuildinfo
28
+ next-env.d.ts
@@ -0,0 +1,10 @@
1
+ import { openai } from '@ai-sdk/openai';
2
+ import { generateText } from 'ai';
3
+
4
+ export async function generate(prompt: string) {
5
+ const { text } = await generateText({
6
+ model: openai('gpt-4o'),
7
+ prompt,
8
+ });
9
+ return text;
10
+ }
@@ -0,0 +1,7 @@
1
+ import { drizzle } from 'drizzle-orm/postgres-js';
2
+ import postgres from 'postgres';
3
+
4
+ const connectionString = process.env.DATABASE_URL!;
5
+ const client = postgres(connectionString);
6
+
7
+ export const db = drizzle(client);
@@ -0,0 +1,8 @@
1
+ import { pgTable, serial, text, timestamp } from 'drizzle-orm/pg-core';
2
+
3
+ export const posts = pgTable('posts', {
4
+ id: serial('id').primaryKey(),
5
+ title: text('title').notNull(),
6
+ content: text('content'),
7
+ createdAt: timestamp('created_at').defaultNow().notNull(),
8
+ });
@@ -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,5 @@
1
+ import type { NextConfig } from 'next';
2
+
3
+ const nextConfig: NextConfig = {};
4
+
5
+ export default nextConfig;
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "{{PROJECT_NAME}}",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "scripts": {
6
+ "dev": "next dev --turbopack",
7
+ "build": "next build",
8
+ "start": "next start",
9
+ "check": "bunx @biomejs/biome check --write .",
10
+ "prepare": "husky",
11
+ "db:generate": "drizzle-kit generate",
12
+ "db:migrate": "drizzle-kit migrate",
13
+ "db:studio": "drizzle-kit studio"
14
+ },
15
+ "dependencies": {
16
+ "next": "16.1.6",
17
+ "react": "19.2.4",
18
+ "react-dom": "19.2.4",
19
+ "class-variance-authority": "0.7.1",
20
+ "clsx": "2.1.1",
21
+ "tailwind-merge": "3.5.0",
22
+ "lucide-react": "0.577.0",
23
+ "swr": "2.4.1",
24
+ "drizzle-orm": "0.45.1",
25
+ "@supabase/supabase-js": "2.99.1",
26
+ "postgres": "3.4.8",
27
+ "ai": "6.0.116",
28
+ "@ai-sdk/openai": "3.0.41"
29
+ },
30
+ "devDependencies": {
31
+ "@biomejs/biome": "2.4.7",
32
+ "@tailwindcss/postcss": "4.2.1",
33
+ "@types/node": "25.5.0",
34
+ "@types/react": "19.2.14",
35
+ "@types/react-dom": "19.2.14",
36
+ "husky": "9.1.7",
37
+ "lint-staged": "16.4.0",
38
+ "tailwindcss": "4.2.1",
39
+ "typescript": "5.9.3",
40
+ "drizzle-kit": "0.31.9"
41
+ }
42
+ }
@@ -0,0 +1,7 @@
1
+ const config = {
2
+ plugins: {
3
+ '@tailwindcss/postcss': {},
4
+ },
5
+ };
6
+
7
+ export default config;
@@ -0,0 +1,23 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2017",
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"]
23
+ }