How codeaashu/enoughaashuu works
1. Repository shape
- This is a Next.js + React + TypeScript monorepo-style app, but it really contains two products:
- the main “Enough Aashuu” utility site
- a self-contained IconLogo editor application under /iconlogo
- The app router in src/app provides the public site shell, while src/iconlogo contains a much richer client-side subsystem with its own routing, state, and server hooks.
2. Main site shell
- src/app/layout.tsx, globals.css, TopNavbar, Footer, and the route pages under src/app/* define the shared site frame.
- Most top-level pages are simple route entry points for marketing/content: About, Contact, Privacy, Terms, Blog, and feature landing pages.
- SEO/PWA metadata is centralized through src/app/manifest.ts, robots.ts, sitemap.ts, and src/lib/brand.ts.
3. Main product tools are split by processing model
- The repo’s tools fall into two architectural groups:
- browser-local processing: image watermark removal, background removal, QR generation
- server-assisted workflows: Sora extraction and AI-image detection
- That split is important for diagramming because it defines whether the browser handles the media directly or sends requests to route handlers.
4. Client-side media workflows
- BackgroundRemover, GeminiRemover, QrCodeGenerator, and AiImageDetector are the key tool components mounted by their route pages.
- The background remover is explicitly designed to run locally and has cross-origin isolation requirements via next.config.ts headers, which suggests a browser model/WASM-style pipeline rather than a normal API call.
- The watermark remover uses shared logic in src/lib/watermark.ts, emphasizing in-browser pixel processing rather than a backend dependency.
5. Server-side API routes
- src/app/api/detect-ai-image, extract-sora, and remove-gemini are the main Next route handlers for backend-assisted processing.
- extract-sora handles link parsing/fetching for Sora shared URLs and returns clean MP4/prompt data.
- detect-ai-image acts as an aggregation point for the AI detector workflow, likely combining external signals and local heuristics.
- remove-gemini provides a dedicated server endpoint for the watermark-removal tool, even though the overall product emphasizes local-first processing.
6. AI detector architecture
- The AI detector is an ensemble pipeline, not a single model call.
- It combines external classification/inference services plus local metadata analysis, then applies weighted voting and thresholding before showing a final result and JSON export.
- This means the browser UI is only the presentation layer; the decision logic is split between route handler, upstream providers, and local scoring.
7. QR generator architecture
- The QR tool is fully client-side and supports multiple payload types: URL/text, Wi‑Fi, vCard, event, phone, SMS, and geo.
- The UI handles styling, logo upload, randomization, and export to PNG/JPEG/SVG.
- Because export and visual styling are local, it behaves like a self-contained graphics editor rather than an API-backed service.
8. IconLogo is a full editor subsystem
- src/iconlogo is organized like an application within the application:
- features/ for editor, landing, picker, collections, dock, share, etc.
- domain/ for icon/logo/share types, validators, fonts, and randomization
- commands/ for user actions like load, update, undo/redo, export, and collection management
- store/ for persistent client state
- infra/ for canvas rendering, clipboard, file download, Iconify access, and KV interaction
- The route layer in src/iconlogo/routes and generated routeTree.gen.ts indicates a dedicated client-side router, not just simple Next pages.
9. IconLogo data flow
- User actions in the editor flow through commands into the logo/collection stores.
- The store drives query hooks such as use-logo-state, use-logo-svg, and collection/search hooks.
- Rendering/export is handled through the canvas and download infrastructure, while icon search pulls from the Iconify client.
- This is a classic editor pipeline: UI event → command/state mutation → render/export infrastructure.
10. IconLogo sharing and persistence
- Sharing is backed by src/iconlogo/server/share.create.ts and share.get.ts, with route handlers under src/app/api/iconlogo/share.
- The share subsystem appears to persist share payloads in a KV-like store (src/iconlogo/infra/kv/share-kv.ts and src/lib/iconlogo-share-store.ts).
- That makes share links a server-backed feature, distinct from the otherwise client-heavy editor.
11. IconLogo export and clipboard pipeline
- Export is modularized into PNG, SVG, ICO, app-icon bundles, and copy-to-clipboard variants.
- The editor can push assets to the clipboard, download them as files, or package them for platform-specific icon use.
- This boundary matters because rendering/export is not coupled to the UI; it’s a separate infra layer.
12. Shared infrastructure and state
- Cross-cutting client state lives in lightweight stores and query hooks rather than a single global framework.
- The repo also uses TanStack Query integration in the IconLogo app for async server state/devtools support.
- Browser-only helpers like localStorage prompts, keyboard shortcuts, and analytics live alongside these UI flows.
13. External dependencies that affect architecture
- The main external service dependencies are:
- Sightengine and Hugging Face for AI-image detection
- Iconify for icon search in the logo editor
- a KV store for share persistence
- These services shape the trust boundaries: the editor remains mostly local, but search/share/detection depend on networked services.
14. Deployment/runtime boundaries
- This repo is architected as a hybrid Next app: static/content routes, client-heavy browser tools, and a few server route handlers.
- public/sw.js and the install prompt indicate PWA-like behavior, but the service worker is intentionally lightweight and not the core of the product.
- For an architecture diagram, the main boundaries are: browser UI, server route handlers, external APIs, and the separate IconLogo application subsystem.
Main entry points: page.tsx Content pages · brand.ts Shared lib · layout.tsx App shell · EditorPage.tsx Editor UI
Components 21
Main site
Public App Router shell and content pages.
- App shell · Root layout, shared navigation/footer, metadata, and site-wide pages.
src/app/layout.tsx - Content pages · About, contact, policy, blog, and feature landing pages.
src/app/page.tsx - SEO runtime · Manifest, robots, sitemap, and brand metadata for the site.
src/app/manifest.ts
Browser tools
Client-side media and QR workflows that run mostly in the browser.
- Background remover · Client-side background removal workflow with browser processing requirements.
src/components/BackgroundRemover.tsx - Gemini remover · Watermark removal UI backed by shared watermark logic and a server endpoint.
src/components/GeminiRemover.tsx - QR generator · Fully client-side QR creation, styling, and export workflow.
src/components/QrCodeGenerator.tsx - AI detector · UI for AI-image detection results, scoring, and JSON export presentation.
src/components/AiImageDetector.tsx
Server APIs
Route handlers that broker external services or share persistence.
- Detect API · Server aggregation point for AI-image detection providers and heuristics.
src/app/api/detect-ai-image/route.ts - Sora API · Parses shared Sora links and returns extracted media/prompt data.
src/app/api/extract-sora/route.ts - Gemini API · Dedicated server endpoint used by the watermark removal workflow.
src/app/api/remove-gemini/route.ts
IconLogo app
Self-contained logo editor subsystem inside the main app.
- IconLogo landing · Public entry and editor launch surface for the IconLogo product.
src/app/iconlogo/page.tsx - IconLogo editor · Dedicated editor shell and route entry for the logo application.
src/app/iconlogo/editor/page.tsx - IconLogo routes · TanStack-style app router and generated route tree for the editor subsystem.
src/iconlogo/router.tsx - Editor UI · Editor shell, dock, picker, share, landing, and interaction components.
src/iconlogo/features/editor/EditorPage.tsx - Editor domain · Logo, icon, collection, and share domain models plus randomization rules.
src/iconlogo/domain/logo/logo.types.ts - Commands · User actions for load, update, undo/redo, export, collection, and sharing.
src/iconlogo/commands/logo/update-logo.ts - Stores · Persistent logo and collection state used by queries and editor workflows.
src/iconlogo/store/logo-store.ts - Editor infra · Canvas rendering, clipboard, download, Iconify access, and KV helpers.
src/iconlogo/infra/canvas/canvas-renderer.ts - Share server · Create/get server-side share payloads for IconLogo links.
src/iconlogo/server/share.create.ts
Shared infra
Cross-cutting UI, state, and utility modules used across the repo.
- Shared UI · Reusable site-wide UI such as navbar, footer, loader, and install prompt.
src/components/TopNavbar.tsx - Shared lib · Branding, watermark processing, and IconLogo share-store utilities.
src/lib/brand.ts
Connections 21
- App shell → Shared UI: uses · The root layout composes shared chrome and prompts.
- App shell → Content pages: hosts · The App Router shell serves content and landing pages.
- App shell → SEO runtime: publishes · Site metadata and discovery files are centralized here.
- Content pages → Background remover: mounts · Feature routes mount the corresponding client tool components.
- Content pages → Gemini remover: mounts · Feature routes mount the corresponding client tool components.
- Content pages → QR generator: mounts · Feature routes mount the corresponding client tool components.
- Content pages → AI detector: mounts · Feature routes mount the corresponding client tool components.
- Background remover → Shared lib: uses · Watermark/image processing logic is shared from library code.
- Gemini remover → Gemini API: calls · The watermark-removal UI delegates server-backed work to the API.
- AI detector → Detect API: calls · The detector UI submits images for ensemble scoring.
- Sora API → Shared lib: uses · Shared utilities support media extraction and processing.
- Gemini API → Shared lib: uses · Server-assisted removal shares core watermark logic.
- IconLogo landing → IconLogo editor: launches · The landing surface routes users into the editor experience.
- IconLogo editor → IconLogo routes: hosts · The editor page is driven by a dedicated client router.
- IconLogo routes → Editor UI: renders · Routes load the editor UI feature modules.
- Editor UI → Commands: dispatches · UI actions are converted into command operations.
- Commands → Stores: mutates · Commands update persistent editor state.
- Stores → Editor domain: shapes · Stored state follows domain types and validators.
- Editor UI → Editor infra: uses · Rendering, export, clipboard, and icon search are handled in infra.
- Commands → Share server: creates · Share commands persist and retrieve server-backed link payloads.
- Share server → Shared lib: uses · Share persistence relies on shared store helpers.