Skip to content

Modern Web3 Analytics Portfolio built with Next.js 14 - Showcasing blockchain analytics, DeFi dashboards, and on-chain insights with full-stack CMS

Notifications You must be signed in to change notification settings

RaphDeAnalyst/web3-portfolio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Web3 Portfolio

A production-grade, full-stack portfolio platform built with Next.js 14, TypeScript, and Supabase, featuring a comprehensive admin dashboard, blog system, and advanced SEO optimizations.

Next.js TypeScript Supabase Tailwind CSS Vercel


Table of Contents


Overview

This project is a professional Web3-focused portfolio platform designed to showcase projects, write technical blog posts, and manage content through a comprehensive admin dashboard. Built with modern web technologies and industry best practices, it delivers exceptional performance, security, and user experience.

Live Demo: matthewraphael.xyz

Key Highlights

  • πŸš€ Performance: Optimized bundle splitting, lazy loading, and edge caching
  • πŸ” Security: Production-grade CSP headers, authentication, and data protection
  • πŸ“± Progressive Web App: Installable with offline capabilities
  • 🎨 Modern UI: Responsive design with dark mode support
  • πŸ“Š Analytics: Integrated Vercel Analytics and Speed Insights
  • πŸ” SEO: Comprehensive multi-market SEO targeting (US, UK, EU, Nigeria)

Features

Public-Facing Features

  • Portfolio Showcase

    • Project gallery with detailed case studies
    • Technology stack visualization
    • Live demo and GitHub repository links
    • Interactive project filters and categories
  • Technical Blog

    • Markdown-based content with syntax highlighting
    • Dune Analytics dashboard embeds
    • YouTube video integration
    • Google Drive document viewer
    • Reading time estimation
    • Social sharing integration
  • About & Contact

    • Professional bio and experience timeline
    • Skills visualization
    • Direct contact form
    • Social media integration
  • Progressive Web App

    • Installable on mobile and desktop
    • Offline support with service workers
    • App-like experience
    • Custom install prompts

Admin Dashboard Features

  • Content Management

    • Full CRUD operations for blog posts and projects
    • Rich markdown editor with live preview
    • Media library with cloud storage integration
    • Bulk operations and batch processing
  • Media Management

    • Upload and organize media files
    • YouTube metadata fetching
    • Thumbnail generation
    • Storage analytics and usage tracking
  • Authentication & Authorization

    • Supabase-powered authentication
    • Secure session management
    • Role-based access control
    • Protected API routes
  • Analytics Dashboard

    • Real-time content performance metrics
    • User engagement tracking
    • Traffic analytics
    • Export capabilities

Tech Stack

Core Framework

Backend & Database

Styling & UI

Developer Experience

Monitoring & Analytics

Authentication & Security


Architecture

High-Level Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     Client Layer                         β”‚
β”‚  (Next.js App Router + React Server Components)         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                   β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  API Layer (Edge)                        β”‚
β”‚  β€’ REST endpoints        β€’ Authentication middleware     β”‚
β”‚  β€’ File uploads          β€’ Rate limiting                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                   β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚               Data Layer (Supabase)                      β”‚
β”‚  β€’ PostgreSQL Database   β€’ Row Level Security           β”‚
β”‚  β€’ Cloud Storage         β€’ Real-time subscriptions      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Key Design Patterns

  • Server-Side Rendering (SSR): Dynamic content with optimal performance
  • Static Site Generation (SSG): Pre-rendered pages for blog posts
  • Incremental Static Regeneration (ISR): Automatic cache revalidation
  • Service Layer Pattern: Abstracted database operations
  • Component-Based Architecture: Modular, reusable UI components
  • API Route Protection: Middleware-based authentication

Getting Started

Prerequisites

Ensure you have the following installed:

  • Node.js >= 18.0.0
  • npm >= 9.0.0 or pnpm >= 8.0.0
  • Git >= 2.40.0
  • Supabase Account (free tier available)

Installation

  1. Clone the repository
git clone https://github.com/RaphDeAnalyst/web3-portfolio.git
cd web3-portfolio
  1. Install dependencies
npm install
# or
pnpm install
  1. Set up environment variables
cp .env.local.example .env.local

Edit .env.local with your configuration (see Environment Configuration)

  1. Set up Supabase
  • Create a new project at supabase.com
  • Run the database migrations from database/migrations/
  • Configure authentication providers
  • Set up storage buckets for media uploads
  1. Start the development server
