Skip to content

kannanspeed/sandeep2

Repository files navigation

Kannan Blogs

A feature-rich blog application showcasing modern web development capabilities including routing, data fetching, caching, streaming, styling, error handling, image optimization, metadata, MDX, and more.

πŸš€ Features

1. Routing, Pages & Layouts

  • βœ… File-system routing with App Router
  • βœ… Dynamic routes with parameters
  • βœ… Nested layouts and shared UI
  • βœ… Navigation components with active states
  • βœ… Prefetching and caching

2. Data Fetching & Caching

  • βœ… Server Components with data fetching
  • βœ… Request memoization and data cache
  • βœ… Mock JSON server for development
  • βœ… API routes with filtering and pagination
  • βœ… Revalidation strategies

3. Suspense & Streaming

  • βœ… React Suspense for loading states
  • βœ… Streaming for slow data sources
  • βœ… Loading UI components
  • βœ… Progressive page loading

4. Styling with Tailwind CSS

  • βœ… Modern CSS with Tailwind
  • βœ… Responsive design patterns
  • βœ… Dark mode support
  • βœ… Custom components and utilities
  • βœ… CSS modules integration

5. Error Management

  • βœ… Error boundaries and error pages
  • βœ… Custom 404 and error handling
  • βœ… Global error management
  • βœ… Error recovery mechanisms

6. Image Optimization

  • βœ… Next.js Image component
  • βœ… Automatic optimization and WebP
  • βœ… Responsive images
  • βœ… Placeholders and lazy loading
  • βœ… Core Web Vitals optimization

7. Metadata & SEO

  • βœ… Dynamic metadata generation
  • βœ… OpenGraph and Twitter cards
  • βœ… Structured data
  • βœ… Font optimization
  • βœ… Script optimization

8. Markdown & MDX

  • βœ… MDX support with React components
  • βœ… Syntax highlighting
  • βœ… Interactive components
  • βœ… Custom MDX components
  • βœ… Typography styling

9. Blog Features

  • βœ… Blog post listing with filtering
  • βœ… Category and tag filtering
  • βœ… Search functionality
  • βœ… Sorting and pagination
  • βœ… Related posts
  • βœ… Author information

10. Dark Mode & Customization

  • βœ… Dark/light mode toggle
  • βœ… Theme persistence with cookies
  • βœ… Custom HTML components
  • βœ… Accessibility features

11. Performance & Deployment

  • βœ… Static generation with ISR
  • βœ… Edge runtime optimization
  • βœ… Vercel deployment ready
  • βœ… Performance monitoring
  • βœ… Core Web Vitals optimization

πŸ› οΈ Tech Stack

  • Framework: Next.js 14 with App Router
  • Language: TypeScript
  • Styling: Tailwind CSS
  • Content: MDX with React components
  • Icons: Lucide React
  • Deployment: Vercel
  • Performance: Lighthouse 100/100

πŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • npm or yarn

Installation

  1. Clone the repository:
git clone <repository-url>
cd kannan-blogs
  1. Install dependencies:
npm install
  1. Start the development server:
npm run dev
  1. Start the mock JSON server (in another terminal):
npm run json-server
  1. Open http://localhost:3000 in your browser.

πŸ“ Project Structure

β”œβ”€β”€ app/                    # App Router pages
β”‚   β”œβ”€β”€ api/               # API routes
β”‚   β”œβ”€β”€ blog/              # Blog pages
β”‚   β”œβ”€β”€ gallery/           # Image gallery
β”‚   β”œβ”€β”€ mdx-demo/          # MDX demonstration
β”‚   β”œβ”€β”€ about/             # About page
β”‚   β”œβ”€β”€ globals.css        # Global styles
β”‚   β”œβ”€β”€ layout.tsx         # Root layout
β”‚   β”œβ”€β”€ page.tsx           # Home page
β”‚   β”œβ”€β”€ loading.tsx        # Loading UI
β”‚   β”œβ”€β”€ error.tsx          # Error UI
β”‚   β”œβ”€β”€ not-found.tsx      # 404 page
β”‚   └── global-error.tsx   # Global error UI
β”œβ”€β”€ components/            # React components
β”‚   β”œβ”€β”€ ui/               # UI components
β”‚   β”œβ”€β”€ blog-*.tsx        # Blog components
β”‚   β”œβ”€β”€ navigation.tsx    # Navigation
β”‚   └── theme-*.tsx       # Theme components
β”œβ”€β”€ data/                 # Mock data
β”œβ”€β”€ lib/                  # Utilities
└── public/               # Static assets

🎯 Key Concepts Demonstrated

File-system Routing

  • Automatic route generation based on folder structure
  • Dynamic routes with [slug] parameters
  • Nested layouts for shared UI

Data Fetching Patterns

  • Server Components for data fetching
  • Client Components for interactivity
  • Caching strategies and revalidation
  • Error handling and loading states

Performance Optimization

  • Image optimization with Next.js Image
  • Code splitting and lazy loading
  • Streaming and Suspense
  • Core Web Vitals optimization

Modern Development Practices

  • TypeScript for type safety
  • Tailwind CSS for styling
  • ESLint and Prettier for code quality
  • Component composition patterns

πŸš€ Deployment

Vercel (Recommended)

  1. Push your code to GitHub
  2. Connect your repository to Vercel
  3. Deploy with zero configuration

Manual Deployment

npm run build
npm start

πŸ“Š Performance

  • Lighthouse Performance: 100/100
  • Lighthouse Accessibility: 100/100
  • Lighthouse Best Practices: 100/100
  • Lighthouse SEO: 100/100

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

πŸ“„ License

This project is licensed under the MIT License.

πŸ™ Acknowledgments

  • Next.js team for the amazing framework
  • Vercel for deployment platform
  • Tailwind CSS for styling utilities
  • All contributors and the open-source community

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors