Code Monkey home page Code Monkey logo

familytree-sample-app's Introduction

FamilyTree Sample Application

A sample FamilyTree application that uses Flask, MongoDB, Bootstrap, and jQuery. The application displays a text-based pedigree, with names that can be clicked to provide a profile view. To use this application, you need to have an access key for the FamilyTree API, details available from FamilySearch at http://familysearch.org/developers.

See the screenshots below to see what the application looks like. The code in this application is the core of http://leaf.byu.edu.

Configuration

Copy the doc/config-sample.py file to the top directory of the sample application. Edit this file to enter your sandbox and production keys, obtained from FamilySearch. Set the sandbox variable to True to use the sandbox key and False to use the production key.

If you want to try the application out on a production server, set the ADMINS variable to include your email address, then also put the email address and password of a Gmail account into the emailAddress and emailPassword variables. This will email you reports if a bug occurs when the application runs on a production server.

To run on a production server, copy the doc/sample.wsgi file to the top directory of the sample application. Edit this file to enter the path to where your code is stored. Then create a virtual host for Apache that includes the following:

<Virtualhost *:80>
    ServerName app.com

    WSGIDaemonProcess app user=www-data group=www-data home=/home/app/ processes=5 maximum-requests=1000
    WSGIScriptAlias / /home/app/familytree-sample-app/app.wsgi

    <Directory /home/app/familytree-sample-app>
            WSGIProcessGroup beta
            WSGIApplicationGroup %{GLOBAL}
            Order allow,deny
            Allow from all
    </Directory>            

    ErrorLog /var/log/apache2/app-error.log
    CustomLog /var/log/apache2/app-access.log combined

</VirtualHost>

Replace the appropriate lines (ServerName, process name, directories, etc) with the actual values for your server.

Screenshots

The home page:

Click the Getting Started or the Login button to login via FamilySearch. Once you login, you should see your ancsetry page:

By clicking on any name you can bring up the profile page for that person:

All data is cached in a Mongo database. Per FamilySearch policy, living people are stored in a separate database and NOT shared among other users. Deceased people are stored in their own database and may be shared among other users. The Refresh button will refresh the ancestry or profile views, by requesting the data again from FamilySearch and replacing the cache in MongoDB.

Copyright

Copyright 2013, Daniel Zappala

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

familytree-sample-app's People

Contributors

zappala avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  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.