3b3efafcc8
- Anasayfa, Hizmetler, Projeler, Hakkımızda, İletişim sayfaları - Header/Footer, Hero, ServicesGrid, ProjectsGrid, ContactForm bileşenleri - Appwrite TablesDB entegrasyonu (services, projects, contact_messages) - Server Action ile iletişim formu (submitContact) - Brand palette: navy #0F2C5C + sky #4DA3C7 - kovakyazilim.com'dan alınan logo public/logo.png
24 lines
686 B
TypeScript
24 lines
686 B
TypeScript
import "server-only";
|
|
import { Client, TablesDB } from "node-appwrite";
|
|
|
|
const endpoint = process.env.NEXT_PUBLIC_APPWRITE_ENDPOINT!;
|
|
const projectId = process.env.NEXT_PUBLIC_APPWRITE_PROJECT_ID!;
|
|
const apiKey = process.env.APPWRITE_API_KEY;
|
|
|
|
export const DATABASE_ID = process.env.NEXT_PUBLIC_APPWRITE_DATABASE_ID!;
|
|
|
|
export const TABLES = {
|
|
contactMessages: "contact_messages",
|
|
services: "services",
|
|
projects: "projects",
|
|
} as const;
|
|
|
|
function buildClient() {
|
|
const c = new Client().setEndpoint(endpoint).setProject(projectId);
|
|
if (apiKey) c.setKey(apiKey);
|
|
return c;
|
|
}
|
|
|
|
export const serverClient = buildClient();
|
|
export const serverTablesDB = new TablesDB(serverClient);
|