Skip to content

dheerajghub/SwiggyClone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SwiggyClone

A pixel-faithful iOS clone of Swiggy built with UIKit and UICollectionViewCompositionalLayout

Stars Forks Platform Swift UIKit


About

SwiggyClone is an iOS application that faithfully recreates the Swiggy food delivery app UI. The primary goal is to master UICollectionViewCompositionalLayout — Apple's modern, declarative layout engine — by using it to build Swiggy's complex, multi-section home feed with mixed layout types all within a single collection view.

This project is a hands-on deep dive into:

  • UICollectionViewCompositionalLayout — orthogonal scrolling, nested groups, decorations
  • UICollectionViewDiffableDataSource — snapshot-based, type-safe data management
  • Custom UICollectionViewCell design with Auto Layout
  • Multi-section feeds with heterogeneous layouts
  • UIKit best practices for complex, production-grade screens

Tech Stack

Layer Technology
Language Swift
UI Framework UIKit
Layout Engine UICollectionViewCompositionalLayout
Data Source UICollectionViewDiffableDataSource
Build Tool Xcode
CI GitHub Actions

Repository Structure

SwiggyClone/
│
├── SwiggyClone.xcodeproj/          ← Xcode project file
│   └── project.pbxproj
│
├── SwiggyClone/                    ← Main source directory
│   ├── AppDelegate.swift
│   ├── SceneDelegate.swift
│   │
│   ├── Controllers/                ← View Controllers
│   │   └── HomeViewController.swift
│   │
│   ├── Views/                      ← Custom cells & reusable views
│   │   ├── Cells/
│   │   └── Headers/
│   │
│   ├── Models/                     ← Data models
│   │
│   ├── Resources/                  ← Assets, fonts, colors
│   │   └── Assets.xcassets
│   │
│   └── Supporting Files/
│       └── Info.plist
│
├── .github/
│   └── workflows/                  ← GitHub Actions CI config
│
└── README.md

Note: The source folder structure above reflects the standard UIKit project layout. Explore the SwiggyClone/ directory on GitHub for the exact file list.


Getting Started

Requirements

  • Xcode 14+
  • iOS 14+ deployment target
  • Swift 5.7+

Installation

# 1. Clone the repository
git clone https://github.com/dheerajghub/SwiggyClone.git

# 2. Open in Xcode
cd SwiggyClone
open SwiggyClone.xcodeproj
  1. Select a simulator or connected device
  2. Hit Cmd + R to build and run

No external dependencies or package managers required — pure UIKit, zero setup friction.


Screenshots


Key Concepts Covered

UICollectionViewCompositionalLayout — the backbone of the entire UI. Each section of the feed is built with a distinct layout — horizontal carousels, grid-style cards, banner-sized items — all composed declaratively and rendered in a single collection view.

DiffableDataSource — snapshot-based updates for smooth, animation-friendly data changes without manual reloadData() calls.

Orthogonal Scrolling — sections that scroll independently in a direction different from the main feed (e.g., horizontally scrolling restaurant chips inside a vertically scrolling feed).

Supplementary Views — section headers and footers that pin, scroll, or float using compositional layout's boundary supplementary items.


Support

If this project helped you learn something new, a ⭐️ on the repo goes a long way!

For questions or issues, reach out at dheerajsh123456@gmail.com

Buy Me a Coffee


© Dheeraj Kumar Sharma · 2026

About

In this project we will dive deep into UICompositional Layouts and alot of new concepts.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages