@php
$locale = app()->getLocale();
$isId = $locale === 'id';
$ogLocale = $isId ? 'id_ID' : 'en_US';
$ogLocaleAlt = $isId ? 'en_US' : 'id_ID';
$baseUrl = rtrim(url('/'), '/');
$cleanUrl = rtrim(url()->current(), '/');
if ($cleanUrl === '') {
$cleanUrl = $baseUrl;
}
if ($cleanUrl === $baseUrl) {
$cleanUrl = $baseUrl . '/';
}
$queryLang = request()->query('lang');
$canonicalUrl = in_array($queryLang, ['en', 'id'], true)
? $cleanUrl . '?lang=' . $queryLang
: $cleanUrl;
$hreflangEn = $cleanUrl . '?lang=en';
$hreflangId = $cleanUrl . '?lang=id';
$metaTitle = trim((string) ($seoTitle ?? $title ?? __('nav.title')));
$metaDesc = trim((string) ($seoDescription ?? __('nav.meta_desc')));
$metaKeywords = trim((string) ($seoKeywords ?? __('nav.meta_keywords')));
$metaType = (string) ($seoType ?? 'website');
$metaImage = (string) ($seoImage ?? asset('images/og-cover.png'));
$metaImageAlt = trim((string) ($seoImageAlt ?? $metaTitle));
$robotsDirective = (string) ($seoRobots ?? 'index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1');
$navSetting = $navbar ?? \App\Models\Setting::get('navbar', []);
$aboutSetting = $about ?? \App\Models\Setting::get('about', []);
$ctaSetting = $cta ?? \App\Models\Setting::get('cta', []);
$ctaEmail = (string) ($ctaSetting['email'] ?? 'cahya@example.com');
$sameAs = [];
foreach (($navSetting['socials'] ?? []) as $social) {
$sUrl = trim((string) ($social['url'] ?? ''));
if ($sUrl !== '' && $sUrl !== '#' && ! str_starts_with($sUrl, 'mailto:')) {
$sameAs[] = $sUrl;
}
}
$sameAs = array_values(array_unique($sameAs));
$knowsAbout = [];
foreach (($aboutSetting['stack']['chips'] ?? []) as $chip) {
if (! empty($chip['name'])) {
$knowsAbout[] = (string) $chip['name'];
}
}
foreach (($aboutSetting['modal']['categories'] ?? []) as $category) {
foreach (($category['items'] ?? []) as $item) {
if (! empty($item['name'])) {
$knowsAbout[] = (string) $item['name'];
}
}
}
if ($knowsAbout === []) {
$knowsAbout = [
'PHP', 'TypeScript', 'JavaScript', 'Python', 'Go (Golang)', 'Rust',
'Laravel', 'React', 'Next.js', 'Vue.js', 'Tailwind CSS', 'PostgreSQL',
'MySQL', 'Redis', 'Docker', 'Kubernetes', 'AWS', 'Google Cloud',
'Software Architecture', 'Full Stack Web Development', 'UI/UX Design Systems',
];
}
$knowsAbout = array_values(array_unique($knowsAbout));
$occupations = [];
foreach (($aboutSetting['exp']['items'] ?? []) as $expItem) {
$roleName = \App\Models\Setting::text($expItem['role'] ?? null, '');
if ($roleName !== '') {
$occupations[] = [
'@type' => 'Occupation',
'name' => $roleName,
];
}
}
$personName = (string) ($aboutSetting['name'] ?? 'Cahya Krisna');
$personDesc = \App\Models\Setting::text($aboutSetting['desc'] ?? null, __('home.about_desc'));
$graph = [
[
'@type' => 'Person',
'@id' => $baseUrl . '/#person',
'name' => $personName,
'alternateName' => ['Cahya', 'Cahya Krisna Software Engineer', 'Cahya Krisna Developer'],
'jobTitle' => 'Multi-Disciplinary Technologist & Senior Full Stack Software Engineer',
'description' => $personDesc,
'url' => $baseUrl . '/',
'image' => [
asset('images/og-cover.png'),
asset('foto.jpeg'),
asset('assets/cahya/cahya_char_full.png'),
],
'email' => 'mailto:' . $ctaEmail,
'nationality' => [
'@type' => 'Country',
'name' => 'Indonesia',
],
'knowsLanguage' => ['Indonesian', 'English'],
'knowsAbout' => $knowsAbout,
'hasOccupation' => $occupations,
'sameAs' => $sameAs,
],
[
'@type' => 'WebSite',
'@id' => $baseUrl . '/#website',
'url' => $baseUrl . '/',
'name' => 'Cahya Krisna - Portfolio & Selected Works',
'alternateName' => ['Portofolio Cahya Krisna', 'Cahya Krisna Official Website'],
'description' => $metaDesc,
'inLanguage' => ['en-US', 'id-ID'],
'author' => ['@id' => $baseUrl . '/#person'],
'publisher' => ['@id' => $baseUrl . '/#person'],
],
];
if (isset($project) && $project instanceof \App\Models\Project) {
$projectUrl = route('project.show', $project->slug);
$projectKeywords = array_values(array_unique(array_merge(
$project->tech_stack ?? [],
$project->badges ?? [],
['Cahya Krisna', $project->title]
)));
$graph[] = [
'@type' => 'WebPage',
'@id' => $projectUrl . '#webpage',
'url' => $projectUrl,
'name' => $metaTitle,
'description' => $metaDesc,
'isPartOf' => ['@id' => $baseUrl . '/#website'],
'about' => ['@id' => $baseUrl . '/#person'],
'inLanguage' => $isId ? 'id-ID' : 'en-US',
'datePublished' => optional($project->created_at)->toAtomString() ?? now()->toAtomString(),
'dateModified' => optional($project->updated_at)->toAtomString() ?? now()->toAtomString(),
];
$graph[] = [
'@type' => 'CreativeWork',
'@id' => $projectUrl . '#creativework',
'mainEntityOfPage' => ['@id' => $projectUrl . '#webpage'],
'headline' => $project->title . ' - ' . ($project->subtitle ?? ''),
'name' => $project->title,
'alternativeHeadline' => (string) ($project->subtitle ?? ''),
'description' => (string) ($project->summary ?? $metaDesc),
'text' => trim(implode("\n\n", array_filter([
$project->summary,
$project->challenge,
$project->solution,
]))),
'url' => $projectUrl,
'image' => [
$project->cover_url ?: asset('images/og-cover.png'),
route('seo.og.project', $project->slug),
],
'author' => ['@id' => $baseUrl . '/#person'],
'creator' => ['@id' => $baseUrl . '/#person'],
'publisher' => ['@id' => $baseUrl . '/#person'],
'keywords' => implode(', ', $projectKeywords),
'inLanguage' => $isId ? 'id-ID' : 'en-US',
'datePublished' => optional($project->created_at)->toAtomString() ?? now()->toAtomString(),
'dateModified' => optional($project->updated_at)->toAtomString() ?? now()->toAtomString(),
];
$graph[] =
Portfolio
/
Projects
/
Kasirku Cloud
Kasirku Cloud - Cloud POS & Real-time Multi-outlet Sync System
KASIRKU CLOUD
POINT OF SALES & INVENTORY
Project Summary
Kasirku Cloud is a modern cashier and retail management ecosystem that connects dozens of store branches into one central dashboard with uninterrupted offline transaction capability.
Challenge
Unstable internet connections in the field often halt branch cashier operations, causing long queues and inconsistent stock levels.
Solution & Technical Architecture
Designing a hybrid offline-first protocol using local IndexedDB on the client side that automatically reconciles data in both directions via WebSocket and Redis once the connection recovers.
Offline-first engine guarantees the cashier can still print receipts and process transactions while offline.
Real-time stock synchronisation across branches with a locking mechanism to prevent overselling.
Live-updated analytics reports for revenue, gross profit, and inventory turnover.
Multi-device support from Android tablets and iPads to conventional cashier PCs.
Interested in collaborating or discussing a new project?
Open to freelance work, software architecture consulting, and engineering positions.
© 2026 Cahya Krisna · Crafted with precision.