Social Media Analytics & Reporting Platform
- Multi-Platform Analytics: Track performance across LinkedIn, Facebook, Instagram, YouTube, Twitter/X, and TikTok
- Daily Reports: Real-time daily performance metrics
- Weekly Reports: Weekly performance overview with trend analysis
- Monthly Reports: Comprehensive monthly reports with detailed breakdowns
- Excel Export: Export reports to Excel format for presentations
- Frontend: React + TypeScript + Vite
- API Integration: Ayrshare API
- Backend: Supabase Edge Functions
- Caching: Supabase Database Cache
npm installcp .env.example .env.localEdit .env.local with your credentials:
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your-anon-key
VITE_SUPABASE_SERVICE_KEY=your-service-keyFor better performance and incremental data fetching:
-
Deploy the Supabase Edge Function:
cd supabase supabase functions deploy get-ayrshare-analytics -
Configure Edge Function secrets in Supabase Dashboard:
AYRSHARE_API_KEY: Your Ayrshare API keyREPORT_SECRET: Team shared secretSUPABASE_URL: Your Supabase project URLSUPABASE_SERVICE_ROLE_KEY: Your service role key
-
Execute the database migration in Supabase SQL Editor:
CREATE TABLE IF NOT EXISTS sama_post_cache ( post_id TEXT NOT NULL, profile_key TEXT NOT NULL, created TEXT, fetched_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), PRIMARY KEY (post_id, profile_key) );
# Start development server
npm run dev
# Run tests
npm run test
# Build for production
npm run build├── components/ # React components
│ └── AnalyticsReport.tsx # Main report component
├── services/ # Business logic
│ ├── dailyReportService.ts
│ ├── weeklyReportService.ts
│ ├── monthlyReportService.ts
│ └── supabaseApi.ts # Supabase API layer
├── context/ # React context providers
├── lib/ # Utility libraries
├── supabase/ # Supabase Edge Functions
│ └── functions/
│ └── get-ayrshare-analytics/
└── docs/ # Documentation
Private - All rights reserved