Intelligence-driven Website Optimization Platform
A modern, secure customer portal for monitoring website performance, uptime, and security built with React, TypeScript, and Supabase.
- Secure email/password authentication via Supabase
- Row Level Security (RLS) - users can only access their own data
- Automatic session management
- Password requirements enforcement
- Real-time overview of all monitored websites
- Key metrics at a glance:
- Total sites monitored
- Average uptime percentage
- Average load time
- Security issues count
- Add unlimited websites to monitor
- Track performance metrics:
- LCP (Largest Contentful Paint)
- FID (First Input Delay)
- CLS (Cumulative Layout Shift)
- Monitor uptime and availability
- Security scanning (SSL, vulnerabilities)
- Multiple geographic monitoring locations
- Core Web Vitals tracking
- Performance score calculation (0-100)
- Visual progress indicators
- Trend analysis
- SSL certificate validation
- Vulnerability tracking
- Security scan timestamps
- Issue alerts
- Node.js 18+ installed
- A Supabase account (free tier works)
# Go to your Supabase SQL Editor:
# https://supabase.com/dashboard/project/qredqlzgqxirxndpixhz/editor
# Run the supabase-schema.sql fileSee DATABASE_SETUP.md for detailed instructions.
npm installnpm run devOpen http://localhost:3000 in your browser.
nine-line-portal/
βββ nine-line-portal.tsx # Main application component
βββ supabase-schema.sql # Database schema
βββ package.json # Dependencies
βββ SETUP.md # Detailed setup guide
βββ DATABASE_SETUP.md # Database-specific setup
βββ README.md # This file
Your Supabase project is already configured in nine-line-portal.tsx:
const supabase = createClient(
'https://qredqlzgqxirxndpixhz.supabase.co',
'your_anon_key'
);For production, use environment variables:
# .env.local
NEXT_PUBLIC_SUPABASE_URL=https://qredqlzgqxirxndpixhz.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_keyprofiles
- User account information
- Automatically created on signup
- Linked to Supabase Auth
websites
- Monitored website domains
- Status, uptime, load time
- Linked to user profiles
performance_metrics
- Core Web Vitals data
- Timestamped measurements
- Historical tracking
security_metrics
- SSL certificate status
- Vulnerability counts
- Scan timestamps
monitoring_locations
- Geographic monitoring points
- Check frequencies
- Per-website configuration
See supabase-schema.sql for full schema.
Update the logo and company name:
<h1 className="text-2xl font-light text-gray-900">
Your Company Name
</h1>The app uses Tailwind CSS. Customize colors:
// Primary color
bg-gray-900 β bg-blue-600
// Borders
border-gray-200 β border-blue-200Add/remove default monitoring points in handleAddWebsite:
const defaultLocations = [
{ location: 'US-East', frequency: '1 minute' },
{ location: 'EU-West', frequency: '1 minute' },
{ location: 'Asia-Pacific', frequency: '5 minutes' },
];All tables use RLS policies:
- Users can only access their own data
- Policies are enforced at the database level
- Even compromised clients can't access other users' data
- Passwords hashed with bcrypt
- JWT tokens for session management
- Automatic token refresh
- Secure cookie storage
The anon key is safe to expose because:
- RLS policies protect all data
- Users must authenticate to access data
- Database enforces all security rules
npm install -g vercel
vercelnpm install -g netlify-cli
netlify deploynpm run build
# Deploy the 'out' or '.next' directory- Sign up:
test@yourdomain.com/password123 - Add website:
example.com - View metrics and details
- Logout and login again
- Verify data persistence
-- Check user was created
SELECT * FROM profiles;
-- Check website was added
SELECT * FROM websites;
-- Verify RLS is working
-- (try to query as different user)"relation does not exist"
- Run the SQL schema in Supabase
Authentication fails
- Check email provider is enabled in Supabase Auth
Can't see websites
- Verify RLS policies are set up
- Check browser console for errors
Slow performance
- Add database indexes (included in schema)
- Consider pagination for 100+ websites
See SETUP.md for more troubleshooting tips.
- Historical performance charts
- Email/SMS alerts for downtime
- Slack integration
- Team member management
- API access for programmatic monitoring
- Mobile app
- Custom reporting
- Competitor tracking (from pitch deck)
- Geographic intelligence dashboard
- Stripe for billing
- Twilio for SMS alerts
- SendGrid for email notifications
- Datadog/New Relic for real monitoring
- Zapier for workflow automation
- Setup Guide - Complete setup instructions
- Database Setup - Database-specific guide
- Supabase Docs - Supabase documentation
- Next.js Docs - Next.js documentation
This is a commercial project for Nine-Line.dev. For internal contributions:
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit for review
Proprietary - Nine-Line.dev Β© 2024
For support:
- Check documentation in this repository
- Review Supabase docs for database issues
- Check browser console for client errors
- Enable Supabase logging for API issues
Target performance:
- Load Time: < 1 second
- First Contentful Paint: < 1.8s
- Time to Interactive: < 3.5s
- Lighthouse Score: 95+
Current stats:
- Tables: 5 core tables
- RLS Policies: 15+ security policies
- API Calls: Optimized with views
- Bundle Size: < 300KB gzipped
- Production: TBD
- Staging: TBD
- Supabase Project: https://supabase.com/dashboard/project/qredqlzgqxirxndpixhz
- Design System: Tailwind CSS + Lucide Icons
Built with π by Nine-Line.dev
Intelligence-driven Website Optimization