Skip to content

beaunus/dejaview

Repository files navigation

Déjà View

This was created during our time as students at Code Chrysalis.

This app is hosted at http://www.dejaview.cc/.

The data scraping code for this app can be found at https://github.com/xzjia/dejaview-scraper.

What is Déjà View?

Looking back over the events of our digital lives can be cumbersome. Déjà View is a web application that allows you to see events during your life (and before) in a given time frame. By combining publicly available information and a user's social media feed we created a unique experience not available anywhere else.

deja-view-screenshot

How to use it

  • Choose a date from the date selector.

    • You will see a series of cards from that date.
  • Choose a granularity (YEAR, MONTH, WEEK, DAY).

    • Each card represents one YEAR, MONTH, WEEK, or DAY.
  • Navigate forward and backward.

    • Use the date selector
  • Choose what kind of events that you want to see.

    • By default, events from all available data sources are shown.
    • Click on the data source filters (Billboard, Movies, etc.) to hide or show certain data sources.
  • Log in to Facebook to show your posts from Facebook.

    • We are currently in the process of getting approval from Facebook. If you would like to be a tester for this app, please let us know.

For Developers

Getting Started

Prerequisites

You will need Node.js installed with a package manger such as yarn and a PostgreSQL database available locally to install.

After starting PostgreSQL, create a database from the command line

createdb dejaview

Create a Facebook App

You can create a Facebook App for free. Once you've created an App, you'll need the app ID and app secret. If you want to use the application without facebook integration you can skip this step.

Set the callback URL

You'll need to set the URL that Facebook Login will come back to after a successful login. This should be the root domain of the place where your app is running. For development localhost will work. If you want to use the application without facebook integration you can skip this step.

Environment Variables

This app uses environment variables to load keys from your environment. These should be placed in a file in the root directory named .env

FACEBOOK_APP_ID=<Your APP ID>
FACEBOOK_APP_SECRET=<Your SECRET KEY>
DATABASE_URL=postgresql://localhost/dejaview
FACEBOOK_APP_CALLBACK_URL=http://localhost:3001/auth/facebook/callback

Installing

Run yarn to install of the node module dependencies required by the application.

yarn

Then populate the database using knex.

knex migrate:latest
knex seed:run

See the dejaview schema for details on the database. Some sample records are loaded when seeding the database, but for more information on how the data was loaded into the original application look at the Deja View Scraper Project

Run yarn start to run the application on port 3001.

yarn start

You can now view the application at http://localhost:3001/

You can view the events raw information using Deja View's REST API:

http://localhost:3001/api/v1/2018-06-26/?granularity=days&num=10

See API documentation for more information

Running the tests

Current Test checks to make sure App renders

yarn test

Built With

Authors

Original Authors on this project

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details

Acknowledgments

  • Thank you to Tim Urban for the inspiration to look at the weeks of our lives.
  • Thank you to Facebook for their Graph API.
  • Thenk you to our public data sources (New York Times, Wikipedia, The-Numbers, and Billboard)
  • Thank you to Code Chrysalis, without you this project wouldn't exist.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published