ποΈ Chronicle Archive Vault
ββββββββββ ββββββββββ βββββββ ββββ ββββββ ββββββββββ ββββββββ βββ βββ ββββββ βββ ββββββ βββββββββ βββββββββββ βββββββββββββββββββββββββ βββββββββββββββββ ββββββββ βββ ββββββββββββββ ββββββ βββββββββ βββ βββββββββββββββββββ βββββββββ βββββββββ βββ ββββββ βββ ββββββββββββββ ββββββ βββ βββ βββββββββββββββββββ βββββββββββββββββββ βββ ββββββ ββββ βββββββββββββββ ββββββ βββ βββββββββββ ββββββ βββββββββββββββ βββββββββββββββββββββββββββββββββ βββββββ βββ βββββββββββββββββββββββ ββββββββββ ββββββ βββ βββββββ βββ ββββββββ βββββββββββββββββββββββ βββββ βββ βββ ββββββββ βββββββββββ
A premium client-offline database vault for calendar schedules, tasks, Pomodoro focus blocks, productivity trends, and notes.
π Developer Story
Why We Built It
In the modern landscape of software development, user data is increasingly treated as a telemetry commodity. Everyday productivity utilitiesβplanners, note-taking apps, and calendarsβsilently sync local inputs to remote cloud databases. This architecture introduces latency, exposes personal data to network breaches, and compromises user privacy.
We built Chronicle Archive Vault as an alternative to this telemetry-heavy model. Our primary goal was to engineering a zero-telemetry, offline-first digital scheduler where the user retains 100% control of their database. By utilizing browser isolation scopes, Chronicle runs completely sandbox-contained, eliminating server latency and data transmission risks.
Who We Are
Chronicle is designed and engineered by Arjun and Godfrey. We are developer advocates who believe that high-performance web applications should prioritize both local-first architecture and rich, premium aesthetics. Together, we crafted Chronicle to combine high responsiveness with structural simplicity.
Challenges Faced
- Dynamic Sandbox Synchronization: Designing an offline multi-profile system required storing data across different namespaces. Managing local reactive states that seamlessly update
localStoragepaths upon calendar edits without creating infinite render loops was a key challenge. - PWA Mobile Compatibility: Designing the app for mobile browser installation required conforming to strict Progressive Web App criteria. We resolved this by building a custom Service Worker from scratch, compiling standard web app manifests, and ensuring responsive touch targets.
- Multi-Locale Translation Grids: Chronicle supports six different languages. Building the localized JSON matrix in TypeScript and ensuring layout items adjusted dynamically without breaking grid cells was a significant design challenge.
How We Built It
We structured Chronicle with a React 19 and TypeScript core, utilizing Vite for fast, hot-reloading compilation. We avoided heavy backend abstractions, choosing instead to handle data mutations purely in-memory via React context wrappers. For styling, we utilized Tailwind CSS v4 to map theme colors dynamically to CSS custom properties. Micro-animations are managed by Motion, and vector icons are rendered via Lucide React.
Security & UX
Chronicle isolates data by storing it strictly within the client's browser sandbox. The application has no external fetch APIs, no telemetry hooks, and zero network calls. Security is maintained by data isolation. From a UX standpoint, we prioritized glassmorphism, horizontal touch grids, and interactive modal dialogs to provide a premium feel on mobile and desktop viewports.
Key Learnings
- SVG Portability: We learned that using inline vector SVG assets for favicons is highly reliable. It eliminates external HTTP file requests and scales dynamically.
- Client-Side Processing is Powerful: Modern client-side engines can handle complex data indexing, streak calculations, and search matching instantly without needing a server.
- CSS Custom Properties: Binding CSS variables directly to theme states enables seamless color switching without compiling new utility files.
Future Roadmap
- Encrypted Local Exports: Implementing local encryption (AES-256) for JSON database backups.
- Biometric Lock Integrations: Adding face/touch ID validation options via WebAuthn APIs for local browser authentication.
- Custom ICS Syncing: Developing a local parser to import and export
.icsfiles without network connections.
π Developer Message
"Curiosity is the engine of progress. We built Chronicle because we wanted a calendar that belongs to usβfully offline, fully local, and beautifully responsive. We hope this tool provides a private, telemetry-free workspace to organize your days and thoughts. Thank you for using Chronicle!"
β Arjun | Godfrey
ποΈ Table of Contents
- Developer Story
- Project Specifications
- Architecture & Workflow
- Directory Structure
- Feature Matrix
- Data Schema & Storage Mechanics
- PWA & Offline Registration
- Installation & Deployment
- Component Walkthrough
- Configuration & Environment
- Troubleshooting & Diagnostics
- Security & Sandbox Isolation
- Testing Documentation
- Frequently Asked Questions (FAQ)
- Contributors & License
π οΈ Project Specifications
| Specification | Details |
|---|---|
| Project Name | Chronicle Archive Vault |
| Project Type | Client-Offline Progressive Web Application (PWA) |
| Industry Domain | Personal Productivity & Personal Information Management (PIM) |
| Target Audience | Privacy-focused professionals, developers, and offline-first advocates |
| Primary Purpose | Isolated client-side scheduler, timer logs, and notes vaulting |
| Runtime Environment | Web Browser (Chromium, WebKit, Gecko engines) |
Core Technology Stack
- Frontend Core: React 19.0.1 (Declarative UI rendering)
- Compiler/Bundler: Vite 6.2.3 (Ultra-fast build pipeline)
- Programming Language: TypeScript 5.8.2 (Type-safe compilation)
- Styling Utility: Tailwind CSS v4.1.14 (Dynamic properties mapping)
- Animations: Motion 12.23.24 (Spring-physics micro-interactions)
- Vector Icons: Lucide React 0.546.0 (SVG vector strokes)
π Architecture & Workflow
Overall Sandbox System Architecture
The application runs entirely within the browser's context. A single React root renders the application, which is wrapped by a ProfileProvider context. The context acts as the local transaction processor, managing in-memory states and writing directly to the browser's localStorage sandbox.
LANG: mermaidgraph TD User([User Interaction]) <--> UI[React UI Components] UI <--> Context[ProfileContext State Engine] Context <--> Storage[(Browser LocalStorage Sandbox)] subgraph Browser Context Context Storage end subgraph Offline Service Worker SW[sw.js Caching Handler] <--> Cache[(Cache Storage API)] end UI <--> SW
App State Lifecycle & Multi-Profile Sandboxing
When a user launches Chronicle, the system initializes by executing the profile checks outlined in the sequence diagram below. If no profile registry key is discovered, the onboarding UI mounts, forcing the creation of a new database workspace.
LANG: mermaidsequenceDiagram autonumber actor User as User Browser participant App as App.tsx participant Context as ProfileContext.tsx participant Store as Browser LocalStorage User->>App: Load Application page App->>Context: Request Active Profile State Context->>Store: Get 'calendar_profiles_registry' alt Registry is Empty (First Load) Store-->>Context: Return Empty Array Context-->>App: Mount Onboarding View User->>App: Enter Profile Name, Avatar & Color Accent App->>Context: Call createProfile() Context->>Store: Write Profile Data & Create initial log Context->>Store: Create 'calendar_items_profile_[UUID]' Context-->>App: Set activeProfileId else Profiles Exist Store-->>Context: Return Profile Registry Array Context->>Store: Get 'calendar_active_profile_id' Store-->>Context: Return UUID Context->>Store: Load profile items, archives, and logs Store-->>Context: Return profile datasets Context-->>App: Initialize Workspace View end App-->>User: Render Main Interface
Pomodoro Focus Timer Logging Sequence
The Focus Mode page features an interactive Pomodoro timer. The diagram below illustrates how users log completed focus sessions directly to the active calendar date.
LANG: mermaidsequenceDiagram autonumber actor User as Active User participant FocusView as FocusView.tsx participant Context as ProfileContext.tsx participant Store as LocalStorage Sandbox User->>FocusView: Start focus session timer Note over FocusView: Timer ticks down to 0:00 (or user pauses/stops) User->>FocusView: Click "Log Session" FocusView->>Context: Call addItem(type: 'note', title: 'Focus Session') Context->>Context: Generate unique item UUID Context->>Store: Write updated items stream to localStorage Context->>Context: Call logActivity('Added note: Focus Session') Context->>Store: Write updated activity log stream to localStorage Context-->>FocusView: Confirm Logging Action FocusView-->>User: Display 'Session Logged' checkmark
π Directory Structure
Below is the directory layout of Chronicle Vault, illustrating the modular code organization.
Calender/ βββ .git/ # Version control database βββ node_modules/ # Project dependencies βββ public/ # Static Assets (served at root) β βββ favicon.svg # Standalone vector icon file β βββ manifest.json # Web App Manifest configuration β βββ sw.js # Service Worker caching handler βββ src/ # Source files β βββ assets/ # Local styling vectors β βββ components/ # UI components and page views β β βββ ActivityLogsView.tsx # Chronological log viewer β β βββ ArchiveView.tsx # Trash bin and recovery view β β βββ CalendarView.tsx # Calendar view and stopwatch log widget β β βββ DashboardView.tsx # High-level calendar dashboard β β βββ FloatingDock.tsx # Navigation dock β β βββ FocusView.tsx # Pomodoro timer and scratchpad view β β βββ HelpView.tsx # Help guide and FAQ panels β β βββ ItemForm.tsx # Note, task, and reminder input form β β βββ ItemList.tsx # List viewer and search matches stream β β βββ LandingView.tsx # Welcome screen, story, and tech stack β β βββ ProfilesView.tsx # Switcher, creation, and JSON backup tool β β βββ SettingsView.tsx # App settings and PWA install buttons β βββ context/ # React contexts β β βββ ProfileContext.tsx # State engine, registry, and data syncing β βββ data/ # Mock and sample database arrays β β βββ initialData.ts # Default calendar samples β βββ utils/ # Utility helpers β β βββ dateUtils.ts # Calendar grid matrix calculators β β βββ i18n.ts # Six-locale translation dictionary β βββ App.tsx # Master coordinator and onboarding view β βββ index.css # Styling configurations β βββ main.tsx # Render mount point β βββ types.ts # Shared TypeScript schemas βββ index.html # Index page structure βββ LICENSE # Apache 2.0 license file βββ package.json # Package configurations βββ tsconfig.json # TypeScript compilation rules βββ vite.config.ts # Vite server and compiler configurations
π Feature Matrix
Chronicle is organized into 10 distinct pages, managed by the Floating Dock navigation system:
| View | Primary Purpose | Key Interactive Elements |
|---|---|---|
| Landing | Welcome page | Shows the active profile, developer story, tech stack details, and entry triggers. |
| Dashboard | Metrics overview | Displays task completion progress gauges, upcoming lists, and search queries. |
| Calendar | Visual schedule grid | Toggles month, week, day, and list grids; includes stopwatch logging. |
| Trends | Productivity trends | Tracks streaks (consecutive days of completed tasks), ratios, and weekday performance. |
| Focus Mode | Pomodoro timer | Ticks down customizable work blocks; includes a quick notepad and session logging. |
| Archive | Trash recovery bin | Safe bin for deleted calendar items, offering individual restores or permanent purging. |
| History | Activity logs timeline | Displays chronological timeline logs of database modifications. |
| Profiles | Account management | Switches profiles, registers profiles, and imports/exports JSON data backups. |
| Settings | Preferences configuration | Configures theme accents, language settings, clock types (12h/24h), and first day of week. |
| Help Guide | FAQs and guide | Editorial FAQs explaining local sandboxing, storage safety, and project credits. |
πΎ Data Schema & Storage Mechanics
Sandbox Isolation Strategy
The workspace partitions database records by prefixing localStorage keys with the active profile's UUID (profileId). This design isolates data and prevents cross-profile database contamination.
The keys managed by Chronicle include:
calendar_profiles_registry: A global index containing profile details (UUID, name, avatar, and settings configuration).calendar_active_profile_id: Stored identifier of the currently active profile UUID.calendar_items_profile_${profileId}: Array of active tasks, notes, and reminders for the specified profile.calendar_archived_profile_${profileId}: Array of archived/deleted items for the specified profile.calendar_logs_profile_${profileId}: Chronological array of audit logs for the specified profile.
Calendar Item Schema (types.ts)
Each schedule item conforms to the strict CalendarItem interface:
LANG: typescriptexport interface CalendarItem { id: string; // Unique database key (UUID) title: string; // User input title description?: string; // Additional notes/details date: string; // Legacy date fallback reference dateStr: string; // Formatted date string (YYYY-MM-DD) time?: string; // Formatted schedule time (HH:MM) completed: boolean; // Task completion boolean type: 'task' | 'note' | 'reminder'; // Category type tag?: 'slate' | 'indigo' | 'emerald' | 'rose' | 'amber' | 'violet' | 'ocean' | 'terracotta'; // Color tag createdAt: number; // Epoch creation timestamp (milliseconds) }
Audit Log Schema (ProfileContext.tsx)
Audit logs track profile events and user actions using this layout:
LANG: typescriptexport interface ActivityLog { id: string; // Unique log entry key timestamp: number; // Event timestamp (milliseconds) action: string; // Detailed description of the action }
π PWA & Offline Registration
To provide a native, standalone experience, Chronicle is built as a Progressive Web App (PWA) that complies with standard lighthouse specifications.
1. The Web App Manifest (public/manifest.json)
The manifest configures the app's standalone appearance and provides high-definition launcher icons:
LANG: json{ "short_name": "Chronicle", "name": "Chronicle Archive Vault", "description": "A premium client-offline calendar, tasks, & notes database.", "icons": [ { "src": "favicon.svg", "type": "image/svg+xml", "sizes": "any", "purpose": "any" }, { "src": "favicon.svg", "type": "image/svg+xml", "sizes": "192x192", "purpose": "any" }, { "src": "favicon.svg", "type": "image/svg+xml", "sizes": "512x512", "purpose": "any" } ], "start_url": "/", "background_color": "#ffffff", "theme_color": "#4f46e5", "display": "standalone", "orientation": "portrait" }
2. The Service Worker (public/sw.js)
The custom service worker caches core assets at registration and intercepts fetch requests to ensure offline availability:
LANG: javascriptconst CACHE_NAME = 'chronicle-cache-v1'; const ASSETS = [ '/', '/index.html', '/manifest.json', '/favicon.svg' ]; self.addEventListener('install', (e) => { e.waitUntil( caches.open(CACHE_NAME).then((cache) => { return cache.addAll(ASSETS); }) ); self.skipWaiting(); }); self.addEventListener('activate', (e) => { e.waitUntil( caches.keys().then((keys) => { return Promise.all( keys.map((key) => { if (key !== CACHE_NAME) { return caches.delete(key); } }) ); }) ); self.clients.claim(); }); self.addEventListener('fetch', (e) => { e.respondWith( caches.match(e.request).then((cachedResponse) => { if (cachedResponse) { return cachedResponse; } return fetch(e.request).then((networkResponse) => { if (networkResponse && networkResponse.status === 200 && e.request.method === 'GET') { const responseToCache = networkResponse.clone(); caches.open(CACHE_NAME).then((cache) => { cache.put(e.request, responseToCache); }); } return networkResponse; }); }) ); });
π Installation & Deployment
Follow these steps to run the development environment or compile the production bundle.
Prerequisites
1. Clone the Repository
LANG: bashgit clone https://github.com/TheOrionGD/Calender.git cd Calender
2. Install Project Dependencies
LANG: bashnpm install
3. Start the Local Development Server
LANG: bashnpm run dev
The server will start, exposing the application on http://localhost:3000.
4. Build for Production
To compile and bundle the codebase for static hosting:
LANG: bashnpm run build
This output is saved to the dist/ directory, which can be deployed to static hosts like Netlify, Vercel, or GitHub Pages.
5. Preview the Production Build Locally
LANG: bashnpm run preview
π§© Component Walkthrough
1. State Engine (src/context/ProfileContext.tsx)
This context wraps the application state and manages multi-profile sandboxing:
LANG: typescript// Example of multi-profile load orchestration hook inside context useEffect(() => { if (!isLoaded) return; if (!activeProfileId) { setItems([]); setArchivedItems([]); setActivityLogs([]); return; } const itemsKey = `calendar_items_profile_${activeProfileId}`; const archivedKey = `calendar_archived_profile_${activeProfileId}`; const logsKey = `calendar_logs_profile_${activeProfileId}`; // Read item states try { const storedItems = localStorage.getItem(itemsKey); setItems(storedItems ? JSON.parse(storedItems) : []); } catch (e) { console.error("Failed to parse local profile items", e); } // Read archive states try { const storedArchived = localStorage.getItem(archivedKey); setArchivedItems(storedArchived ? JSON.parse(storedArchived) : []); } catch (e) { console.error("Failed to parse local profile archives", e); } // Read log states try { const storedLogs = localStorage.getItem(logsKey); setActivityLogs(storedLogs ? JSON.parse(storedLogs) : []); } catch (e) { console.error("Failed to parse local profile logs", e); } }, [activeProfileId, isLoaded]);
2. Settings PWA Installer Widget (src/components/SettingsView.tsx)
The settings panel features an active app checker and install initiator button:
LANG: typescriptconst [deferredPrompt, setDeferredPrompt] = useState<any>(null); const [isInstallable, setIsInstallable] = useState(false); const [isStandalone, setIsStandalone] = useState(false); const [showPwaInstructions, setShowPwaInstructions] = useState(false); useEffect(() => { // Check if app is already running in standalone mode if (window.matchMedia('(display-mode: standalone)').matches || (window.navigator as any).standalone) { setIsStandalone(true); } const handleBeforeInstall = (e: Event) => { e.preventDefault(); setDeferredPrompt(e); setIsInstallable(true); }; window.addEventListener('beforeinstallprompt', handleBeforeInstall); return () => window.removeEventListener('beforeinstallprompt', handleBeforeInstall); }, []); const handleInstallApp = async () => { if (deferredPrompt) { deferredPrompt.prompt(); const { outcome } = await deferredPrompt.userChoice; if (outcome === 'accepted') { setIsInstallable(false); setDeferredPrompt(null); } } else { // Launch mobile installation guide modal setShowPwaInstructions(true); } };
βοΈ Configuration & Environment
Vite serves files from the public directory at the root (/).
Vite Port Configuration (package.json)
The dev script exposes the local server across all network interfaces so it can be previewed on mobile devices:
LANG: json"scripts": { "dev": "vite --port=3000 --host=0.0.0.0", "build": "vite build", "preview": "vite preview", "lint": "tsc --noEmit" }
Dynamic Accent Styling (src/context/ProfileContext.tsx)
Chronicle sets styling accents dynamically by mapping active profiles to custom CSS properties:
LANG: typescriptuseEffect(() => { if (!isLoaded) return; const active = profiles.find(p => p.id === activeProfileId); const colorTheme = active ? active.accentColor : 'indigo'; const accentData = ACCENTS[colorTheme] || ACCENTS.indigo; // Set properties on document root const root = document.documentElement; root.style.setProperty('--color-accent-val', accentData.primary); root.style.setProperty('--color-accent-hover-val', accentData.hover); root.style.setProperty('--color-accent-muted-val', accentData.muted); root.style.setProperty('--color-accent-light-val', accentData.light); }, [activeProfileId, profiles, isLoaded]);
π Troubleshooting & Diagnostics
Below are steps to resolve common local development issues.
1. The PWA "Install Application" Button Only Opens Instructions
- Reason: The browser has not fired the
beforeinstallpromptevent yet. - Diagnostics:
- PWA installation requires the app to be served over
localhostor a securehttps://connection. - Verify that the Service Worker is registered successfully in Chrome Developer Tools (
Application->Service Workers). - Clear site data and refresh to retrigger registration.
- PWA installation requires the app to be served over
2. Changes in index.css Do Not Rebuild
- Reason: Vite utilizes HMR (Hot Module Replacement) but might fail to hot-swap style changes if there are CSS syntax errors.
- Diagnostics:
- Run the linter compiler to verify types:
npm run lint. - Restart the development command:
npm run dev.
- Run the linter compiler to verify types:
3. Backup JSON File Fails to Import
- Reason: The backup JSON schema does not conform to the expected format.
- Diagnostics:
- Export a sample database file to examine the structure.
- Verify that the UUIDs and schema layout match the specifications.
π Security & Sandbox Isolation
Chronicle is built to prioritize user privacy and data security.
- No External Network Requests: The application features no fetch calls, analytics tracking, or telemetry scripts.
- LocalStorage Sandboxing: All inputs are sandboxed to the active profile inside the client's browser local storage.
- PWA Standalone Shell: Running Chronicle in standalone mode encapsulates the browser context, protecting it from cross-site scripting (XSS) risks.
- Offline Resilience: The service worker caching is structured strictly for static assets. Your calendar database is never cached in public caching stores, remaining protected inside standard local storage blocks.
π§ͺ Testing Documentation
Static typing and build processes are tested before commits.
Static TypeScript Validation
LANG: bashnpm run lint
Result: Evaluates all typings and files for compiler errors.
Production Bundling Test
LANG: bashnpm run build
Result: Builds static files into /dist to verify bundling succeeds.
π¬ Frequently Asked Questions (FAQ)
Q1: Where is my database stored?
Your database is stored entirely inside your browser's local storage. None of your data is ever uploaded to a server.
Q2: How do I transfer my data to a new device?
Go to the Profiles tab, click Export All Data (JSON) to download your database file, and then import it on your new device.
Q3: What happens if I clear my browser cookies or history?
Clearing site storage will reset your local storage databases. We recommend regular JSON database exports to protect your data.
Q4: Does the stopwatch log timed sessions directly?
Yes! Swapping to the stopwatch and clicking save will log the session's duration as a Task or Note on the active calendar date.
π₯ Contributors & License
- Arjun β Core developer, UX designer, and i18n localization coordinator.
- Godfrey β Systems architecture design, PWA setup, and state synchronization.
License
This project is licensed under the Apache License, Version 2.0 (SPDX-License-Identifier: Apache-2.0). See the LICENSE file for details.
Created with curiosity by Arjun | Godfrey.