Giter Club home page Giter Club logo

lighthouse's Introduction

Lighthouse

This project is a mobile, map-based communications platform for users to share travel paths. The intended use is primarily for friends and family that would like to keep track of travel paths to ensure the traveller arrives safe and sound and within expectations.

lighthouse-demo-1-1

Table of Contents

  1. Team
  2. Setup
  3. Database
  4. Deployment
  5. System Architecture
  6. Map Features
  7. Troubleshooting
  8. Backlog

Team

Setup

Install these global tools by typing the following commands into your terminal:

Database

For our database, we used Firebase, which not only stores each individual user’s data and group data, but also manages our authentication as well.

Setting up is as easy as creating a free account and installing the Firebase through npm and requiring it on the pages you need:

npm install —save firebase var Firebase = require(‘firebase’)

Authentication

Once you have a Firebase account set up and installed, you can easily set up authentication. We choose to authenticate our users with email and password. Logging in and signing up new users is as easy as using the examples on this page: https://www.firebase.com/docs/web/guide/login/password.html

Database Structure

Firebase allows you to store and sync data in real time on a NoSQL cloud database. It is stored in JSON format and is easily to manipulate to get the information you need.

We have two tables in our database, Groups and UserData.

Image of database

Under the Groups table, we store our Group Name as our key, with our values being the description and an object of the members in the group.

Under the UserData table, we store our User’s ID as our key, with our values being their email, name, phone, profile image, and an object of which groups they belong to and who are their friends.

We have created several Firebase helper functions within Components/Utils/api.js which query the database for specific data:

// Add data to user, use after creating new user setUserData(myData, name, phone)

// Add location data to user setUserLocation(myData, location)

// Make changes to user data updateUserData(myData, item, value)

// Add groups to Groups table addGroup(groupName, groupDescription, userId)

// Add user to specific Group table joinGroup(groupName, userId)

// Add user friends to Friends table addFriend(userId, friendId)

// Get user data getUserData(userId)

// Returns data from specific group getGroupData(groupName)

// Get all friends in my Groups table getUserGroups(userId)

// Get all friends in my Friends table getUserFriends(userId)

// Search for user by partial email findUserByEmail(emailInput)

// Search for existing groups by partial group name. findGroupByName(nameInput)

Deployment

Before deploying on Bitrise, a continuous integration platform, certificates have to be set up through Apple Developer Account (iOS).

  • Apple Developer Account: set up certificates and register users and respective UDID of app. Enter into the Certificates, Identifiers & Profiles section and create the necessary certificates, app ids, register devices and complete the necessary provisioning profiles that links the devices.
  • Bitrise.io for deployment. Bitrise is a continuous integration platform that allows users to deploy apps quickly and also to work with 3rd party integrations.
  • Set up an account with Bitrise (14 days free PRO account) and link your github repository to a new app.
  • Bitrise has a well documented how-to with examples from users. The deployment site will identify the type of deployment you are setting up and will initialize the necessary scripts. After registering the certificates and adding testers/users to the app its a matter of running the build. Prior to running the build, the certificates signing on Bitrise must be complete, having imported the certificates produced on Apple Developer Account.
  • If you have configured the users correctly with email notifications Bitrise will email the testers with installation files for app.
  • You may need to adjust the Bitrise.yml configuration file. Ensure all users are registered with Bitrise and have accepted the invitation from you, the developer.

System Architecture

Map Features

The map in Lighthouse is built with React-Native-Mapbox-GL. https://github.com/mapbox/react-native-mapbox-gl

On their page, you'll be able to find many examples of different Mapbox onPress events which will create markers on the map, follow the user depending on their location, set the map view bounds depending on two different locations on the map, etc. Here is an example of their code: https://github.com/mapbox/react-native-mapbox-gl/blob/master/ios/example.js

The MapboxMap.js file in projectSapphire/Components/MapboxMap.js has the documentation for each piece of code.

Troubleshooting

Resources for troubleshooting:

Roadmap

  1. Create private map connections between friends.
  2. Create groups (already set up in database and with helper functions).
  3. Use Twilio to send a user an alert when the friend is within a geofence.
  4. Give user the ability to upload their own photo from camera roll.
  5. Use user photos for avatars on the map.

lighthouse's People

Contributors

inje avatar steventran06 avatar kmoroder avatar

Stargazers

 avatar Jess Anderson avatar

Watchers

James Cloos avatar  avatar  avatar

lighthouse's Issues

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.