npm run dev

Visit http://localhost:3000 to see your application.


Environment Configuration

Create a .env.local file in the root directory:

# Supabase Configuration
# Get these from: https://app.supabase.com/project/_/settings/api
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key

# YouTube API (Optional - for video metadata)
# Get from: https://console.cloud.google.com/apis/credentials
YOUTUBE_API_KEY=your_youtube_api_key

# Deployment (Vercel)
# Automatically set by Vercel, no manual configuration needed
VERCEL_URL=auto
NEXT_PUBLIC_SITE_URL=https://yourdomain.com

Required Environment Variables

Variable Description Required
NEXT_PUBLIC_SUPABASE_URL Your Supabase project URL βœ… Yes
NEXT_PUBLIC_SUPABASE_ANON_KEY Supabase anonymous key βœ… Yes
YOUTUBE_API_KEY YouTube Data API v3 key ⚠️ Optional
NEXT_PUBLIC_SITE_URL Production domain URL ⚠️ Production only

Development

Available Scripts

Command Description
npm run dev Start development server on localhost:3000
npm run build Build production-optimized bundle
npm run start Start production server (requires build first)
npm run lint Run ESLint code quality checks
npm run test Run unit tests with Vitest
npm run test:ui Run tests with interactive UI
npm run test:coverage Generate test coverage report
npm run analyze Analyze webpack bundle size
npm run keep-alive Ping Supabase to prevent database sleep

Project Structure

web3-portfolio/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/                    # Next.js App Router pages
β”‚   β”‚   β”œβ”€β”€ (auth)/             # Authentication routes
β”‚   β”‚   β”œβ”€β”€ admin/              # Admin dashboard
β”‚   β”‚   β”œβ”€β”€ api/                # API endpoints
β”‚   β”‚   β”œβ”€β”€ blog/               # Blog pages
β”‚   β”‚   β”œβ”€β”€ portfolio/          # Portfolio showcase
β”‚   β”‚   β”œβ”€β”€ about/              # About page
β”‚   β”‚   β”œβ”€β”€ contact/            # Contact page
β”‚   β”‚   └── layout.tsx          # Root layout
β”‚   β”‚
β”‚   β”œβ”€β”€ components/             # React components
β”‚   β”‚   β”œβ”€β”€ admin/              # Admin-specific components
β”‚   β”‚   β”œβ”€β”€ blog/               # Blog components
β”‚   β”‚   β”œβ”€β”€ layout/             # Layout components (Navbar, Footer)
β”‚   β”‚   β”œβ”€β”€ sections/           # Homepage sections
β”‚   β”‚   β”œβ”€β”€ ui/                 # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ pwa/                # PWA components
β”‚   β”‚   β”œβ”€β”€ seo/                # SEO components
β”‚   β”‚   └── error/              # Error boundaries
β”‚   β”‚
β”‚   β”œβ”€β”€ lib/                    # Utility libraries
β”‚   β”‚   β”œβ”€β”€ supabase.ts         # Supabase client
β”‚   β”‚   β”œβ”€β”€ auth.ts             # Authentication utilities
β”‚   β”‚   β”œβ”€β”€ logger.ts           # Logging utilities
β”‚   β”‚   └── utils.ts            # Helper functions
β”‚   β”‚
β”‚   └── types/                  # TypeScript type definitions
β”‚
β”œβ”€β”€ public/                     # Static assets
β”‚   β”œβ”€β”€ icons/                  # PWA icons
β”‚   β”œβ”€β”€ manifest.json           # PWA manifest
β”‚   └── sw.js                   # Service worker
β”‚
β”œβ”€β”€ database/                   # Database schema and migrations
β”‚   └── migrations/             # SQL migration files
β”‚
β”œβ”€β”€ .github/                    # GitHub configuration
β”‚   └── workflows/              # CI/CD workflows
β”‚       └── supabase-keep-alive.yml
β”‚
β”œβ”€β”€ next.config.js              # Next.js configuration
β”œβ”€β”€ tailwind.config.ts          # Tailwind CSS configuration
β”œβ”€β”€ tsconfig.json               # TypeScript configuration
└── package.json                # Project dependencies

Code Quality

This project enforces code quality through:

  • TypeScript strict mode - Type safety across the codebase
  • ESLint - Linting with Next.js and accessibility rules
  • Component testing - Vitest for unit and integration tests
  • Git hooks - Pre-commit checks (optional)

