Code Monkey home page Code Monkey logo

flutter_riverpod_strapi's Introduction

Flutter Riverpod Strapi

GitHub stars GitHub forks GitHub watchers

GitHub license platform Open Source Love

Quick start

This is a normal flutter app. You should follow the instructions in the official documentation. This project uses Riverpod to separate the business logic with UI itself. And also on this project uses Clean Architecture approach to separate each feature.

Structure ๐Ÿ”ฅ

โ”œโ”€โ”€ lib
โ”‚   โ”œโ”€โ”€ core
โ”‚   โ”‚   โ”œโ”€โ”€ api
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ endpoints.dart
โ”‚   โ”‚   โ”œโ”€โ”€ constant
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ constant.dart
โ”‚   โ”‚   โ”œโ”€โ”€ database
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ database.dart
โ”‚   โ”‚   โ”œโ”€โ”€ helper
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ app_exception.dart
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ app_router.dart
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ network_detector.dart
โ”‚   โ”‚   โ””โ”€โ”€ http
โ”‚   โ”‚       โ”œโ”€โ”€ api_provider.dart
โ”‚   โ”‚       โ””โ”€โ”€ api_response.dart
โ”‚   โ”œโ”€โ”€ features
โ”‚   โ”‚   โ”œโ”€โ”€ contact
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ data
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ database
โ”‚   โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ contact_db.dart
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ datasource
โ”‚   โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ contact_datasource.dart
โ”‚   โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ contact_local_datasource.dart
โ”‚   โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ contact_remote_datasource.dart
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ dto
โ”‚   โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ contact_dto.dart
โ”‚   โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ error_dto.dart
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ model
โ”‚   โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ contact_model.dart
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ state
โ”‚   โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ contact_state.dart
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ domain
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ provider
โ”‚   โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ contact_provider.dart
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ repository
โ”‚   โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ contact_repository_impl.dart
โ”‚   โ”‚   โ”‚   โ”‚       โ””โ”€โ”€ contact_repository.dart
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ presentation
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ screen
โ”‚   โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ create_screen.dart
โ”‚   โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ detail_screen.dart
โ”‚   โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ edit_screen.dart
โ”‚   โ”‚   โ”‚       โ”‚   โ””โ”€โ”€ list_screen.dart
โ”‚   โ”‚   โ”‚       โ””โ”€โ”€ widget

Features

  • Add, Edit and Remove Contact
  • Rest API from Strapi
  • Offline database
  • Script manager with derry
  • Clean Architecture

Banner Design

feed example feed example feed example feed example

Built With ๐Ÿ› 

  • Clean Architecture - The blueprint for a modular system, which strictly follows the design principle called separation of concerns.
  • Dartz - Functional Programming in Dart
  • Derry - A script manager to help you define script shortcuts and use them effortlessly
  • Dio - A type-safe HTTP client.
  • Freezed - Code generation for immutable classes
  • Go Router - Route management Flutter
  • Isar Database - Local Database
  • Riverpod - State management with upgrade from provider
  • Strapi API - Handle rest api from Headless CMS
  • Handle State - (Loading, No Data, Has Data, Error)

Author

  • Miftahul Huda

Don't forget to follow me, fork and give me a โญ

How to run app

Install package

flutter pub get

Run in terminal to generate freezed file

derry build

Copy .env.example to .env and fill credential from Strapi

// assets/.env

API_KEY_STRAPI=xxx
API_BASE_URL=xxx

Strapi Setup

Install Strapi in your local computer

Run project

npm start

Create collection structure like this

feed example

flutter_riverpod_strapi's People

Contributors

iniakunhuda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.