How nati-13/docunexa- works
DocuNexa is a browser-based PDF and document workspace, with account, ad-free payment, support, and administration services alongside its core tools. The principal workflow is selecting a tool, loading a document, processing it in the browser, and receiving a downloadable result; the PDF Unit Cutter adds detection and review of textbook sections before slicing. The README documents the client-side model and tool capabilities, while sampled code confirms selected PDF-engine, authentication, payment-order, and admin data paths. Many tool implementations and UI connections were not sampled, so uncertain links are omitted.
Main entry points: server.ts Supabase data · auth Auth endpoints · create-order/route.ts Payment orders · overview/route.ts Admin endpoints
Components 23
PDF workspace
- PDF tool UI
src/components/tools - PDF engine
src/lib/pdfEngine.ts - PDF reader
src/lib/pdfReader.ts - Download contract
src/lib/downloadContract.ts - Unit Cutter UI
src/app/tools/pdf-unit-cutter/page.tsx - Unit detection
src/lib/cutter.ts - Structure detection
src/lib/structureDetector.ts - Specialist engines
src/lib/tools
Accounts and payments
- Account UI
src/context/AuthContext.tsx - Auth endpoints
src/app/api/auth - Auth service
src/lib/auth/index.ts - Supabase data
src/lib/supabase/server.ts - Payment orders
src/app/api/payments/create-order/route.ts - Payment matching
src/lib/payments/bybit.ts
Platform operations
- Admin endpoints
src/app/api/admin/overview/route.ts - Admin authorization
src/lib/admin/auth.ts - Support
src/app/api/support/route.ts - Telegram bot
src/lib/telegram/bot.ts - API protection
src/lib/security/apiGuard.ts
Discovery and engagement
- Tool catalog
src/config/tools.ts - Tool pages
src/app/tools/[slug]/page.tsx - Analytics
src/lib/analytics/tracker.ts
Other components
- User
Connections 26
- User → Tool catalog: chooses tool
README.md - Tool catalog → Tool pages: opens tool
- Tool pages → PDF tool UI: presents tool
- PDF tool UI → PDF engine: processes locally
- PDF engine → PDF reader: reads PDF
src/lib/pdfEngine.ts - PDF engine → Download contract: sanitizes filenames
src/lib/pdfEngine.ts - User → Unit Cutter UI: opens cutter
README.md - Unit Cutter UI → Unit detection: detects sections
- Unit detection → Structure detection: uses structure
- PDF tool UI → Specialist engines: runs tools
- User → Account UI: uses account
- Account UI → Supabase data: creates client
src/context/AuthContext.tsx - Account UI → Auth endpoints: requests session
src/context/AuthContext.tsx - Auth endpoints → Auth service: validates email
src/app/api/auth/signup/route.ts - Auth endpoints → Supabase data: creates account
src/app/api/auth/signup/route.ts - Auth endpoints → API protection: guards requests
src/app/api/auth/signup/route.ts - User → Payment orders: starts payment
- Payment orders → Supabase data: reads profile, stores order
src/app/api/payments/create-order/route.ts - Payment orders → Payment matching: creates unique amount
src/app/api/payments/create-order/route.ts - Payment orders → API protection: guards requests
src/app/api/payments/create-order/route.ts - Admin endpoints → Admin authorization: requires admin
src/app/api/admin/overview/route.ts - Admin endpoints → Supabase data: queries metrics
src/app/api/admin/overview/route.ts - Admin endpoints → Analytics: gets summary
src/app/api/admin/overview/route.ts - User → Support: submits request
- Support → Supabase data: stores ticket
src/app/api/support/route.ts - Support → Telegram bot: notifies
src/app/api/support/route.ts