Testing

Running Tests

# Run all tests
npm run test

# Run tests in watch mode
npm run test:watch

# Run tests with UI
npm run test:ui

# Generate coverage report
npm run test:coverage

Test Structure

Tests are colocated with components using the following naming convention:

component-name.tsx
component-name.test.tsx

Test Coverage Goals

  • Unit tests: >= 80% coverage for utilities and services
  • Integration tests: Critical user flows (auth, content management)
  • E2E tests: Core user journeys (planned)

Deployment

Vercel Deployment (Recommended)

This project is optimized for Vercel deployment:

  1. Connect your repository to Vercel
  2. Configure environment variables in Vercel dashboard
  3. Deploy - Automatic deployments on every push to main

Deploy with Vercel

GitHub Actions Workflows

  • Supabase Keep-Alive: Daily cron job to prevent database sleep (free tier)
    • Runs daily at 6:00 AM UTC
    • Queries database to maintain active connection
    • Located: .github/workflows/supabase-keep-alive.yml

Environment-Specific Configuration

Environment Branch Domain Cache Strategy
Production main matthewraphael.xyz ISR + Edge Cache
Preview Feature branches *.vercel.app No cache
Development Local localhost:3000 No cache

Performance

Optimization Techniques

This project implements industry-standard performance optimizations:

Bundle Optimization

  • Code splitting - Automatic route-based splitting
  • Tree shaking - Eliminates unused code
  • Dynamic imports - Lazy loading for non-critical components
  • Vendor chunking - Separate chunks for node_modules
  • Icon optimization - Selective imports from Lucide React

Image Optimization

  • Next.js Image component - Automatic optimization
  • Modern formats - WebP and AVIF support
  • Responsive images - Adaptive sizing
  • Lazy loading - Below-the-fold images

Caching Strategy

  • Static pages: ISR with 5-minute revalidation
  • API routes: Aggressive edge caching
  • Media assets: CDN caching with long TTL
  • Admin pages: No caching for fresh content

Performance Metrics

Target metrics (Lighthouse scores):

  • Performance: >= 95
  • Accessibility: >= 95
  • Best Practices: >= 95
  • SEO: >= 95

Bundle Analysis

Analyze bundle size with:

npm run analyze

This generates a visual report of your webpack bundle composition.


Security

Security Features

  • Content Security Policy (CSP) - Strict CSP headers
  • HTTPS enforcement - HSTS with preload
  • XSS protection - Input sanitization and validation
  • CSRF protection - Token-based verification
  • SQL injection prevention - Parameterized queries via Supabase
  • Authentication - Secure session management with Supabase Auth
  • Rate limiting - API route protection
  • Environment variable security - No secrets in client-side code

Security Headers

Configured in next.config.js:

{
  'X-Content-Type-Options': 'nosniff',
  'X-Frame-Options': 'DENY',
  'X-XSS-Protection': '1; mode=block',
  'Referrer-Policy': 'strict-origin-when-cross-origin',
  'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload',
  'Content-Security-Policy': '...'
}

Reporting Security Issues

If you discover a security vulnerability, please email: matthewraphael@matthewraphael.xyz

Do not create a public GitHub issue for security vulnerabilities.


Contributing

Contributions are welcome! Please follow these guidelines:

Development Workflow

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes with clear, descriptive commits
  4. Write or update tests for your changes
  5. Ensure all tests pass (npm run test)
  6. Run linting (npm run lint)
  7. Submit a pull request

Commit Convention

Follow Conventional Commits:

feat: add new feature
fix: resolve bug
docs: update documentation
style: format code
refactor: restructure code
test: add tests
chore: update dependencies

Code Style

  • TypeScript: Use strict mode, avoid any types
  • Components: Functional components with TypeScript interfaces
  • Naming: Descriptive, PascalCase for components, camelCase for functions
  • Comments: JSDoc for public APIs, inline for complex logic
  • Imports: Absolute imports using @/ alias

License

This project is private and proprietary. All rights reserved.

Β© 2024 Matthew Raphael. Unauthorized copying or distribution is prohibited.


Contact & Support

Developer: Matthew Raphael (RaphDeAnalyst) Email: matthewraphael@matthewraphael.xyz GitHub: @RaphDeAnalyst Website: matthewraphael.xyz


Acknowledgments


Made with ❀️ and β˜• by RaphDeAnalyst

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •