create-kofi-stack 1.2.7 → 1.2.8

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 (2) hide show
  1. package/dist/index.js +76 -12
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -3996,20 +3996,84 @@ export default function RootLayout({
3996
3996
  import config from '@/payload.config'
3997
3997
 
3998
3998
  export default async function HomePage() {
3999
- const payload = await getPayload({ config })
3999
+ // Check if DATABASE_URL is configured
4000
+ if (!process.env.DATABASE_URL || process.env.DATABASE_URL.includes('[PASSWORD]')) {
4001
+ return (
4002
+ <main className="min-h-screen bg-gradient-to-b from-gray-50 to-white">
4003
+ <div className="container mx-auto px-4 py-16">
4004
+ <div className="max-w-2xl mx-auto text-center">
4005
+ <h1 className="text-4xl font-bold text-gray-900 mb-4">
4006
+ Welcome to Your Marketing Site
4007
+ </h1>
4008
+ <p className="text-lg text-gray-600 mb-8">
4009
+ Built with Payload CMS and Next.js
4010
+ </p>
4011
+ <div className="bg-amber-50 border border-amber-200 rounded-lg p-6 text-left">
4012
+ <h2 className="text-lg font-semibold text-amber-800 mb-2">
4013
+ Database Setup Required
4014
+ </h2>
4015
+ <p className="text-amber-700 mb-4">
4016
+ To get started, configure your PostgreSQL database:
4017
+ </p>
4018
+ <ol className="list-decimal list-inside text-amber-700 space-y-2">
4019
+ <li>Create a Supabase project at <a href="https://supabase.com" className="underline" target="_blank" rel="noopener noreferrer">supabase.com</a></li>
4020
+ <li>Copy your database connection string</li>
4021
+ <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>
4022
+ <li>Restart the development server</li>
4023
+ </ol>
4024
+ </div>
4025
+ <div className="mt-8">
4026
+ <a
4027
+ href="/admin"
4028
+ className="inline-flex items-center px-6 py-3 bg-gray-900 text-white rounded-lg hover:bg-gray-800 transition-colors"
4029
+ >
4030
+ Go to Admin Panel \u2192
4031
+ </a>
4032
+ </div>
4033
+ </div>
4034
+ </div>
4035
+ </main>
4036
+ )
4037
+ }
4000
4038
 
4001
- const settings = await payload.findGlobal({
4002
- slug: 'site-settings',
4003
- })
4039
+ try {
4040
+ const payload = await getPayload({ config })
4004
4041
 
4005
- return (
4006
- <main className="min-h-screen">
4007
- <div className="container mx-auto px-4 py-16">
4008
- <h1 className="text-4xl font-bold">{settings.siteName}</h1>
4009
- <p className="mt-4 text-lg text-gray-600">{settings.siteDescription}</p>
4010
- </div>
4011
- </main>
4012
- )
4042
+ const settings = await payload.findGlobal({
4043
+ slug: 'site-settings',
4044
+ })
4045
+
4046
+ return (
4047
+ <main className="min-h-screen">
4048
+ <div className="container mx-auto px-4 py-16">
4049
+ <h1 className="text-4xl font-bold">{settings.siteName || 'Marketing Site'}</h1>
4050
+ <p className="mt-4 text-lg text-gray-600">{settings.siteDescription || 'Built with Payload CMS'}</p>
4051
+ </div>
4052
+ </main>
4053
+ )
4054
+ } catch (error) {
4055
+ return (
4056
+ <main className="min-h-screen bg-gradient-to-b from-red-50 to-white">
4057
+ <div className="container mx-auto px-4 py-16">
4058
+ <div className="max-w-2xl mx-auto text-center">
4059
+ <h1 className="text-4xl font-bold text-gray-900 mb-4">
4060
+ Database Connection Error
4061
+ </h1>
4062
+ <div className="bg-red-50 border border-red-200 rounded-lg p-6 text-left">
4063
+ <p className="text-red-700 mb-4">
4064
+ Could not connect to the database. Please check your configuration:
4065
+ </p>
4066
+ <ul className="list-disc list-inside text-red-700 space-y-2">
4067
+ <li>Verify <code className="bg-red-100 px-1 rounded">DATABASE_URL</code> is correct</li>
4068
+ <li>Ensure your database is running and accessible</li>
4069
+ <li>Check that the database credentials are valid</li>
4070
+ </ul>
4071
+ </div>
4072
+ </div>
4073
+ </div>
4074
+ </main>
4075
+ )
4076
+ }
4013
4077
  }
4014
4078
  `;
4015
4079
  await writeFile(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-kofi-stack",
3
- "version": "1.2.7",
3
+ "version": "1.2.8",
4
4
  "description": "Scaffold opinionated full-stack projects with Next.js, Convex, Better-Auth, and more",
5
5
  "type": "module",
6
6
  "bin": {