Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sd10/nora
Nora is a Firebase abstraction layer for FirebaseDatabase and FirebaseStorage
https://github.com/sd10/nora
database firebase firebase-database firebasestorage networking open-source swift swift3
Last synced: about 1 month ago
JSON representation
Nora is a Firebase abstraction layer for FirebaseDatabase and FirebaseStorage
- Host: GitHub
- URL: https://github.com/sd10/nora
- Owner: SD10
- License: mit
- Created: 2017-04-05T00:25:09.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-19T15:03:42.000Z (over 6 years ago)
- Last Synced: 2024-10-12T14:22:48.047Z (about 1 month ago)
- Topics: database, firebase, firebase-database, firebasestorage, networking, open-source, swift, swift3
- Language: Swift
- Homepage:
- Size: 45.1 MB
- Stars: 269
- Watchers: 9
- Forks: 26
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
---
Nora is a Firebase abstraction layer for working with FirebaseDatabase and FirebaseStorage.
Stop spending all that time cleaning up your view controllers and trying to write reusable Firebase code.
Let Nora handle that for you. Your time is better spent on what you do best. Writing great Apps!
Simply put, working with Firebase just got whole lot easier.
---
## Installation
### [CocoaPods](https://cocoapods.org) Recommended
```rb
pod 'Nora'
```## Example
### Working with FirebaseDatabase
After [setting up a target](https://github.com/SD10/Nora/blob/master/Documentation/Examples/DatabaseProviderExample.md) making requests is simple.
```swift
let database = DatabaseProvider()
database.request(.getUser(id: "1")) { result in
switch result {
case .success(let response):
let snapshot = response.snapshot
case .failure(let error):
print(error.localizedDescription)
}
}```
### Database Response Decoding
Provide a JSON initializer for your custom types and easily convert the database response:
```swift
let database = DatabaseProvider()
database.request(.getUser(id: "1")) { result in
switch result {
case .success(let response):
let user = try? response.mapTo(User.init)
case .failure(let error):
print(error.localizedDescription)
}
}```
---
### Working with FirebaseStorage
```swift
let storage = StorageProvider()
let avatarData = Data()
var meta = FIRStorageMetadata?storage.request(.upload(avatarData, meta)) { result in
switch result {
case .success(_):
print("Upload Success!")
case .failure(let error):
print(error.localizedDescription)
}
}```
---
## Documentation (In Progress)
[DatabaseTarget Documentation](https://github.com/SD10/Nora/blob/master/Documentation/Documentation/DatabaseTargetDocs.md)
[DatabaseProvider Documentation](https://github.com/SD10/Nora/blob/master/Documentation/Documentation/DatabaseProviderDocs.md)
---
## Get involved
You can contribute to this project in more ways than just code:
- Improving the README
- Improving Documentation
- Bug reporting
- New feature suggestions
- Answering questionsWe really encourage everyone to get involved in open source.
Your feedback is always welcome and much appreciated!
REGARDLESS, of your level of experience.
You will never be put down for having an opinion. So take a chance, open a pull request, or submit that issue!
---
## Inspiration
This project was inspired and based off the [Moya](https://github.com/Moya/Moya) networking abstraction layer in Swift.
Check out their project if you're using traditional networking!
---
## License
Nora is released under an MIT license. See [LICENSE.md](https://github.com/SD10/Nora/blob/master/LICENSE.md) for more information.