• Stars
    star
    672
  • Rank 67,180 (Top 2 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created almost 4 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

"Fx Fotos" is an opensource gallery app in react native with the same smoothness and features of Google Photos and Apple Photos. It is backend gnostic and connects to decentralized backends like "box", "Dfinity", "Filecoin" and "Crust".

Google Play: https://play.google.com/store/apps/details?id=land.fx.fotos

App Store: https://apps.apple.com/ca/app/fx-fotos/id1640008383

Latest 2 Updates

November-10-2022: Application was approved by App store.

October-26-2022: Application was approved by Google Play.

Discussions

This project is part of a bigger project to disrupt the subscription industry. Join the channel and group to participate in the discussion. https://t.me/functionland

BOX Photos development guide

Note: Project is still in alpha phase and not production ready. We aim to release beta version by end of August 2021.

Intro Blog

Project Description

Photos is a react-native(expo)+typescript application to replace Google Photos/Apple Photos, and give freedom in hosting your photos on any platform, either centralized servers like Amazon or Microsoft, or decentralized solutions such as Dfinity or IPFS-based "box". It is optimized for decentralized platforms, but is backend agnostic. Your can easily use it with the IPFS-based "box" or "Dfinity" to host your files and photos with the same experience you had using Google Photos, however, with full privacy.

Why?

Decentralized Backend(IPFS, Dfinity, Crust, Filecoin) + Photos = Awesome!

Google photos is a great service with great benefits however, there are major setbacks with it:

1- It is not free anymore

2- It does not respect our privacy

We developed this project with the smoothness and features of popular gallery apps in mind to enable anyone jump on and start using it right away. Furthermore, it can connect to "box", a decentralized node based on IPFS and Crust, or Dfinity instead of centralized cloud networks. We are also working on enabling it to connect to centralized cloud networks, however, with web3.0 privacy, do you still want to use web2.0? more information is available in the box repo.

demo

Checkout full demo video at: https://youtu.be/wDxaC1HF5PQ

Or checkout individual features below:

  • Pinch/zoom to switch between modes:
  • https://youtu.be/ioK0zkew--w
  • Opening a single image in fullscreen mode:
  • https://youtu.be/jPVqxPoNH9M
  • Header animation(hide on scroll down and show on scroll up):
  • https://youtu.be/qjfiukClHqQ
  • Highlights/Story:
  • https://youtu.be/yEOnDtT3cX0
  • Fast scroll/Thumb scroll feature:
  • https://youtu.be/QsDzOGyj9cM)
  • Image Edit feature
  • https://youtu.be/SDyCdE_aUso
  • Image select feature
  • https://youtu.be/3IXIoBLGY_4

table of content

Installing Pre-requisites

  • NodeJS/NPM

This application needs NodeJs to run. You can download and install NodeJs from the below link on any platform if you do not have it already. Download NodeJS

you can also check if you already have NodeJs installed by running the following two commands in terminal window

node -v
npm -v
  • Git: You can use git to easily download the files from github into your computer (or if you prefer you can download files manually from this github repository in step 1 of cloning the application) Download Git-Scm

you can also check whether you already have NodeJs installed by running the following command in terminal window

git --version

Now you need to install expo-cli. If you want to know more about expo check their website. Expo

npm install --global expo-cli

Optional: if you prefer yarn you can install yarn.

npm install --global yarn

Clone the project

You can clone the project by running the command below to your terminal:

for https cloning:

git clone https://github.com/functionland/photos.git
cd photos

Install requirements

You can install dependencies with yarn by running:

yarn

Run

Then you can start the debug server using the command below:

yarn run start

At last but not least, for installing the debug version and starting the development process on the emulator or a real device you should run commands below:

IOS

yarn run ios

Android

yarn run android

Packages

  • We used expo Media Library for getting the data from user's phone.
  • We used a modified version of expo-video-player to play videos. It is available in our repo.
  • We used a modified version of react-native-stories-view for the story style view on top of gallery, which is available in our repo.
  • We used RecyclerListView from FlipKart, as the scrollView for the photos.
  • We used react-native-reanimated for animations.
  • We used Recoil for state management.
  • We used react-native-gesture-handler for gesture handling.
  • We used @react-navigation/bottom-tabs and @react-navigation/native for navigation.

Pages structure

For now we have two pages in the app:

  • The HomePage that is the main page for showing the media files.
  • The PermissionError page that is the page we show when there is permission error from user's phone.
  • We are working on creating the "Library" and "Search" pages.

Components structure

β”œβ”€β”€ App.tsx
β”œβ”€β”€ babel.config.js
β”œβ”€β”€ components
β”‚   β”œβ”€β”€ AllPhotos.tsx
β”‚   β”œβ”€β”€ FloatingFilters.tsx
β”‚   β”œβ”€β”€ Header.tsx
β”‚   β”œβ”€β”€ Highlights.tsx
β”‚   β”œβ”€β”€ Media.tsx
β”‚   β”œβ”€β”€ PhotosChunk.tsx
β”‚   β”œβ”€β”€ PhotosContainer.tsx
β”‚   β”œβ”€β”€ PinchZoom.tsx
β”‚   β”œβ”€β”€ RenderPhotos.tsx
β”‚   β”œβ”€β”€ SingleMedia.tsx
β”‚   β”œβ”€β”€ StoryHolder.tsx
β”‚   └── ThumbScroll.tsx
β”œβ”€β”€ index.js

β”œβ”€β”€ metro.config.js
β”œβ”€β”€ navigation
β”‚   └── AppNavigation.tsx
β”œβ”€β”€ package.json
β”œβ”€β”€ package-lock.json
β”œβ”€β”€ pages
β”‚   β”œβ”€β”€ HomePage.tsx
β”‚   └── PermissionError.tsx
β”œβ”€β”€ store
β”‚   β”œβ”€β”€ actions.ts
β”‚   β”œβ”€β”€ reducer.ts
β”‚   └── store.ts
β”œβ”€β”€ __tests__
β”‚   └── App-test.tsx
β”œβ”€β”€ tsconfig.json
β”œβ”€β”€ types
β”‚   └── interfaces.ts
└── utils
    β”œβ”€β”€ APICalls.ts
    β”œβ”€β”€ constants.ts
    β”œβ”€β”€ functions.ts
    β”œβ”€β”€ LayoutUtil.ts
    └── permissions.ts

Components description

The components are as what follows:

PhotosContainer

Purpose: this component is responsible for getting the photos and videos from storage and feed the AllPhotos component with storage photos.

  • this component include the PinchZoom component and AllPhotos component

PinchZoom

Purpose: This component is responsible for all the animations for switching between different column modes, and actions we want to do when animations done.

  • This component is wrapped around the AllPhotos component.
  • The component uses GestureHandlers to respond to pinch and pan gestures

AllPhotos

Purpose: This component is wrapped the three RenderPhotos components and is responsible for lazy load the photos and feed the render photos with proper data.

  • The three different kind of RenderPhotos is the month view with 4 columns of photos, the day view with 3 columns of photos and the day view with 2 columns of photos.

RenderPhotos

Purpose: This component includes with the number of PhotosChunk components and one FlatList that wrapped all the PhotosChunk components that we want to show the user. It is responsible to show the Photos(main) page of hte application.

  • This component also renders date headers.
  • It uses RecyclerListView to show the scrollable grid of photos

PhotosChunk:

Purpose: This component is responsible to show each block/Thumbnails in the gallery.

FloatingFilters:

Purpose: This component is responsible to show and position the "year" titles when fingers are placed on thumb scroll.

Header:

Purpose: This component is responsible to show the top header of the application. It is used in the top Navigationbar.

Highlights:

Purpose: This component is responsible to show the story thumbnails and text on top of Photos page.

Media:

Purpose: This component is responsible to display photo or video when opened in full page. It is the component used in SingleMedia.

SingleMedia:

Purpose: This component is responsible to show modal with the content when image or video is opened in full page. It uses Media to show the photo or video.

StoryHolder:

Purpose: This component is responsible to show each story/highlight in full screen when thumbnail is clicked on.

ThumbScroll:

Purpose: This component is responsible to show the thumb scroll icon in the right of screen when scrolling.

Components diagram

graph TD;
App --> AppNavigation --> PermissionError
AppNavigation --> Header
AppNavigation --> HomePage --> PhotosContainer --> AllPhotos --> RenderPhotos
PhotosContainer --> PinchZoom
AllPhotos --> StoryHolder --> StoryContainer --> StoryComponent
AllPhotos --> SingleMedia --> Media
RenderPhotos --> PhotosChunk & ThumbScroll & Highlights & FloatingFilters

How to contribute?

Just pick any issue from the issues tab or create your own and do a pull request! Please use yarn instead of npm if you are a contributor to be aligned with other contributors. You can ask questions and get in touch with the rest of contributors and community in the Discussion here We appreciate all the help you can do, even if it is renaming one variable to a better name.

Road map

  • Pinch/zoom to switch between 3 modes
  • Open each image/video in a Single image modal and scroll between images
  • Show highlights
  • Fast scroll/thumb scroll
  • Select and unselect each image to delete/edit/share
  • Connect with Dfinity
  • Auto-upload photos to backend
  • Automatic Migration tool from Google Photos
  • Connect with BOX (as a self-owned IPFS solution)
  • Connect with Filecoin
  • Connect with AWS
  • Search page to search by date/tags
  • Library page to show images by folder/Album
  • AI features to do on-device analysis for face recognition/object recognition

Related Publications and News

More Repositories

1

fx-files

You want to literally own your files? This is something won't happen on traditional cloud services in a lifetime. And this is something is going to happen in a glance with "Fx Files" app from now on. It is a file manager which stores everything on Fula blockchain network of Bloxes.
C#
105
star
2

go-fula

Client-server stack for Web3! Turn your Raspberry Pi to a BAS server in minutes and enjoy the freedom of decentralized Web with a superior user experience!
Go
13
star
3

wnfs-android

Android bindings for rust wnfs library
Rust
9
star
4

fx-blox

FxBlox is an App to configure FxBlox towers
C#
6
star
5

fula-ota

This repository contains the fula dockers that runs on Linux and is responsible for managing the over the air update, blockchain and protocol services
Shell
6
star
6

BLOX

Specs for Block-Level Omnibus Extension (BLOX). Includes FxBlox PCB implementations.
5
star
7

fx-components

Monorepo for File Manager and Box apps with accompanying mobile design system components.
TypeScript
5
star
8

docs

docs.fx.land
JavaScript
5
star
9

box-design-blender

3D renders and specifications of the box hardware
5
star
10

fula-archived

Client-server stack for Web3! Turn your Raspberry Pi to a BAS server in minutes and enjoy the freedom of decentralized Web with a superior user experience!
TypeScript
4
star
11

fx-blox-demo-old

This is the application that controls the backend (on users' Blox)
JavaScript
4
star
12

whitepaper

Fula Whitepaper
3
star
13

functionland.github.io

Functionland Docs Website
HTML
3
star
14

box-pcb

PCB Design Files
HTML
3
star
15

simulation

Fula Tokenomics Simulation
Jupyter Notebook
3
star
16

rk1-image

Custom script to build the OS image for fulatower plus (RK1-Armbian)
Shell
2
star
17

Web-Identity-Providers

This is a proxy that can be used to connect applications to Internet Identity by Dfinity.
HTML
2
star
18

react-native-wnfs

React native WNFS library
Java
2
star
19

react-native-fula

React (JS/Native) wrapper for go-fula/mobile which creates a bridge between Fula and WNFS for React Native to enable developers create mobile native apps
TypeScript
2
star
20

Fula-SDK

Client SDKs
C#
1
star
21

fula-contract-api

Fula API endpoint that interacts with contract api and sugarfunge-api uses
Rust
1
star
22

fula-blockchain

Fula Blockchain layer 3
Rust
1
star
23

wnfs-utils

Rust
1
star
24

blog

1
star
25

automatic-poolnode-creation-script

This script is optimized to create a pool node on ubuntu.
Shell
1
star
26

dfinity

Dfinity backend to connect Fx Fotos to canister storage
Modelica
1
star
27

fula-sec

Fula Security Library for DID creation and sharing
TypeScript
1
star
28

fulahub

Go
1
star