project setup with core files including configuration, package management, and basic structure. Added .gitignore, README, and various TypeScript types for CMS components. Implemented initial components and layouts for the application.

This commit is contained in:
Peter Meier
2025-12-13 23:26:13 +01:00
parent ea288a5bbc
commit b1a556dc6d
167 changed files with 19057 additions and 131 deletions

View File

@@ -0,0 +1,23 @@
import { MockdataAdapter } from "./Mock/mockdata";
import type { DataAdapter } from "./interface";
/**
* Adapter-Konfiguration
* Bestimmt welcher Adapter basierend auf Environment-Variablen verwendet wird
*/
export function createAdapter(): DataAdapter {
const adapterType = process.env.DATA_ADAPTER || "mock";
switch (adapterType) {
case "mock":
return new MockdataAdapter();
// Weitere Adapter können hier hinzugefügt werden:
// case 'contentful':
// return new ContentfulAdapter(process.env.CONTENTFUL_SPACE_ID!, process.env.CONTENTFUL_ACCESS_TOKEN!);
default:
console.warn(
`Unbekannter Adapter-Typ: ${adapterType}. Verwende Mock-Adapter.`
);
return new MockdataAdapter();
}
}