Kovak Yazılım kurumsal site — Next.js 16 + Appwrite
- 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
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
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);
|
||||
@@ -0,0 +1,16 @@
|
||||
import { Client, TablesDB } from "appwrite";
|
||||
|
||||
const endpoint = process.env.NEXT_PUBLIC_APPWRITE_ENDPOINT!;
|
||||
const projectId = process.env.NEXT_PUBLIC_APPWRITE_PROJECT_ID!;
|
||||
|
||||
export const DATABASE_ID = process.env.NEXT_PUBLIC_APPWRITE_DATABASE_ID!;
|
||||
|
||||
export const TABLES = {
|
||||
contactMessages: "contact_messages",
|
||||
services: "services",
|
||||
projects: "projects",
|
||||
} as const;
|
||||
|
||||
export const client = new Client().setEndpoint(endpoint).setProject(projectId);
|
||||
|
||||
export const tablesDB = new TablesDB(client);
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
import "server-only";
|
||||
import { Query } from "node-appwrite";
|
||||
import { serverTablesDB, DATABASE_ID, TABLES } from "@/lib/appwrite-server";
|
||||
import type { ProjectRow, ServiceRow } from "@/lib/types";
|
||||
|
||||
export async function listServices(opts?: { featured?: boolean }) {
|
||||
const queries = [Query.orderAsc("order"), Query.limit(50)];
|
||||
if (opts?.featured) queries.unshift(Query.equal("featured", true));
|
||||
try {
|
||||
const res = await serverTablesDB.listRows<ServiceRow>({
|
||||
databaseId: DATABASE_ID,
|
||||
tableId: TABLES.services,
|
||||
queries,
|
||||
});
|
||||
return res.rows;
|
||||
} catch {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
export async function listProjects(opts?: { featured?: boolean; limit?: number }) {
|
||||
const queries = [Query.orderDesc("year"), Query.limit(opts?.limit ?? 50)];
|
||||
if (opts?.featured) queries.unshift(Query.equal("featured", true));
|
||||
try {
|
||||
const res = await serverTablesDB.listRows<ProjectRow>({
|
||||
databaseId: DATABASE_ID,
|
||||
tableId: TABLES.projects,
|
||||
queries,
|
||||
});
|
||||
return res.rows;
|
||||
} catch {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
export const siteConfig = {
|
||||
name: "Kovak Yazılım",
|
||||
tagline:
|
||||
"İzmit ve Kocaeli'nde yazılım geliştirme, web tasarım ve CRM çözümleri sunan teknoloji ajansı.",
|
||||
url: "https://kovakyazilim.com",
|
||||
contact: {
|
||||
phone: "+90 551 590 29 35",
|
||||
phoneRaw: "+905515902935",
|
||||
email: "info@kovakyazilim.com",
|
||||
address:
|
||||
"Sanayi Mah. 13. CD. İzmit Sanayi Sitesi No:306 Blok No:17, Kocaeli",
|
||||
},
|
||||
social: {
|
||||
linkedin: "#",
|
||||
instagram: "#",
|
||||
twitter: "#",
|
||||
},
|
||||
fallbackServices: [
|
||||
{ slug: "web-tasarim", title: "Web Tasarım", icon: "Globe", description: "Marka kimliğinizi yansıtan, hızlı ve SEO odaklı kurumsal web siteleri." },
|
||||
{ slug: "e-ticaret", title: "E-Ticaret Sitesi", icon: "ShoppingCart", description: "Dönüşüm odaklı, ölçeklenebilir e-ticaret altyapıları." },
|
||||
{ slug: "mobil-uygulama", title: "Mobil Uygulama", icon: "Smartphone", description: "iOS ve Android için native performansta cross-platform uygulamalar." },
|
||||
{ slug: "yazilim-gelistirme", title: "Yazılım Geliştirme", icon: "Code2", description: "İhtiyaca özel web ve masaüstü yazılımları, API entegrasyonları." },
|
||||
{ slug: "crm-sistemleri", title: "CRM Sistemleri", icon: "Users", description: "Satış ve operasyon süreçlerinizi tek panelde toplayan CRM çözümleri." },
|
||||
{ slug: "seo-dijital-pazarlama", title: "SEO & Dijital Pazarlama", icon: "TrendingUp", description: "Organik trafiği ve dönüşümü büyüten teknik SEO ve içerik stratejileri." },
|
||||
{ slug: "sosyal-medya-yonetimi", title: "Sosyal Medya Yönetimi", icon: "Share2", description: "Marka diliyle uyumlu içerik üretimi ve topluluk yönetimi." },
|
||||
{ slug: "dijital-reklam", title: "Dijital Reklam", icon: "Megaphone", description: "Google Ads ve Meta Ads kampanyalarıyla hedefli erişim ve ölçülebilir sonuçlar." },
|
||||
],
|
||||
} as const;
|
||||
@@ -0,0 +1,30 @@
|
||||
import type { Models } from "appwrite";
|
||||
|
||||
export interface ServiceRow extends Models.Row {
|
||||
slug: string;
|
||||
title: string;
|
||||
description: string;
|
||||
icon?: string | null;
|
||||
order?: number | null;
|
||||
featured?: boolean | null;
|
||||
}
|
||||
|
||||
export interface ProjectRow extends Models.Row {
|
||||
slug: string;
|
||||
title: string;
|
||||
description: string;
|
||||
image_url?: string | null;
|
||||
live_url?: string | null;
|
||||
category?: string | null;
|
||||
technologies?: string[] | null;
|
||||
year?: number | null;
|
||||
featured?: boolean | null;
|
||||
}
|
||||
|
||||
export interface ContactMessageInput {
|
||||
name: string;
|
||||
email: string;
|
||||
phone?: string;
|
||||
subject?: string;
|
||||
message: string;
|
||||
}
|
||||
Reference in New Issue
Block a user