create-kofi-stack 1.2.7 → 1.2.9
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/dist/index.js +81 -13
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3094,6 +3094,10 @@ async function generateSharedConfigs(targetDir) {
|
|
|
3094
3094
|
name: "@repo/config-typescript",
|
|
3095
3095
|
version: "0.1.0",
|
|
3096
3096
|
private: true,
|
|
3097
|
+
exports: {
|
|
3098
|
+
"./base.json": "./base.json",
|
|
3099
|
+
"./nextjs.json": "./nextjs.json"
|
|
3100
|
+
},
|
|
3097
3101
|
files: ["base.json", "nextjs.json"]
|
|
3098
3102
|
};
|
|
3099
3103
|
await writeJSON(
|
|
@@ -3996,20 +4000,84 @@ export default function RootLayout({
|
|
|
3996
4000
|
import config from '@/payload.config'
|
|
3997
4001
|
|
|
3998
4002
|
export default async function HomePage() {
|
|
3999
|
-
|
|
4003
|
+
// Check if DATABASE_URL is configured
|
|
4004
|
+
if (!process.env.DATABASE_URL || process.env.DATABASE_URL.includes('[PASSWORD]')) {
|
|
4005
|
+
return (
|
|
4006
|
+
<main className="min-h-screen bg-gradient-to-b from-gray-50 to-white">
|
|
4007
|
+
<div className="container mx-auto px-4 py-16">
|
|
4008
|
+
<div className="max-w-2xl mx-auto text-center">
|
|
4009
|
+
<h1 className="text-4xl font-bold text-gray-900 mb-4">
|
|
4010
|
+
Welcome to Your Marketing Site
|
|
4011
|
+
</h1>
|
|
4012
|
+
<p className="text-lg text-gray-600 mb-8">
|
|
4013
|
+
Built with Payload CMS and Next.js
|
|
4014
|
+
</p>
|
|
4015
|
+
<div className="bg-amber-50 border border-amber-200 rounded-lg p-6 text-left">
|
|
4016
|
+
<h2 className="text-lg font-semibold text-amber-800 mb-2">
|
|
4017
|
+
Database Setup Required
|
|
4018
|
+
</h2>
|
|
4019
|
+
<p className="text-amber-700 mb-4">
|
|
4020
|
+
To get started, configure your PostgreSQL database:
|
|
4021
|
+
</p>
|
|
4022
|
+
<ol className="list-decimal list-inside text-amber-700 space-y-2">
|
|
4023
|
+
<li>Create a Supabase project at <a href="https://supabase.com" className="underline" target="_blank" rel="noopener noreferrer">supabase.com</a></li>
|
|
4024
|
+
<li>Copy your database connection string</li>
|
|
4025
|
+
<li>Update <code className="bg-amber-100 px-1 rounded">DATABASE_URL</code> in <code className="bg-amber-100 px-1 rounded">apps/marketing/.env.local</code></li>
|
|
4026
|
+
<li>Restart the development server</li>
|
|
4027
|
+
</ol>
|
|
4028
|
+
</div>
|
|
4029
|
+
<div className="mt-8">
|
|
4030
|
+
<a
|
|
4031
|
+
href="/admin"
|
|
4032
|
+
className="inline-flex items-center px-6 py-3 bg-gray-900 text-white rounded-lg hover:bg-gray-800 transition-colors"
|
|
4033
|
+
>
|
|
4034
|
+
Go to Admin Panel \u2192
|
|
4035
|
+
</a>
|
|
4036
|
+
</div>
|
|
4037
|
+
</div>
|
|
4038
|
+
</div>
|
|
4039
|
+
</main>
|
|
4040
|
+
)
|
|
4041
|
+
}
|
|
4000
4042
|
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
})
|
|
4043
|
+
try {
|
|
4044
|
+
const payload = await getPayload({ config })
|
|
4004
4045
|
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4046
|
+
const settings = await payload.findGlobal({
|
|
4047
|
+
slug: 'site-settings',
|
|
4048
|
+
})
|
|
4049
|
+
|
|
4050
|
+
return (
|
|
4051
|
+
<main className="min-h-screen">
|
|
4052
|
+
<div className="container mx-auto px-4 py-16">
|
|
4053
|
+
<h1 className="text-4xl font-bold">{settings.siteName || 'Marketing Site'}</h1>
|
|
4054
|
+
<p className="mt-4 text-lg text-gray-600">{settings.siteDescription || 'Built with Payload CMS'}</p>
|
|
4055
|
+
</div>
|
|
4056
|
+
</main>
|
|
4057
|
+
)
|
|
4058
|
+
} catch (error) {
|
|
4059
|
+
return (
|
|
4060
|
+
<main className="min-h-screen bg-gradient-to-b from-red-50 to-white">
|
|
4061
|
+
<div className="container mx-auto px-4 py-16">
|
|
4062
|
+
<div className="max-w-2xl mx-auto text-center">
|
|
4063
|
+
<h1 className="text-4xl font-bold text-gray-900 mb-4">
|
|
4064
|
+
Database Connection Error
|
|
4065
|
+
</h1>
|
|
4066
|
+
<div className="bg-red-50 border border-red-200 rounded-lg p-6 text-left">
|
|
4067
|
+
<p className="text-red-700 mb-4">
|
|
4068
|
+
Could not connect to the database. Please check your configuration:
|
|
4069
|
+
</p>
|
|
4070
|
+
<ul className="list-disc list-inside text-red-700 space-y-2">
|
|
4071
|
+
<li>Verify <code className="bg-red-100 px-1 rounded">DATABASE_URL</code> is correct</li>
|
|
4072
|
+
<li>Ensure your database is running and accessible</li>
|
|
4073
|
+
<li>Check that the database credentials are valid</li>
|
|
4074
|
+
</ul>
|
|
4075
|
+
</div>
|
|
4076
|
+
</div>
|
|
4077
|
+
</div>
|
|
4078
|
+
</main>
|
|
4079
|
+
)
|
|
4080
|
+
}
|
|
4013
4081
|
}
|
|
4014
4082
|
`;
|
|
4015
4083
|
await writeFile(
|
|
@@ -4235,7 +4303,7 @@ export const source = loader({
|
|
|
4235
4303
|
await writeFile(path16.join(docsDir, "src/lib/source.ts"), content);
|
|
4236
4304
|
}
|
|
4237
4305
|
async function generateFumadocsAppFiles(config, docsDir) {
|
|
4238
|
-
const layoutContent = `import { RootProvider } from 'fumadocs-ui/
|
|
4306
|
+
const layoutContent = `import { RootProvider } from 'fumadocs-ui/providers'
|
|
4239
4307
|
import { Inter } from 'next/font/google'
|
|
4240
4308
|
import type { Metadata } from 'next'
|
|
4241
4309
|
import type { ReactNode } from 'react'
|