render-create 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.
Files changed (82) hide show
  1. package/README.md +207 -0
  2. package/dist/cli.d.ts +6 -0
  3. package/dist/cli.js +45 -0
  4. package/dist/commands/check.d.ts +8 -0
  5. package/dist/commands/check.js +96 -0
  6. package/dist/commands/init.d.ts +12 -0
  7. package/dist/commands/init.js +1201 -0
  8. package/dist/commands/sync.d.ts +8 -0
  9. package/dist/commands/sync.js +126 -0
  10. package/dist/types.d.ts +246 -0
  11. package/dist/types.js +4 -0
  12. package/dist/utils.d.ts +53 -0
  13. package/dist/utils.js +142 -0
  14. package/package.json +65 -0
  15. package/templates/LINTING_SETUP.md +205 -0
  16. package/templates/README_TEMPLATE.md +68 -0
  17. package/templates/STYLE_GUIDE.md +241 -0
  18. package/templates/assets/favicon.png +0 -0
  19. package/templates/assets/favicon.svg +17 -0
  20. package/templates/biome.json +43 -0
  21. package/templates/cursor/rules/drizzle.mdc +165 -0
  22. package/templates/cursor/rules/fastify.mdc +132 -0
  23. package/templates/cursor/rules/general.mdc +112 -0
  24. package/templates/cursor/rules/nextjs.mdc +89 -0
  25. package/templates/cursor/rules/python.mdc +89 -0
  26. package/templates/cursor/rules/react.mdc +200 -0
  27. package/templates/cursor/rules/sqlalchemy.mdc +205 -0
  28. package/templates/cursor/rules/tailwind.mdc +139 -0
  29. package/templates/cursor/rules/typescript.mdc +112 -0
  30. package/templates/cursor/rules/vite.mdc +169 -0
  31. package/templates/cursor/rules/workflows.mdc +349 -0
  32. package/templates/docker-compose.example.yml +55 -0
  33. package/templates/drizzle/db-index.ts +15 -0
  34. package/templates/drizzle/drizzle.config.ts +10 -0
  35. package/templates/drizzle/schema.ts +12 -0
  36. package/templates/env.example +15 -0
  37. package/templates/fastapi/app/__init__.py +1 -0
  38. package/templates/fastapi/app/config.py +12 -0
  39. package/templates/fastapi/app/database.py +16 -0
  40. package/templates/fastapi/app/models.py +13 -0
  41. package/templates/fastapi/main.py +22 -0
  42. package/templates/fastify/index.ts +40 -0
  43. package/templates/github/CODEOWNERS +10 -0
  44. package/templates/github/ISSUE_TEMPLATE/bug_report.md +39 -0
  45. package/templates/github/ISSUE_TEMPLATE/feature_request.md +23 -0
  46. package/templates/github/PULL_REQUEST_TEMPLATE.md +25 -0
  47. package/templates/gitignore/node.gitignore +41 -0
  48. package/templates/gitignore/python.gitignore +49 -0
  49. package/templates/multi-api/README.md +60 -0
  50. package/templates/multi-api/gitignore +28 -0
  51. package/templates/multi-api/node-api/drizzle.config.ts +10 -0
  52. package/templates/multi-api/node-api/package-simple.json +13 -0
  53. package/templates/multi-api/node-api/package.json +16 -0
  54. package/templates/multi-api/node-api/src/db/index.ts +13 -0
  55. package/templates/multi-api/node-api/src/db/schema.ts +9 -0
  56. package/templates/multi-api/node-api/src/index-simple.ts +36 -0
  57. package/templates/multi-api/node-api/src/index.ts +50 -0
  58. package/templates/multi-api/node-api/tsconfig.json +20 -0
  59. package/templates/multi-api/python-api/app/__init__.py +1 -0
  60. package/templates/multi-api/python-api/app/config.py +12 -0
  61. package/templates/multi-api/python-api/app/database.py +16 -0
  62. package/templates/multi-api/python-api/app/models.py +13 -0
  63. package/templates/multi-api/python-api/main-simple.py +25 -0
  64. package/templates/multi-api/python-api/main.py +44 -0
  65. package/templates/multi-api/python-api/requirements-simple.txt +3 -0
  66. package/templates/multi-api/python-api/requirements.txt +8 -0
  67. package/templates/next/globals.css +126 -0
  68. package/templates/next/layout.tsx +34 -0
  69. package/templates/next/next.config.static.ts +10 -0
  70. package/templates/next/page-fullstack.tsx +120 -0
  71. package/templates/next/page.tsx +72 -0
  72. package/templates/presets.json +581 -0
  73. package/templates/ruff.toml +30 -0
  74. package/templates/tsconfig.base.json +17 -0
  75. package/templates/vite/index.css +127 -0
  76. package/templates/vite/vite.config.ts +7 -0
  77. package/templates/worker/py/cron.py +53 -0
  78. package/templates/worker/py/worker.py +95 -0
  79. package/templates/worker/py/workflow.py +73 -0
  80. package/templates/worker/ts/cron.ts +49 -0
  81. package/templates/worker/ts/worker.ts +84 -0
  82. package/templates/worker/ts/workflow.ts +67 -0
