chore: setup payload 3 + next 16 foundation with ipal-kit

This commit is contained in:
MichalC
2026-08-31 21:24:53 +02:00
commit 5f2eaa0b37
46 changed files with 11884 additions and 0 deletions
+45
View File
@@ -0,0 +1,45 @@
import { postgresAdapter } from '@payloadcms/db-postgres'
import { mcpPlugin } from '@payloadcms/plugin-mcp'
import { ipalKit } from '@intecion/ipal-kit'
import { lexicalEditor } from '@payloadcms/richtext-lexical'
import path from 'path'
import { buildConfig } from 'payload'
import { fileURLToPath } from 'url'
import sharp from 'sharp'
import { Users } from './collections/Users'
import { Media } from './collections/Media'
import { Pages } from './collections/Pages'
import { Company } from './globals/Company'
import { i18n } from './i18n.config'
const filename = fileURLToPath(import.meta.url)
const dirname = path.dirname(filename)
export default buildConfig({
admin: {
user: Users.slug,
importMap: {
baseDir: path.resolve(dirname),
},
},
collections: [Users, Media, Pages],
globals: [Company],
editor: lexicalEditor(),
secret: process.env.PAYLOAD_SECRET || '',
typescript: {
outputFile: path.resolve(dirname, 'payload-types.ts'),
},
db: postgresAdapter({
pool: {
connectionString: process.env.DATABASE_URL || '',
},
}),
sharp,
localization: {
locales: i18n.locales.map(l => l.code),
fallback: true,
defaultLocale: i18n.defaultLocale,
},
plugins: [mcpPlugin({}), ipalKit({ i18n })],
})