How nomandhoni-cs/blink-eye works
Project type and purpose
• This repository contains two distinct but related applications:
• A desktop app built with Tauri (Rust + React/Vite) named “Blink Eye,” designed to remind users to take eye-care breaks.
• An accompanying Next.js/React website for marketing, documentation, blog posts, and license validation APIs.
• The desktop app’s primary use cases: configurable timers, full-screen reminders, audio control, usage tracking, licensing.
• The website’s purpose: static-and-serverless content delivery with internationalization, blog, docs, and lightweight API routes for licensing.
File structure
• Top-level directories:
• src-tauri: Rust code, Tauri config, desktop capabilities, assets, command handlers.
• src: React/TypeScript UI for the desktop; organized by components, hooks, services, contexts, lib, styles.
• website: Next.js app with pages, app directory (for new App Router), public assets, API routes, i18n, config, components.
• Key patterns:
• Desktop UI uses a component-based, hook-driven structure with context providers for global state.
• app-api folder abstracts calls to Tauri’s JS–Rust bridge (notifications, tray, shortcuts).
• Rust backend defines “commands” in src-tauri/src/main.rs that the UI invokes.
• Website uses Next.js file-system routing (SSR/SSG), serverless API endpoints (route.ts), and i18n configuration.
• Configuration files show Vite for the desktop UI, Cargo.toml for Rust, package.json for JS, tailwind.config, tsconfig, GitHub workflows for CI/CD.
README for additional insights
• The README confirms core desktop features, Tauri + Rust + Bun + Cargo development flow.
• Website setup instructions show a separate Bun-based workflow.
• Licensing model uses GPLv3 + commercial option; website contains API endpoints to validate licenses.