GitHunt
HA

hasan-psl/linux-reincarnation

Linux distribution catalogue website. A modern, blazing-fast website built with Next.js, Tailwind CSS, and Framer Motion.

That time I got reincarnated as a Linux distribution

A modern, blazing-fast website built with Next.js, Tailwind CSS, and Framer Motion.

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 18+ installed on your computer
  • npm (comes with Node.js)

Installation & Running

  1. Navigate to the project folder:

    cd linux-reincarnation
  2. Install dependencies (if you haven't already):

    npm install
  3. Start the development server:

    npm run dev
  4. Open your browser:

๐Ÿ“ Project Structure Explained (Simple Terms)

linux-reincarnation/
โ”œโ”€โ”€ app/                          # Main application folder
โ”‚   โ”œโ”€โ”€ components/               # Reusable components (like LEGO blocks)
โ”‚   โ”‚   โ”œโ”€โ”€ DarkModeProvider.tsx  # Manages dark/light mode for entire site
โ”‚   โ”‚   โ””โ”€โ”€ DarkModeToggle.tsx    # The button to switch dark/light mode
โ”‚   โ”œโ”€โ”€ globals.css               # Global styles (affects entire website)
โ”‚   โ”œโ”€โ”€ layout.tsx                # Main layout (wraps all pages)
โ”‚   โ””โ”€โ”€ page.tsx                  # Homepage (what visitors see first)
โ”œโ”€โ”€ public/                       # Static files (images, icons, etc.)
โ”œโ”€โ”€ package.json                  # Lists all dependencies (packages we use)
โ””โ”€โ”€ README.md                     # This file!

๐ŸŽฏ What Each Part Does (Beginner-Friendly)

1. Next.js App Router

  • What it is: A framework that makes building websites easier
  • Why we use it: It's fast, modern, and handles routing automatically
  • Think of it as: The foundation of your house

2. Tailwind CSS

  • What it is: A CSS framework with pre-made utility classes
  • Why we use it: Instead of writing lots of CSS, you use classes like bg-blue-500 or text-center
  • Example: <div className="bg-blue-500 text-white"> makes a blue background with white text
  • Think of it as: A box of pre-made decorations for your house

3. Dark Mode

  • What it is: A feature that lets users switch between light and dark themes
  • How it works:
    • DarkModeProvider.tsx - Manages the dark mode state (remembers user's choice)
    • DarkModeToggle.tsx - The button users click to switch themes
    • The dark: prefix in Tailwind classes applies styles only in dark mode
  • Example: bg-white dark:bg-gray-800 means white background in light mode, gray in dark mode
  • Think of it as: A light switch for your entire website

4. Framer Motion

  • What it is: A library for creating smooth animations
  • Why we use it: Makes your website feel alive and interactive
  • Common uses:
    • initial - How element looks when page first loads
    • animate - How element looks after animation
    • whileHover - What happens when you hover over it
    • transition - How fast/smooth the animation is
  • Example: Cards that lift up when you hover over them
  • Think of it as: Special effects for your website

5. TypeScript

  • What it is: JavaScript with type checking
  • Why we use it: Catches errors before they happen, makes code easier to understand
  • Think of it as: A spell-checker for your code

๐ŸŽจ Key Features

โœ… Dark Mode Toggle - Click the button in the top-right to switch themes
โœ… Smooth Animations - Everything animates beautifully when the page loads
โœ… Responsive Design - Works perfectly on phones, tablets, and computers
โœ… Fast Performance - Built with Next.js for optimal speed
โœ… Modern UI - Beautiful gradient backgrounds and card layouts

๐Ÿ“ Common Commands

# Start development server (for testing your changes)
npm run dev

# Build for production (creates optimized version)
npm run build

# Start production server (after building)
npm start

# Check for code errors
npm run lint

๐Ÿ› ๏ธ Making Changes

To change the homepage:

  • Edit app/page.tsx
  • Save the file
  • The browser will automatically refresh (hot reload)

To change colors/styles:

  • Edit app/globals.css for global styles
  • Or use Tailwind classes directly in components

To add a new page:

  • Create a new file in the app folder (e.g., app/about/page.tsx)
  • It will automatically be available at /about

๐ŸŽ“ Learning Resources

๐Ÿ’ก Tips for Beginners

  1. Don't be afraid to experiment! Change colors, text, and see what happens
  2. Use the browser's developer tools (F12) to inspect elements
  3. Read the comments in the code - they explain what each part does
  4. Start small - modify one thing at a time to understand how it works
  5. Save often - Next.js will automatically reload when you save

๐Ÿš€ Deployment

Ready to put your website on the internet? Check out the Deployment Guide for step-by-step instructions!

Quick Summary:

  1. Push your code to GitHub
  2. Connect to Vercel (free hosting)
  3. Deploy with one click!

Updating your site: Just push changes to GitHub - Vercel automatically redeploys! โœจ

See DEPLOYMENT.md for the complete guide.

๐Ÿ› Troubleshooting

Problem: Website won't start
Solution: Make sure you're in the linux-reincarnation folder and run npm install

Problem: Dark mode button doesn't work
Solution: Make sure you're using a modern browser (Chrome, Firefox, Safari, Edge)

Problem: Changes don't appear
Solution: Check the terminal for errors, or try stopping (Ctrl+C) and restarting with npm run dev

Problem: Build fails
Solution: Run npm run build locally first to catch errors before deploying


Happy coding! ๐ŸŽ‰