Skip to content

30tools/devarticles

Repository files navigation

DevHub - SEO-Optimized Developer Community Platform

A high-performance, SEO-optimized clone of dev.to built with Gatsby, designed to rank #1 on Google and Bing search engines. This platform aggregates developer content from the dev.to API and presents it in an optimized, fast-loading interface.

πŸš€ Features

SEO Optimization

  • Comprehensive SEO Strategy: Implements all best practices from the included SEO guidelines
  • Structured Data: Rich snippets with JSON-LD for articles, organizations, and website data
  • Meta Tags: Optimized title tags, meta descriptions, Open Graph, and Twitter Cards
  • Sitemap Generation: Automatic XML sitemap generation with proper priority and change frequency
  • Robots.txt: Optimized for search engine crawling
  • Canonical URLs: Proper canonicalization to avoid duplicate content issues
  • Schema Markup: Article, Organization, WebSite, and FAQ schemas

Performance

  • Core Web Vitals Optimized: Excellent LCP, FID, and CLS scores
  • Image Optimization: Gatsby Image with WebP/AVIF support and lazy loading
  • Code Splitting: Automatic code splitting for optimal loading
  • Preloading: Critical resource preloading and DNS prefetching
  • Caching: Intelligent caching strategies for API responses
  • Progressive Web App: PWA capabilities with offline support

User Experience

  • Responsive Design: Mobile-first approach with perfect mobile experience
  • Dark Mode: System preference detection with manual toggle
  • Fast Search: Intelligent search with suggestions and filters
  • Accessibility: WCAG compliant with proper ARIA labels and keyboard navigation
  • Loading States: Smooth loading animations and skeleton screens

Content Features

  • Real-time Content: Fetches latest articles from dev.to API
  • Smart Categorization: Intelligent tagging and categorization system
  • Related Articles: AI-powered content recommendations
  • Reading Time: Automatic reading time calculation
  • Social Sharing: Native and custom sharing options

πŸ›  Technology Stack

  • Framework: Gatsby 5 (React-based static site generator)
  • Styling: CSS Custom Properties with responsive design
  • API: Dev.to REST API integration
  • Deployment: Cloudflare Pages (configured with Wrangler)
  • Analytics: Google Analytics 4 integration
  • Performance: Lighthouse CI for continuous performance monitoring

πŸ“ Project Structure

β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/          # Reusable React components
β”‚   β”‚   β”œβ”€β”€ layout.js       # Main layout component
β”‚   β”‚   β”œβ”€β”€ seo.js          # SEO component with structured data
β”‚   β”‚   └── article-card.js # Article display component
β”‚   β”œβ”€β”€ pages/              # Gatsby pages
β”‚   β”‚   β”œβ”€β”€ index.js        # Homepage
β”‚   β”‚   β”œβ”€β”€ articles.js     # Articles listing page
β”‚   β”‚   β”œβ”€β”€ search.js       # Search functionality
β”‚   β”‚   β”œβ”€β”€ tags.js         # Tags browsing page
β”‚   β”‚   β”œβ”€β”€ about.js        # About page
β”‚   β”‚   β”œβ”€β”€ privacy.js      # Privacy policy
β”‚   β”‚   └── terms.js        # Terms of service
β”‚   β”œβ”€β”€ templates/          # Dynamic page templates
β”‚   β”‚   β”œβ”€β”€ article.js      # Individual article pages
β”‚   β”‚   └── tag.js          # Tag-specific pages
β”‚   β”œβ”€β”€ services/           # API and utility services
β”‚   β”‚   └── devto-api.js    # Dev.to API integration
β”‚   β”œβ”€β”€ images/             # Static images and assets
β”‚   └── style.css           # Global styles and CSS variables
β”œβ”€β”€ static/                 # Static assets
β”‚   └── robots.txt          # Search engine directives
β”œβ”€β”€ gatsby-config.js        # Gatsby configuration
β”œβ”€β”€ gatsby-node.js          # Build-time page generation
β”œβ”€β”€ gatsby-browser.js       # Browser-specific code
β”œβ”€β”€ gatsby-ssr.js           # Server-side rendering config
└── wrangler.jsonc          # Cloudflare deployment config

πŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • npm or yarn or bun
  • Git

Installation

  1. Clone the repository

    git clone https://github.com/your-username/devhub.git
    cd devhub
  2. Install dependencies

    npm install
    # or
    yarn install
    # or
    bun install
  3. Start development server

    npm run develop
    # or
    yarn develop
    # or
    bun run develop
  4. Open your browser Navigate to http://localhost:8000

Build for Production

