Skip to content

Repository files navigation

Git Snaps πŸ“š

A modern, interactive platform for learning Git through hands-on tutorials and labs. Built with React, Vite, and Tailwind CSS, Git Snaps transforms static documentation into dynamic, visual learning experiences.

preview

React 19 Vite 8 Tailwind CSS 4 React Router 7 Cloudflare Workers

🎯 Mission

Version control systems often trip up developers early on. Git Snaps is engineered to deliver highly visual, front-end compiled tutorials directly from markdown documents, breaking down complex Git concepts like branch configurations, remote tracking, and merge conflict resolutions into digestible, hands-on lessons.

✨ Features

  • πŸ“– Comprehensive Git Tutorials: In-depth blog posts covering Git fundamentals, branching strategies, remote repositories, and advanced workflows
  • πŸ› οΈ Hands-On Labs: Practical exercises paired with tutorials to reinforce learning through practice
  • 🎨 Dynamic Markdown Rendering: Vite's raw dynamic module imports compile markdown directly into interactive client views
  • πŸ“± Fully Responsive Design: Optimized for all devices with a modern, accessible UI
  • πŸŒ™ Dark Mode Support: Integrated theme switching with Tailwind CSS custom properties
  • ⚑ Lightning-Fast Search: Client-side full-text search powered by FlexSearch, delivering instant results without server calls
  • πŸ“Š Interactive Diagrams: Built-in Mermaid support for visualizing Git workflows and concepts
  • 🎯 Code Highlighting: Syntax-highlighted code examples using React Syntax Highlighter
  • πŸ”— Seamless Navigation: React Router-based SPA with smooth transitions
  • βš™οΈ Static Site Generation: Built with Vite for optimal performance and fast load times
  • πŸ”– Bookmarking: Save your progress and revisit tutorials or labs with a simple click

πŸ—οΈ Technical Architecture

Core Stack

  • React 19: Modern UI framework with hooks and latest features
  • Vite 8: Lightning-fast build tool with HMR for development
  • Tailwind CSS 4: Utility-first CSS framework with custom theme properties
  • React Router 7: Client-side routing for seamless navigation
  • Cloudflare Workers: Serverless deployment with Wrangler

Rendering & Content

  • React Markdown: Convert markdown files into React components
  • Mermaid 11: Diagram generation for Git workflow visualizations
  • React Syntax Highlighter: Beautiful code syntax highlighting
  • Remark GFM: GitHub Flavored Markdown support

Performance

  • 100% Static Compilation: All routes pre-compiled for instant navigation
  • < 100ms Route Transitions: Optimized for snappy user experience
  • Responsive Images: Optimized image handling for posts and thumbnails

πŸ“‚ Project Structure

git-snaps/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/          # Reusable React components
β”‚   β”œβ”€β”€ pages/               # Page components (Home, PostDetail, Labs, etc.)
β”‚   β”œβ”€β”€ context/             # React Context for state management
β”‚   β”œβ”€β”€ hooks/               # Custom React hooks
β”‚   β”œβ”€β”€ utils/               # Utility functions
β”‚   β”œβ”€β”€ App.jsx              # Main app component
β”‚   β”œβ”€β”€ main.jsx             # Entry point
β”‚   └── index.css            # Global styles
β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ markdown/
β”‚   β”‚   β”œβ”€β”€ posts/           # Blog post markdown files
β”‚   β”‚   └── labs/            # Lab markdown files
β”‚   └── images/
β”‚   β”‚   └── posts/           # Post thumbnail images
|   β”‚   |── labs/            # Lab images
β”‚   └── README.md            # Posts and Labs tables   
|   └── data/
|       └── blogMetadata.js  # Metadata for blog posts and labs
β”œβ”€β”€ eslint.config.js         # ESLint configuration
β”œβ”€β”€ vite.config.js           # Vite build configuration
β”œβ”€β”€ wrangler.jsonc           # Cloudflare Workers configuration
└── package.json             # Project dependencies

πŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • npm or yarn

Installation

  1. Clone the repository

    git clone https://github.com/rahafebx/git-snaps.git
    cd git-snaps
  2. Install dependencies

    npm install
  3. Start the development server

    npm run dev

    Open http://localhost:5173 in your browser

Available Scripts

  • npm run dev - Start Vite development server with hot reload
  • npm run build - Build optimized production bundle
  • npm run lint - Run ESLint to check code quality
  • npm run preview - Build and preview locally before deployment
  • npm run deploy - Build and deploy to Cloudflare Workers

πŸ“ Content Structure

Blog Posts

Posts are located in public/markdown/posts/ and referenced in public/data/blogMetadata.js. Each post includes:

  • Markdown content with GFM support
  • Thumbnail images
  • Metadata (title, slug, category, tags, author, date)
  • Related labs

Labs

Hands-on exercises are in public/markdown/labs/ with metadata defined alongside posts. Each lab includes:

  • Step-by-step instructions
  • Code examples
  • Practice exercises
  • Reference to parent blog post

🎨 Customization

Theme Configuration

Tailwind CSS v4 properties are processed through custom variant selectors in the src/index.css. Modify theme colors and styles directly through Tailwind configuration or CSS custom properties.

Adding New Content

Adding a Blog Post:

  1. Create markdown file in public/markdown/posts/
  2. Add metadata entry in public/data/blogMetadata.js
  3. Add thumbnail image to public/images/posts/
  4. Update public/markdown/README.md with new post details

Adding a Lab:

  1. Create markdown file in public/markdown/labs/
  2. Link in metadata under parent post's labs array
  3. Update public/markdown/README.md with new lab details

πŸ” Key Components

  • PostDetail.jsx - Renders individual blog posts with table of contents
  • LabDetails.jsx - Displays lab content with navigation
  • MarkdownContent.jsx - Dynamic markdown rendering with syntax highlighting
  • FloatingTOC.jsx - Auto-generated table of contents from headings
  • CategoryFilter.jsx - Filter posts by category
  • MermaidDiagram.jsx - Render diagram blocks in markdown

πŸ“œ License

This project is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License, the same terms as the original Pro Git book by Scott Chacon and Ben Straub.

Creative Commons License

πŸ‘ Acknowledgments

  • Scott Chacon and Ben Straub for the outstanding Pro Git book
  • The Git community for building and maintaining this powerful tool
  • Contributors and learners who make this project better

πŸ’¬ Support & Feedback

Have questions or suggestions? We'd love to hear from you:


Happy learning! Master Git, one snap at a time! πŸš€

About

A modern, interactive platform for learning Git through hands-on tutorials and labs. Built with React, Vite, and Tailwind CSS, Git Snaps transforms static documentation into dynamic, visual learning experiences.

Topics

Resources

Code of conduct

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages