Skip to content

medartus/feedmyflow

Repository files navigation

Build Status Coverage Status

Feed My Flow

Feed My Flow is open source web application that provides easy scheduling LinkedIn posts.

Table of Contents

How It Works

We use the React framework for the front end part and firebase for all the back end part.

Archi

Firebase

Firebase is a great tool for developers to create a very cheap, fast and scalable application. Here we use some of their products such as:

  • Cloud Functions
  • Cloud Firestore
  • Authentification
  • Hosting

Cloud Functions

Cloud Functions are the serverless backend module from Firebase. We don't need anymore to have our backend that runs all the time waiting for requests. Cloud functions allow us to only execute our code when we need it.

On cloud functions we handle some functionality:

I. Login

We connect to LinkedIn API to allow users to give us the credentials we need to create their accounts and post their content.

II. Welcoming new user

We send a welcome email to every new user. The function is run by a trigger on the Firebase Authentification part.

III. Posting content

Every 15 minutes, we check if the user wants to posts something. If there are some, we post their content on LinkedIn and send them an email to tell them so.

Cloud Firestore

Cloud Firestore is one of the two NoSQL databases on Firebase. We use the database to store the content of their post and the credentials to connect to the Linkedin API.

Authentification

Firebase Authentification is a very easy way to enable login with email or third party providers such as Google or Facebook. LinkedIn doesn't handle natively by Firebase, this is why we have our own credentials function on Cloud Functions. You can still use the Authentification from firebase if you have some specific token and this what we have with LinkedIn API.

All in all, we store all the essential user's data on Authentification. Authentification provides us a really easy and convenient way to log in without asking the user their credential every time, Firebase Authentification do that for us!

Hosting

Hosting is a very fast and simple way to deploy our website. It provides us SSL security and a cool domain name. We simply build our React project and deploy the new version in a matter of seconds.

Getting Started

Clone the repo

git clone https://github.com/medartus/feedmyflow.git

Frontend Installation

  1. Go to the website folder
cd website
  1. Start the development server
npm start
  1. (Optional) If you want to modify and use your own backend, you need to modify the .env.development file inside the website folder with the new API Url:
REACT_APP_API_URL=http://localhost:5001/dev-feedmyflow/us-central1/

Backend Installation

  1. Create a new firebase project with the default configuration
  2. Install firebase CLI
npm i -g firebase-tools
  1. Select your firebase project by changing your_project_name
firebase use your_project_name
  1. Open .firebaserc and change dev-feedmyflow by your_project_name
  2. Add the development API Keys and other informations
firebase functions:config:set email.password="EMAIL_PASSWORD" email.address="EMAIL_ADDRESS"
firebase functions:config:set linkedin.client_id="LINKEDIN_CLIENT_ID" linkedin.client_secret="LINKEDIN_CLIENT_SECRET"
  1. In the functions folder, save your API credentials locally
cd functions
firebase functions:config:get > .runtimeconfig.json
  1. Set up the Admin credentials locally using the firebase configuration ressources. Put the file in the functions folder with service-account-dev.json

  2. Now you can run locally the backend

firebase emulators:start
  1. (Optional) You can set your rules to secure your database.
rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    match /user/{userId}/post/{postId}{
      allow read, write: if request.auth.uid == userId;
    }
  }
}

License

Feed My Flow ยฉ Marc-Etienne Dartus, Created by Marc-Etienne Dartus, Nicolas Caillieux and Alexandre Zajac. Released under the MIT License.
Maintained with help from contributors.

About

โœ‰๏ธ๐Ÿ“… Free Linkedin post scheduling

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •