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
-
Navigate to the project folder:
cd linux-reincarnation -
Install dependencies (if you haven't already):
npm install
-
Start the development server:
npm run dev
-
Open your browser:
- Go to http://localhost:3000
- You should see your website!
๐ 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-500ortext-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-800means 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 loadsanimate- How element looks after animationwhileHover- What happens when you hover over ittransition- 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.cssfor global styles - Or use Tailwind classes directly in components
To add a new page:
- Create a new file in the
appfolder (e.g.,app/about/page.tsx) - It will automatically be available at
/about
๐ Learning Resources
- Next.js Docs: nextjs.org/docs
- Tailwind CSS Docs: tailwindcss.com/docs
- Framer Motion Docs: framer.com/motion
๐ก Tips for Beginners
- Don't be afraid to experiment! Change colors, text, and see what happens
- Use the browser's developer tools (F12) to inspect elements
- Read the comments in the code - they explain what each part does
- Start small - modify one thing at a time to understand how it works
- 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:
- Push your code to GitHub
- Connect to Vercel (free hosting)
- 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! ๐