https://github.com/levantaj/diggreddit
Digg / Reddit clone with upvote and downvotes
https://github.com/levantaj/diggreddit
fastlane mvvm reddit tdd topic
Last synced: about 3 hours ago
JSON representation
Digg / Reddit clone with upvote and downvotes
- Host: GitHub
- URL: https://github.com/levantaj/diggreddit
- Owner: levantAJ
- Created: 2017-04-24T14:17:45.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-25T07:49:25.000Z (almost 9 years ago)
- Last Synced: 2025-03-25T11:52:19.048Z (11 months ago)
- Topics: fastlane, mvvm, reddit, tdd, topic
- Language: Swift
- Homepage:
- Size: 63.5 KB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DiggReddit
## Swift 3.1
## Pattern - MVVM
The problem with MVC is there are some massive controller, so to maintain and add new features might be painful.
So I'm trying to using MVVM to make sure separate the logic bussiness and the UI
## Structure
### Project
+ **Engine:** Shared classes, enums, structures, or logic, business on backend, networks, parsers, helpers, caches, data store, etc…
- **Manager:** Contains Singleton class to handle Application product, Authentication manager, Push notifications manager, REST manager files
- **Constant:** AppConstants file, RESTConstants file, Constants file,…
- **Utility:** AppUtils file, RESTUtils file, …
- **Config:** Contains everything contribute for configuration app, AppConfig file: Configure all setting in app: Feedback, geting started with third party libraries, configure server’s hosts, configure logger, …
- **Extension:** Extend class / struct / enum
- **Service:** ApiService: Call API, SystemService: Handle system service (Push Notification, …)
- **Persistence:** Store entities here
+ **Model:** Every object in app e.g: User, Topic
+ **ViewModel:** Model for view e.g: TopicsViewModel is model for view of topics
+ **View:** Every module contains View & anything related to front end.
- **Component:** The views that they will be share between multiple screens. With each screen should be has a folder for itself
- **View:** Represent for the screens. With each screen should be has a folder for itself. E.g. Feed: TopicsViewController
+ **Resource:** Can be contains Images, Sounds, Layout config file, etc. Assets.xcassets, Localizable.strings, …
+ **Storyboard:** Put all storyboards at here. With each screen should be has a storyboard file for itself => Reduce conflicts when merge Pull Request
+ **AppDelegate.swift**
+ **Info.plist**
## How it works:
There are 2 main screens:
+ **TopicsTableViewController**: Display the list of Topics, users able to Up/Down vote
+ **NewTopicViewController**: Allow user to contribute topic
## This repository is using Git Flow to manage code:
- Add new feature from on `develop` branch
- After finish the feature, merge to `develop`
- Make a release will go to `release` branch
- Finished release merge to `master`
- Do the hotfix on `hotfix` branch
## Fastlane
To test project without open by XCode: `fastlane scan`