AI Chat Assistant
The AI Chat Assistant lives in a floating widget on every page. You can ask it about features, troubleshooting steps, file sharing recommendations, and pricing. The widget supports quick replies, markdown rendering, and streaming responses from a Supabase Edge Function.How It Loads for Performance
The chat widget is not loaded immediately. Instead, it usesrequestIdleCallback to defer initialization until the browser is idle, with a 3000 ms fallback timeout.
React.lazy(), so its JavaScript is fetched in a separate chunk only when the browser signals idle time.
Chat Components
The chat lives insrc/components/chat/ and is built with Framer Motion, Lucide icons, and shadcn/ui. Quick replies cover uploads, size limits, secure sharing, pricing, file expiration, and PIN access. Responses are streamed token by token from the ai-chat Supabase Edge Function.
Analytics Dashboard
The Analytics Dashboard visualizes your file activity. You can toggle between a 7-day and 30-day view. It tracks views, downloads, and trending patterns.1
Log in and open the Dashboard
Log in to your account and visit
/dashboard. The analytics section loads automatically under the Analytics tab.2
Review upload statistics
The dashboard shows total files uploaded, total storage used, and categorization by file type and upload date.
3
Check download analytics
Every download increments
download_count on the uploaded_files table. Per-file download totals are shown alongside the download trend line.4
Explore user analytics
Admins can view total users and active users from the admin panel. End users see their own file activity only.
5
Monitor system health
Admins can open the System Health Monitor inside the admin dashboard to review storage usage and database stats.
Recharts Visualizations
The dashboard uses Recharts for data visualization.Bar Charts
Show uploads over time grouped by day or date range.
Line Charts
Show download trends across the selected 7-day or 30-day window.
Pie Charts
Can be used to break down file types by volume or count.
Stat Cards
Surface totals for views, downloads, and percentage trends at a glance.
File Download Tracking
When someone downloads a file, two things happen:download_countis incremented on theuploaded_filesrow.- An event is recorded in the
file_analyticstable with the event typedownload, timestamp, IP address, and user agent.
file_analytics table also records view events, so you can distinguish a page view from an actual download. The get_user_file_analytics RPC function returns this data grouped by date for charting.
Admin Analytics Panel
Admins have access to an extended analytics panel insideAdminDashboard.tsx. It surfaces six management modules.
User Management Stats
Track total signups, active sessions, and user growth over time.
File Moderation Queue
Review and approve or remove files flagged for moderation.
System Health Monitor
Review storage usage, database connection health, and edge function status.
Bulk Notifications
Send notifications to all users or targeted segments.
Payment and Billing
Manage premium plan purchases and refund status inside Razorpay flows.
Audit Logs
Review every admin action stored in the
audit_logs table, including action type, target, and details.