Skip to content

ronanrodrigo/carbrito

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Car 🐐

codebeat badge Build Status codecov

Built with enviroment

  • Xcode 9.0 beta 6
  • Swift 4.0

Setup

  1. If you does not have Cocoapod: gem install cocoapod
  2. Install pods: pod install
  3. Open open Carbrito.xcworkspace
  4. To use fastlane: https://github.com/ronanrodrigo/carbrito/tree/master/Fastlane

Structure

β”Œβ”€β”€ <Module Name>
β”‚Β Β  β”œβ”€β”€ Core ───────────→ Itens without third party dependencies;
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ Entities ───→ Entities from Clean Architecture. Is where all domain logic lives;
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ Gateways ───→ Gateways protocols. Used to get data from anywhere;
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ Presenters ─→ Presenter protocols. Used to present data from anywhere;
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ Routers ────→ Routers protocols. Used to navigate to anywhere;
β”‚Β Β  β”‚Β Β  └── Usecases ───→ Usecase from Clean Architecture. Is where all app logic lives;
β”‚Β Β  β”œβ”€β”€ Factories ──────→ Agnostic to Architecture. Used to symplify D.I. and object constructions;
β”‚Β Β  β”œβ”€β”€ Controllers ────→ Just controller. Does not know about UI stuffs like events and elements;
β”‚Β Β  β”œβ”€β”€ Gateways ───────→ Concrete implementation of gateways. Ex. knows about network or database;
β”‚Β Β  β”œβ”€β”€ Routers ────────→ Concrete implementation of routers. Ex. knows about navigation controller;
β”‚Β Β  └── Views ──────────→ UI elements and events are placed here;
β”œβ”€β”€ Common ─────────────→ Shared stuffs accros modules;
└── Essentials ─────────→ Essential stuffs for the UIAppliction.

Main flow

β”Œβ†’ View ─────────→ Controller ─────────→ Usecase ─────────→ Gateway?/Presenter? ┐
| View                                                                          |
| Where user interaction are fired. Ex. Button tapped;                          |
|                                                                               |
| Controller                                                                    |
| Call usecase to execute user interaction;                                     |
|                                                                               |
| Usecase                                                                       |
| Business logic;                                                               |
|                                                                               |
| Gateway                                                                       |
| Optional, used to get data from anywhere. Ex. Make a HTTP request.            |
| Generaly injected in usecase;                                                 |
|                                                                               |
| Presenter                                                                     |
| Optional, used to present data to anywhere. Ex. Update view;                  |
| Generaly injected in usecase;                                                 |
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β†β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β†β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β†β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β†β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🐐 Goat in Brazil is called by Cabrito.

About

Car average prices based on Fipe API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published