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, decorationsUICollectionViewDiffableDataSource— snapshot-based, type-safe data management- Custom
UICollectionViewCelldesign with Auto Layout - Multi-section feeds with heterogeneous layouts
- UIKit best practices for complex, production-grade screens
| Layer | Technology |
|---|---|
| Language | Swift |
| UI Framework | UIKit |
| Layout Engine | UICollectionViewCompositionalLayout |
| Data Source | UICollectionViewDiffableDataSource |
| Build Tool | Xcode |
| CI | GitHub Actions |
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.
- Xcode 14+
- iOS 14+ deployment target
- Swift 5.7+
# 1. Clone the repository
git clone https://github.com/dheerajghub/SwiggyClone.git
# 2. Open in Xcode
cd SwiggyClone
open SwiggyClone.xcodeproj- Select a simulator or connected device
- Hit Cmd + R to build and run
No external dependencies or package managers required — pure UIKit, zero setup friction.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
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.
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












