{article.title}
{article.excerpt}
Read Article โimport { supabase } from "@/lib/supabase";
import ScrollReveal from "@/components/ScrollReveal";
import Link from "next/link";
export default async function Home() {
const recaptchaSiteKey = process.env.RECAPTCHA_SITE_KEY || "";
// Check if Supabase is actually configured
const isDummy = (process.env.NEXT_PUBLIC_SUPABASE_URL || 'https://dummy.supabase.co') === 'https://dummy.supabase.co';
let settingsRows = null;
let techStackRows = null;
let projectRows = null;
let certRows = null;
let articleRows = null;
if (!isDummy) {
// Fetch Settings
const resSettings = await supabase.from('settings').select('*').eq('id', 1).single();
settingsRows = resSettings.data;
// Fetch Tech Stack
const resTech = await supabase.from('techstack').select('tech_name').order('id', { ascending: true });
techStackRows = resTech.data;
// Fetch Projects (Limit 3)
const resProj = await supabase.from('projects').select('*').order('id', { ascending: false }).limit(3);
projectRows = resProj.data;
// Fetch Certifications (Limit 3)
const resCert = await supabase.from('certifications').select('*').order('id', { ascending: false }).limit(3);
certRows = resCert.data;
// Fetch Articles (Limit 3)
const resArt = await supabase.from('articles').select('*').order('id', { ascending: false }).limit(3);
articleRows = resArt.data;
}
const settings = settingsRows || {
about_text_1: 'I am a senior IT student majoring in Software Development. I write code to solve real-world problems.',
about_text_2: 'My primary stack includes PHP, React, Node.js, and MySQL. I enjoy database design, front-end development, and bug fixing.',
years_coding: '3+',
projects_count: '10+',
certifications_count: '6+',
tiktok_url: 'https://www.tiktok.com/@crischarlesgarcia',
facebook_url: 'https://facebook.com/kristyarls345',
instagram_url: 'https://instagram.com/crischarlesgarcia',
linkedin_url: 'https://www.linkedin.com/in/cris-charles-garcia-187415303',
github_url: 'https://github.com/ssbg04'
};
const techStack = techStackRows ? techStackRows.map(r => r.tech_name) : [];
return (
<>
{/* ===== HERO ===== */}
I am an IT student majoring in Software Development based in Laguna, Philippines. I focus on building reliable web applications.
Software Developer.
{settings.about_text_1}
{settings.about_text_2}
No tech stack found.
)}{project.des}
No projects available.
}{cert.issuer}
Issued {cert.date_issued}No certifications available.
}{article.excerpt}
Read Article โNo articles available.
}