Arxec Systems
Back to Archive
Case Study · 2024FeaturedLIVE

God's Own Guide

God's Own Guide

Offline-capable Kerala travel guide and itinerary builder built with Astro, React islands, Leaflet, and Supabase.

God's Own Guide

Destination guide and trip planner covering all 14 districts of Kerala. Built with Astro for fast static delivery and hydrated React islands for interactive Leaflet maps, drag-and-drop itinerary ordering (@dnd-kit), PDF trip export (html2pdf.js), and service-worker offline caching via Vite PWA.

Problem Visual
The Problem

Unreliable connectivity on hill & backwater routes

Travelers exploring high-range hill stations and backwater routes in Kerala frequently lose mobile data connectivity, making heavy client-rendered travel sites and online-only maps unreliable mid-trip.

Solution Visual
The Solution

Astro static speed + offline PWA itinerary planner

Combined Astro static generation with selective React islands, Vite PWA service-worker caching, and Supabase for saved user itineraries and destination reviews. Added @dnd-kit day-by-day trip sorting and client-side PDF export so travelers can carry offline copies of their routes.

Feature Visual
Implementation

Interactive Leaflet Maps & Offline PWA

Real-time Data Sync
PWA Offline Mode
AI-Powered Itineraries
Interactive Maps

System Core · Role-Based Access Control with Supabase

import React, { useEffect, useState } from 'react';
import { supabase } from '../../lib/supabase';

const AdminGuard = ({ children }) => {
    const [authorized, setAuthorized] = useState(false);

    useEffect(() => {
        const checkAuth = async () => {
            const { data: { session } } = await supabase.auth.getSession();
            if (!session) {
                window.location.href = '/'; // Redirect unauthenticated users
                return;
            }

            const { data: profile } = await supabase
                .from('profiles')
                .select('role')
                .eq('id', session.user.id)
                .single();

            if (profile?.role === 'admin') {
                setAuthorized(true);
            } else {
                window.location.href = '/'; // Redirect non-admin users
            }
        };
        checkAuth();
    }, []);

    if (!authorized) return null; // Or show a loading/unauthorized message
    return <>{children}</>;
};

export default AdminGuard;
typescript
Next Project

Next Case Study

Slingd