npm run build
# or
yarn build
# or
bun run build

Deploy to Cloudflare Pages

npm run deploy
# or
yarn deploy
# or
bun run deploy

πŸ”§ Configuration

Environment Variables

Create a .env file in the root directory:

GATSBY_SITE_URL=https://your-domain.com
GATSBY_GA_MEASUREMENT_ID=G-XXXXXXXXXX
DEV_TO_API_KEY=your-dev-to-api-key (optional)

SEO Configuration

Update gatsby-config.js with your site metadata:

siteMetadata: {
  title: `Your Site Title`,
  description: `Your site description`,
  siteUrl: `https://your-domain.com`,
  social: {
    twitter: `your-twitter`,
    github: `your-github`,
  },
}

πŸ“Š SEO Features Implemented

Technical SEO

  • βœ… XML Sitemap with proper structure
  • βœ… Robots.txt optimization
  • βœ… Canonical URLs
  • βœ… Meta robots tags
  • βœ… Structured data (JSON-LD)
  • βœ… Open Graph tags
  • βœ… Twitter Card tags
  • βœ… Breadcrumb navigation
  • βœ… Internal linking strategy

Performance SEO

  • βœ… Core Web Vitals optimization
  • βœ… Image optimization and lazy loading
  • βœ… Code splitting and bundling
  • βœ… Critical CSS inlining
  • βœ… Resource preloading
  • βœ… Caching strategies

Content SEO

  • βœ… Keyword-optimized titles and descriptions
  • βœ… Header tag hierarchy (H1-H6)
  • βœ… Alt text for images
  • βœ… Content freshness indicators
  • βœ… Reading time calculation
  • βœ… Related content suggestions

User Experience SEO

  • βœ… Mobile-first responsive design
  • βœ… Fast loading times
  • βœ… Accessibility compliance
  • βœ… Clear navigation structure
  • βœ… Search functionality
  • βœ… Error handling and 404 pages

🎯 SEO Best Practices Followed

Based on the comprehensive SEO guidelines included in this project:

For Google

  • Mobile-first indexing optimization
  • Core Web Vitals excellence
  • E-A-T (Expertise, Authoritativeness, Trustworthiness) signals
  • Semantic HTML and structured data
  • User engagement optimization

For Bing

  • Exact keyword matching in strategic locations
  • Desktop version parity with mobile
  • Social signals integration
  • Structured data emphasis
  • Meta keywords tag inclusion

πŸ“ˆ Performance Metrics

Target performance scores:

  • Lighthouse Performance: 95+
  • Lighthouse SEO: 100
  • Lighthouse Accessibility: 95+
  • Lighthouse Best Practices: 100
  • Core Web Vitals: All green

πŸ” Search Features

  • Smart Search: Searches through titles, descriptions, and tags
  • Tag Filtering: Browse content by programming languages and topics
  • Trending Topics: Dynamic trending tags based on popularity
  • Search Suggestions: Intelligent search suggestions
  • Advanced Filters: Filter by date, popularity, and content type

🎨 Design Features

  • Modern UI: Clean, professional design
  • Dark Mode: System preference detection with manual toggle
  • Responsive: Perfect experience on all devices
  • Loading States: Smooth animations and skeleton screens
  • Accessibility: WCAG 2.1 AA compliant

πŸ“± Progressive Web App

  • Offline Support: Basic offline functionality
  • App-like Experience: Native app feel
  • Push Notifications: (Optional) Article update notifications
  • Install Prompt: Add to home screen functionality

πŸ”’ Security & Privacy

  • Privacy Policy: Comprehensive privacy policy
  • Terms of Service: Clear terms and conditions
  • Security Headers: Proper security headers implementation
  • GDPR Compliance: Privacy-focused design
  • Content Security Policy: XSS protection

πŸš€ Deployment

Cloudflare Pages (Recommended)

  1. Connect your GitHub repository to Cloudflare Pages
  2. Set build command: npm run build
  3. Set output directory: public
  4. Deploy automatically on push

Other Platforms

  • Netlify: Works out of the box
  • Vercel: Gatsby support included
  • GitHub Pages: Static deployment ready

πŸ“Š Analytics & Monitoring

  • Google Analytics 4: User behavior tracking
  • Search Console: SEO performance monitoring
  • Core Web Vitals: Performance monitoring
  • Error Tracking: Built-in error boundaries

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Dev.to for providing the API and inspiration
  • Gatsby for the amazing framework
  • The developer community for continuous inspiration and feedback

πŸ“ž Support

For support, email hello@devhub.dev or create an issue in this repository.


Built with ❀️ for the developer community

About

Dev Articles

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published