GithubHelp home page GithubHelp logo

raamana / braindrles Goto Github PK

View Code? Open in Web Editor NEW

This project forked from npnl/braindrles

0.0 3.0 0.0 29.17 MB

Its like Tinder, for Brains with Lesions!

License: Apache License 2.0

JavaScript 29.57% HTML 0.27% Vue 70.16%

braindrles's Introduction

braindrles

a firebase app for braindrles: Tinder for brains with lesions (a derivative of braindr)

Note: Documentation for data review for all (aka alldr) in process; more to come

Firebase setup

  1. Create a firebase account
  2. Click on "Web Setup" and copy paste your config into src/firebaseConfig.js
  3. Go to the Authentication and click "Sign-In method" and enable Email/Password
  4. Go to the Database tab and click "Rules" and copy paste the following:
{
  "rules": {
    ".read": "auth != null",
    ".write": "auth != null",
    "users": {
      ".read": true,
      ".write": "auth != null",
    },
    "settings": {
      ".read": true,
      ".write": false,
    }
  }
}
  1. run the app: npm run dev and open localhost:8080. Create a new account
  2. Go to the Database tab in Firebase. Create key value pairs like this:
settings: {
  admins: {
    your_username: true,
  },
}

users: {
  your_username: {
    admin: true
  }
}

imageCount: 1
  1. Click on imageCount. Import a JSON file w/ pointers to your images into here:
{
  imageFilename1: {
    ave_score: 0,
    num_votes: 0
  },
  ...
}

If you don't have this file, upload the abide_images.json file in this folder.

Your database should now look like:

  1. Also host your images somewhere else (like S3), it will be cheaper to pull images from there instead of firebase. The images will be found at: https://yourS3bucket/imageFilename1.jpg

  2. Edit the imageBaseUrl in src/components/Play.vue to point to your images. The url will have the image name appended to the end with the .jpg extension

  3. go to localhost:8080/images to see all the images. Start rating them here, making sure to mark a few passes and fails (this is for the tutorial)

  4. Start playing to test that it works

  5. To deploy. make a firebase directory here:

mkdir firebase
cd firebase
firebase init

select all the options here except firestore. Then choose your project, and say yes to everything else. Then do:

cd ..
npm run build
cd firebase
cp -r ../dist/* public/

The npm step builds all your files into a single html file and a set of js files. Then we move them to the firebase public folder and then deploy:

firebase deploy

These instructions will probably change soon. The app is still being actively developed!

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

# build for production and view the bundle analyzer report
npm run build --report

# run unit tests
npm run unit

# run e2e tests
npm run e2e

# run all tests
npm test

For a detailed explanation on how things work, check out the guide and docs for vue-loader.

braindrles's People

Contributors

akeshavan avatar leiliew avatar

Watchers

 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.