@@ -0,0 +1,126 @@
1
+ @import "tailwindcss";
2
+ @plugin "@tailwindcss/typography";
3
+
4
+ /*
5
+ * Brutalist Design Defaults
6
+ * - Black background, white text
7
+ * - No rounded corners
8
+ * - High contrast borders
9
+ * - No gradients or shadows
10
+ */
11
+
12
+ :root {
13
+ --background: #000000;
14
+ --foreground: #ffffff;
15
+ --border: #ffffff;
16
+ --muted: #888888;
17
+ }
18
+
19
+ * {
20
+ border-radius: 0 !important;
21
+ }
22
+
23
+ html {
24
+ color-scheme: dark;
25
+ }
26
+
27
+ body {
28
+ background: var(--background);
29
+ color: var(--foreground);
30
+ font-family: system-ui, -apple-system, sans-serif;
31
+ }
32
+
33
+ /* Links */
34
+ a {
35
+ color: var(--foreground);
36
+ text-decoration: underline;
37
+ }
38
+
39
+ a:hover {
40
+ text-decoration: none;
41
+ }
42
+
43
+ /* Buttons - brutalist style */
44
+ button,
45
+ [role="button"],
46
+ input[type="submit"],
47
+ input[type="button"] {
48
+ background: var(--foreground);
49
+ color: var(--background);
50
+ border: 1px solid var(--foreground);
51
+ padding: 0.75rem 1.5rem;
52
+ font-weight: 600;
53
+ cursor: pointer;
54
+ transition: all 0.15s ease;
55
+ }
56
+
57
+ button:hover,
58
+ [role="button"]:hover,
59
+ input[type="submit"]:hover,
60
+ input[type="button"]:hover {
61
+ background: transparent;
62
+ color: var(--foreground);
63
+ }
64
+
65
+ /* Secondary/outline buttons */
66
+ button.secondary,
67
+ .btn-secondary {
68
+ background: transparent;
69
+ color: var(--foreground);
70
+ }
71
+
72
+ button.secondary:hover,
73
+ .btn-secondary:hover {
74
+ background: var(--foreground);
75
+ color: var(--background);
76
+ }
77
+
78
+ /* Inputs */
79
+ input,
80
+ textarea,
81
+ select {
82
+ background: transparent;
83
+ border: 1px solid var(--foreground);
84
+ color: var(--foreground);
85
+ padding: 0.75rem;
86
+ }
87
+
88
+ input::placeholder,
89
+ textarea::placeholder {
90
+ color: var(--muted);
91
+ }
92
+
93
+ input:focus,
94
+ textarea:focus,
95
+ select:focus {
96
+ outline: none;
97
+ border-color: var(--foreground);
98
+ box-shadow: 0 0 0 1px var(--foreground);
99
+ }
100
+
101
+ /* Cards/containers */
102
+ .card,
103
+ [class*="card"] {
104
+ background: transparent;
105
+ border: 1px solid var(--foreground);
106
+ padding: 1.5rem;
107
+ }
108
+
109
+ /* Typography - dark theme overrides */
110
+ .prose {
111
+ --tw-prose-body: var(--foreground);
112
+ --tw-prose-headings: var(--foreground);
113
+ --tw-prose-links: var(--foreground);
114
+ --tw-prose-bold: var(--foreground);
115
+ --tw-prose-counters: var(--muted);
116
+ --tw-prose-bullets: var(--muted);
117
+ --tw-prose-hr: var(--foreground);
118
+ --tw-prose-quotes: var(--foreground);
119
+ --tw-prose-quote-borders: var(--foreground);
120
+ --tw-prose-captions: var(--muted);
121
+ --tw-prose-code: var(--foreground);
122
+ --tw-prose-pre-code: var(--foreground);
123
+ --tw-prose-pre-bg: rgba(255, 255, 255, 0.05);
124
+ --tw-prose-th-borders: var(--foreground);
125
+ --tw-prose-td-borders: var(--muted);
126
+ }
@@ -0,0 +1,34 @@
1
+ import type { Metadata } from "next";
2
+ import "./globals.css";
3
+
4
+ export const metadata: Metadata = {
5
+ title: "{{PROJECT_NAME}}",
6
+ description: "Built with Next.js and deployed on Render",
7
+ };
8
+
9
+ export default function RootLayout({
10
+ children,
11
+ }: Readonly<{
12
+ children: React.ReactNode;
13
+ }>) {
14
+ return (
15
+ <html lang="en">
16
+ <body className="antialiased min-h-screen bg-black text-white">
17
+ {children}
18
+ <footer className="fixed bottom-0 left-0 right-0 border-t-2 border-white bg-black p-4">
19
+ <div className="max-w-7xl mx-auto flex justify-between items-center text-sm">
20
+ <span>Built with Next.js</span>
21
+ <div className="flex gap-6">
22
+ <a href="https://render.com/docs" target="_blank" rel="noopener noreferrer">
23
+ Render Docs
24
+ </a>
25
+ <a href="https://github.com/render-examples" target="_blank" rel="noopener noreferrer">
26
+ GitHub
27
+ </a>
28
+ </div>
29
+ </div>
30
+ </footer>
31
+ </body>
32
+ </html>
33
+ );
34
+ }
@@ -0,0 +1,10 @@
1
+ import type { NextConfig } from "next";
2
+
3
+ const nextConfig: NextConfig = {
4
+ output: "export",
5
+ images: {
6
+ unoptimized: true,
7
+ },
8
+ };
9
+
10
+ export default nextConfig;
@@ -0,0 +1,120 @@
1
+ import { db, isDatabaseConfigured } from "@/db";
2
+ import { users } from "@/db/schema";
3
+
4
+ export default async function Home() {
5
+ // Example: fetch users from database
6
+ let userCount = 0;
7
+ let dbStatus: "connected" | "not-configured" | "error" = "not-configured";
8
+
9
+ if (isDatabaseConfigured) {
10
+ try {
11
+ const allUsers = await db.select().from(users);
12
+ userCount = allUsers.length;
13
+ dbStatus = "connected";
14
+ } catch {
15
+ dbStatus = "error";
16
+ }
17
+ }
18
+
19
+ return (
20
+ <main className="min-h-screen p-8 pb-24">
21
+ <div className="max-w-4xl mx-auto prose prose-invert max-w-none">
22
+ {/* Hero */}
23
+ <section className="py-20 text-center">
24
+ <h1 className="text-6xl font-bold mb-6">{{PROJECT_NAME}}</h1>
25
+ <p className="text-xl text-gray-400 mb-8">
26
+ Full-stack Next.js with PostgreSQL.
27
+ <br />
28
+ Fast, flexible, and ready to scale.
29
+ </p>
30
+ <div className="flex gap-4 justify-center">
31
+ <a
32
+ href="#setup"
33
+ className="bg-white !text-black px-8 py-3 font-semibold hover:bg-black hover:!text-white border border-white transition-all no-underline"
34
+ >
35
+ Get Started
36
+ </a>
37
+ <a
38
+ href="https://render.com/docs"
39
+ target="_blank"
40
+ rel="noopener noreferrer"
41
+ className="bg-transparent text-white px-8 py-3 font-semibold border border-white hover:bg-white hover:text-black transition-all no-underline"
42
+ >
43
+ Documentation
44
+ </a>
45
+ </div>
46
+ </section>
47
+
48
+ {/* Database Status */}
49
+ <section className="py-8">
50
+ <div className="border border-white p-6 text-center not-prose">
51
+ <p className="text-sm text-gray-400 mb-2">Database Status</p>
52
+ <p className="text-2xl font-bold">
53
+ {dbStatus === "connected" && `${userCount} users`}
54
+ {dbStatus === "not-configured" && "Not configured"}
55
+ {dbStatus === "error" && "Connection error"}
56
+ </p>
57
+ {dbStatus === "not-configured" && (
58
+ <p className="text-sm text-gray-500 mt-2">
59
+ Set DATABASE_URL in .env to connect
60
+ </p>
61
+ )}
62
+ </div>
63
+ </section>
64
+
65
+ {/* Setup */}
66
+ <section id="setup" className="py-16">
67
+ <h2 className="text-3xl font-bold mb-8">Setup</h2>
68
+ <div className="space-y-4">
69
+ <div className="border border-white p-6 not-prose">
70
+ <h3 className="text-xl font-bold mb-2">1. Configure Database</h3>
71
+ <p className="text-gray-400 mb-4">
72
+ Set your PostgreSQL connection string in <code className="bg-white/10 px-2 py-1">.env</code>
73
+ </p>
74
+ <pre className="bg-white/5 p-4 text-sm overflow-x-auto">
75
+ DATABASE_URL=&quot;postgresql://user:pass@host:5432/db&quot;
76
+ </pre>
77
+ </div>
78
+ <div className="border border-white p-6 not-prose">
79
+ <h3 className="text-xl font-bold mb-2">2. Run Migrations</h3>
80
+ <pre className="bg-white/5 p-4 text-sm overflow-x-auto">
81
+ {`npm run db:generate
82
+ npm run db:migrate`}
83
+ </pre>
84
+ </div>
85
+ <div className="border border-white p-6 not-prose">
86
+ <h3 className="text-xl font-bold mb-2">3. Start Building</h3>
87
+ <p className="text-gray-400">
88
+ Edit <code className="bg-white/10 px-2 py-1">src/app/page.tsx</code> and{" "}
89
+ <code className="bg-white/10 px-2 py-1">src/db/schema.ts</code>
90
+ </p>
91
+ </div>
92
+ </div>
93
+ </section>
94
+
95
+ {/* Stack */}
96
+ <section className="py-16">
97
+ <h2 className="text-3xl font-bold mb-8">Stack</h2>
98
+ <div className="grid grid-cols-1 md:grid-cols-2 gap-4">
99
+ <div className="border border-white p-6 not-prose">
100
+ <h3 className="text-xl font-bold mb-2">Next.js 15</h3>
101
+ <p className="text-gray-400">App Router + Server Components</p>
102
+ </div>
103
+ <div className="border border-white p-6 not-prose">
104
+ <h3 className="text-xl font-bold mb-2">Drizzle ORM</h3>
105
+ <p className="text-gray-400">Type-safe PostgreSQL queries</p>
106
+ </div>
107
+ <div className="border border-white p-6 not-prose">
108
+ <h3 className="text-xl font-bold mb-2">Tailwind CSS</h3>
109
+ <p className="text-gray-400">Utility-first styling</p>
110
+ </div>
111
+ <div className="border border-white p-6 not-prose">
112
+ <h3 className="text-xl font-bold mb-2">Render</h3>
113
+ <p className="text-gray-400">One-click deploy with Blueprint</p>
114
+ </div>
115
+ </div>
116
+ </section>
117
+ </div>
118
+ </main>
119
+ );
120
+ }
@@ -0,0 +1,72 @@
1
+ export default function Home() {
2
+ return (
3
+ <main className="min-h-screen p-8 pb-24">
4
+ <div className="max-w-4xl mx-auto prose prose-invert max-w-none">
5
+ {/* Hero */}
6
+ <section className="py-20 text-center">
7
+ <h1 className="text-6xl font-bold mb-6">{{PROJECT_NAME}}</h1>
8
+ <p className="text-xl text-gray-400 mb-8">
9
+ A modern starting point for your next project.
10
+ <br />
11
+ Fast, flexible, and ready to scale.
12
+ </p>
13
+ <div className="flex gap-4 justify-center">
14
+ <a
15
+ href="#features"
16
+ className="bg-white !text-black px-8 py-3 font-semibold hover:bg-black hover:!text-white border border-white transition-all no-underline"
17
+ >
18
+ Get Started
19
+ </a>
20
+ <a
21
+ href="https://render.com/docs"
22
+ target="_blank"
23
+ rel="noopener noreferrer"
24
+ className="bg-transparent text-white px-8 py-3 font-semibold border border-white hover:bg-white hover:text-black transition-all no-underline"
25
+ >
26
+ Documentation
27
+ </a>
28
+ </div>
29
+ </section>
30
+
31
+ {/* Features */}
32
+ <section id="features" className="py-16">
33
+ <h2 className="text-3xl font-bold mb-8">Stack</h2>
34
+ <div className="grid grid-cols-1 md:grid-cols-2 gap-4">
35
+ <div className="border border-white p-6 not-prose">
36
+ <h3 className="text-xl font-bold mb-2">Next.js 15</h3>
37
+ <p className="text-gray-400">
38
+ React framework with App Router, Server Components, and Turbopack.
39
+ </p>
40
+ </div>
41
+ <div className="border border-white p-6 not-prose">
42
+ <h3 className="text-xl font-bold mb-2">Tailwind CSS</h3>
43
+ <p className="text-gray-400">
44
+ Utility-first CSS framework for rapid UI development.
45
+ </p>
46
+ </div>
47
+ <div className="border border-white p-6 not-prose">
48
+ <h3 className="text-xl font-bold mb-2">TypeScript</h3>
49
+ <p className="text-gray-400">
50
+ Type-safe JavaScript for better developer experience.
51
+ </p>
52
+ </div>
53
+ <div className="border border-white p-6 not-prose">
54
+ <h3 className="text-xl font-bold mb-2">Render</h3>
55
+ <p className="text-gray-400">
56
+ Deploy with zero configuration using the included Blueprint.
57
+ </p>
58
+ </div>
59
+ </div>
60
+ </section>
61
+
62
+ {/* CTA */}
63
+ <section className="py-16 text-center">
64
+ <h2 className="text-3xl font-bold mb-4">Ready to build?</h2>
65
+ <p className="text-gray-400 mb-8">
66
+ Edit <code className="bg-white/10 px-2 py-1">src/app/page.tsx</code> to get started.
67
+ </p>
68
+ </section>
69
+ </div>
70
+ </main>
71
+ );
72
+ }