A modern, responsive website for ChainLabs - blockchain analytics and solutions platform. Built with React, TypeScript, and Supabase.
- Modern Landing Page - Hero section with animated network visualization
- Company Information - Team profiles, mission, and values
- Solutions Overview - Comprehensive blockchain analytics solutions
- Industries Coverage - Detailed industry-specific use cases
- Interactive Coverage Map - Visual representation of blockchain coverage
- Insights & Content - Blog posts and case studies
- Contact Form - Lead capture with automated notifications
- Cookie Consent - GDPR-compliant cookie management
- Responsive Design - Mobile-first, fully responsive across all devices
- Secure Authentication - Email/password authentication via Supabase
- Content Management - Create and manage articles and case studies
- Rich Text Editor - Full-featured WYSIWYG content editor
- Image Upload - Direct integration with Supabase Storage
- Social Sharing - Built-in social media metadata management
- Row Level Security - Comprehensive RLS policies for data protection
- Automated Webhooks - Database triggers for form submissions
- Edge Functions - Serverless notification processing
- Analytics Integration - Custom analytics tracking
- SEO Optimization - Sitemap and robots.txt included
- Frontend Framework: React 18 with TypeScript
- Build Tool: Vite
- Styling: Tailwind CSS
- Icons: Lucide React
- Database: Supabase (PostgreSQL)
- Authentication: Supabase Auth
- Storage: Supabase Storage
- Edge Functions: Supabase Functions (Deno runtime)
- Deployment: Netlify
- Node.js 18+ and npm
- Supabase account (for database and auth)
- Modern web browser
-
Clone the repository
git clone <repository-url> cd chainlabs
-
Install dependencies
npm install
-
Environment Setup
Copy the example environment file and fill in your Supabase credentials:
cp .env.local.example .env.local
Then edit
.env.localand add your Supabase project URL and anonymous key:VITE_SUPABASE_URL=your_supabase_project_url VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
Note: The same Supabase project is used for both local development and production. Use the same credentials in your
.env.localfile that you'll configure in Netlify for production. -
Database Setup
Run the migrations in order:
# The migrations are located in supabase/migrations/ # Apply them through Supabase Dashboard or CLI: - 20251021125645_create_company_page_tables.sql - 20251021132005_create_insights_tables.sql - 20251029125747_create_demo_requests_table.sql - 20251029130017_create_demo_request_webhook.sql - 20251117134721_create_admin_auth_and_content_enhancements.sql - 20251117153956_add_cover_images_and_storage.sql
-
Edge Function Deployment
The
notify-demo-requestedge function is included. Deploy it through your Supabase project. -
Admin User Setup
Create an admin user through Supabase Auth dashboard, then update the
admin_userstable with their user ID.
Start the development server:
npm run devThe application will be available at http://localhost:5173
Create a production build:
npm run buildPreview the production build:
npm run previewThe project is configured to deploy on Netlify with minimal configuration:
-
Connect Repository
- Push your code to GitHub, GitLab, or Bitbucket
- In Netlify Dashboard, click "Add new site" → "Import an existing project"
- Select your repository
-
Configure Build Settings
- Build command:
npm run build - Publish directory:
dist - Node version: 18 or higher (set in Netlify UI if needed)
- Build command:
-
Set Environment Variables
- Go to Site settings → Environment variables
- Add the following variables (use the same values as your
.env.local):VITE_SUPABASE_URL- Your Supabase project URLVITE_SUPABASE_ANON_KEY- Your Supabase anonymous key
-
Deploy
- Click "Deploy site"
- Netlify will automatically build and deploy your site
- Future pushes to your main branch will trigger automatic deployments
Note: The public/_redirects file ensures that all routes are properly handled for the single-page application. This file is automatically copied to the dist folder during the build process.
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLintnpm run typecheck- Run TypeScript type checking
chainlabs/
├── public/ # Static assets (images, videos, logos)
├── src/
│ ├── components/ # Reusable React components
│ │ ├── admin/ # Admin-specific components
│ │ ├── CookieConsent.tsx
│ │ ├── CountUp.tsx
│ │ ├── CoverageMap.tsx
│ │ ├── Footer.tsx
│ │ ├── LineArt.tsx
│ │ ├── Navigation.tsx
│ │ └── NetworkVisualization.tsx
│ ├── contexts/ # React contexts
│ │ └── AuthContext.tsx
│ ├── lib/ # Utilities and configurations
│ │ ├── analytics.ts
│ │ └── supabase.ts
│ ├── pages/ # Page components
│ │ ├── admin/ # Admin panel pages
│ │ ├── CompanyPage.tsx
│ │ ├── ContactPage.tsx
│ │ ├── HomePage.tsx
│ │ ├── IndustriesPage.tsx
│ │ ├── InsightsPage.tsx
│ │ ├── PrivacyPolicyPage.tsx
│ │ ├── SolutionsPage.tsx
│ │ └── TermsPage.tsx
│ ├── App.tsx # Main application component
│ ├── main.tsx # Application entry point
│ └── index.css # Global styles
├── supabase/
│ ├── functions/ # Edge Functions
│ │ └── notify-demo-request/
│ └── migrations/ # Database migrations
└── package.json
- User submits contact form on
/contact - Data is stored in
demo_requeststable - Database trigger fires automatically
- Edge function receives notification
- Email content is prepared and logged (email service integration pending)
- Navigate to
/admin/login - Sign in with authorized admin credentials
- Manage articles and case studies at
/admin/articlesand/admin/case-studies
- All tables have Row Level Security enabled
- Restrictive policies ensure data access control
- Admin-only access for content management
- Public read access for published content
- Rich text editor with formatting options
- Image upload with automatic optimization
- Draft/publish workflow
- Social media metadata for sharing
| Variable | Description | Required | Location |
|---|---|---|---|
VITE_SUPABASE_URL |
Your Supabase project URL | Yes | .env.local (local), Netlify UI (production) |
VITE_SUPABASE_ANON_KEY |
Your Supabase anonymous key | Yes | .env.local (local), Netlify UI (production) |
Local Development: Create .env.local file from .env.local.example and fill in your Supabase credentials.
Production: Set these same environment variables in Netlify Dashboard (Site settings → Environment variables).
The same Supabase project is used for both local development and production, so use the same credentials in both places.
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
Copyright © 2025 ChainLabs. All rights reserved.
For questions or issues, please contact the ChainLabs team through the website contact form.