Skip to content

Offline-first iOS assignment using Core Data, MVVM, and mock sync.

Notifications You must be signed in to change notification settings

Akash-R97/AirFiNewsPanel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AirFi News Panel πŸ“° (iOS Assignment)

This iOS application simulates the AirFi News Panel β€” a secure internal platform for managing article submissions and approvals. Built using Swift, Core Data, and MVVM, it emphasizes clean architecture, offline-first capabilities, and professional UI practices.


✨ Features

  • πŸ”’ Login Flow for Author and Reviewer roles
  • ✍️ Author Panel to:
    • View your own articles
    • Sync articles to server (mocked)
  • βœ… Reviewer Panel to:
    • View unapproved articles grouped by author
    • Select & approve articles
    • Persist approval state locally
  • πŸ” Offline-First Design
    • All data stored in Core Data
    • No external APIs or backend β€” purely mock-driven
  • πŸ”ƒ Pagination on Reviewer side for performance
  • πŸ“± Fully adaptive UI built with UIKit and AutoLayout

πŸ›  Architecture

  • MVVM with Service + Repository layers
  • Core Data for persistent local storage
  • MockAPIService to simulate network sync
  • AutoSyncManager to sync data only when local changes exist

πŸ“‚ Project Structure

AirFiNewsPanel/
β”‚
β”œβ”€β”€ Models/
β”‚   β”œβ”€β”€ ArticleMetadata
β”‚   └── ArticleDetail
β”‚
β”œβ”€β”€ DTOs/
β”‚   β”œβ”€β”€ ArticleMetadataDTO.swift
β”‚   └── ArticleDetailDTO.swift
β”‚
β”œβ”€β”€ Services/
β”‚   └── MockAPIService.swift
β”‚
β”œβ”€β”€ Repository/
β”‚   └── ArticleRepository.swift
β”‚
β”œβ”€β”€ ViewModels/
β”‚   β”œβ”€β”€ AuthorNewsViewModel.swift
β”‚   └── ReviewerNewsViewModel.swift
β”‚
β”œβ”€β”€ Views/
β”‚   β”œβ”€β”€ AuthorNewsViewController.swift
β”‚   β”œβ”€β”€ ReviewerNewsViewController.swift
β”‚   └── ReviewerNewsTableViewCell.swift

πŸ§ͺ Testing Guidelines

  • βœ… Verify login and role-based redirection
  • βœ… Test Author sync functionality
  • βœ… Scroll and approve articles as Reviewer
  • βœ… Ensure state persists across app launches
  • βœ… Check pagination & UI rendering for large datasets

πŸš€ Getting Started

  1. Clone the repo

    git clone https://github.com/your-username/AirFiNewsPanel.git
  2. Open in Xcode 15+

  3. Run on simulator or device


πŸ“Œ Notes

  • Only articles with new local changes are synced.
  • Approved articles are filtered out per reviewer’s name.
  • approvedBy is stored as [String] in Core Data using a value transformer.

πŸ‘¨β€πŸ’» Author

Akash Razdan
LinkedIn β€’ iOS Developer


🧠 About This Repo

This project was built as part of a professional take-home assignment for AirFi. It follows industry practices in architecture, code quality, and design. Structured to support discussion in interviews and system design rounds.

About

Offline-first iOS assignment using Core Data, MVVM, and mock sync.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages