Giter Site home page Giter Site logo

guptapriyanshu7 / fluttershare Goto Github PK

View Code? Open in Web Editor NEW
14.0 1.0 8.0 713 KB

An Instagram clone app made with Flutter and Firebase.

License: MIT License

Kotlin 0.11% Swift 0.33% Objective-C 0.03% Dart 92.35% HTML 2.26% JavaScript 4.92%
flutter dart app bloc firebase ddd-architecture social-media android flutter-hooks dartz

fluttershare's Introduction

FlutterShare

GitHub issues GitHub license GitHub stars GitHub forks

An Instagram clone app made with flutter and Firebase.

Screenshots

Features

  • Sign In with email/password or google account.
  • Create post with caption and live location.
  • Like posts.
  • Comment on posts and view all comments on a post.
  • Follow users using search.
  • Timeline based on who you follow (using firebase functions).
  • Notifications on other users activity.
  • Activity Feed showing recent likes/comments on your posts and who followed you.
  • See followers/following/total posts count.
  • Edit your profile.

Folder Structure

lib
├───application (State Management code using bloc)
│   ├───auth (Checks whether user is authenticated.)
│   │   └───sign_in_form (Sign In/Register using email/password or google.)
│   ├───post (View post(s))
│   │   └───save_post (Create posts logic.)
│   └───user_actions (Follow, like, comments, profile logic.)
├───domain (All the models, errors and exceptionns that could occur.)
│   ├───auth
│   ├───core
│   ├───posts
│   └───user_actions
├───helper (Get current location.)
├───infrastructure (Firebase related code.)
│   ├───auth
│   ├───core
│   ├───post
│   └───user_actions
└───presentation (UI)
    ├───activity_feed (Main page after signing in.)
    ├───auth (Sign in form UI)
    │   └───widgets
    ├───comments (Comments page.)
    ├───post
    │   └───widgets
    ├───profile
    │   └───widgets
    ├───routes (Route handling)
    ├───search
    └───splash (Checks user was logged in or not, display app icon.)

Local Setup

  • To contribute to this project, fork and then clone the forked repository otherwise directly clone this repository.
  • Create a firebase account if not already.
  • Create a new project in firebase.
  • Go to settings and add android to your projeect.
  • Remember the package name you give to your application.
  • Add SHA-1 key by running keytool -list -v -alias androiddebugkey -keystore ~/.android/debug.keystore in your terminal. When asked for a password enter android. Copy the SHA-1 key and paste it in firebase where it was asked.
  • Download the google-services.json and place it in android/app folder.
  • Now, in android/app/build.gradle file change line 37 to your own applicationId which you gave in step 5 above.
  • In firebase, enable the Firestore Database, and Authentication services. In the Authentication service make sure to add Email-Password and Google Auth providers for sign-in and sign-up features to work.
  • Run flutter pub get.
  • Run flutter pub run build_runner build --delete-conflicting-outputs to generate build files.
  • Run flutter run to run the app in your android emulator/device.
  • Start Hacking :)

N.B. - The activity feed and notification feature will not work till now by the above setup. For that you need to upgrade your firebase account to blaze or higher to deploy functions to firebase. There is a functions folder in the project for that. Follow these steps -

  • Run npm install -g firebase-tools.
  • Login into firebase using firebase login.
  • Run firebase init functions.
  • Select your firebase project. Then JavaScript, for ESLint you can press N. Don't overwrite any file or the code will be lost, press N in all of them, 3 to be precise. When asked to install dependencies with npm, press Y.
  • Finally, run firebase deploy --only functions.

License

FlutterShare is licensed under the MIT License, © 2021 Priyanshu Gupta. See LICENSE for more details.

fluttershare's People

Contributors

guptapriyanshu7 avatar

Stargazers

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

Watchers

 avatar

fluttershare's Issues

[Code Quality] Refactoring code.

There are a lot of places where refactoring can be done to make the code look neat. Break bigger widgets into smaller ones to improve readability.

[Feature] Add edit profile functionality.

Current Situation:
Currently, there is no way a user could update their profile, only a dummy edit profile button is provided.

Expectation:
Expected a edit profile functionality from ground up, i.e. from the domain layer. Use the user collection from firestore to change data.

Error while deploying the code to Firebase Functions ( Already upgraded to Blaze plan)

The deployment of functions is returning this error:
{"code":403,"message":"Unable to retrieve the repository metadata for projects/igclone-aa060/locations/us-central1/repositories/gcf-artifacts. Ensure that the Cloud Functions service account has 'artifactregistry.repositories.list' and 'artifactregistry.repositories.get' permissions. You can add the permissions by granting the role 'roles/artifactregistry.reader'.","status":"PERMISSION_DENIED"}}

Even though everything has been done correctly. Please let me know why is this happening?

[UI] Use different text fields for login and signup.

Currently both login and signup use same text fields.
Expected to tweak the UI to accept other values as well (name, e-mail and bio) at the time of registration (signup) which has to be stored in the user collection.

[Feature] Implement delete post in UI.

Current Situation: The delete feature is already coded in the infrastructure and application layer but is missing its functionality completely in UI, i.e. presentation layer.

Expectation: Complete the delete functionality in the UI.

Relevant files:-
https://github.com/guptapriyanshu7/FlutterShare/blob/main/lib/presentation/profile/widgets/single_post.dart (To be modified.)
https://github.com/guptapriyanshu7/FlutterShare/blob/main/lib/application/post/post_bloc.dart
https://github.com/guptapriyanshu7/FlutterShare/blob/main/lib/infrastructure/post/post_repository_impl.dart

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.