Coder Social home page Coder Social logo

neurofusioninc / fusion Goto Github PK

View Code? Open in Web Editor NEW
30.0 30.0 4.0 125.73 MB

The simplest way to do brain and behaviour research - right in your browser or mobile phone. Discord: https://discord.gg/sqsuzXWE3K

Home Page: https://usefusion.ai/research

License: GNU Affero General Public License v3.0

Python 5.62% HTML 4.06% JavaScript 12.63% CSS 0.16% TypeScript 75.33% Java 1.23% Objective-C 0.04% Objective-C++ 0.41% Swift 0.02% Ruby 0.50%
behavior eeg neurotech research

fusion's People

Contributors

adaobi23 avatar cuddimatic avatar dejimarquis avatar hemor avatar kelechiodom10 avatar orehga avatar peoray avatar toopriceyy avatar

Stargazers

 avatar  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

Forkers

peoray

fusion's Issues

Integration for fetching user music listening history

We already have a flow to:

We should integrate an OAuth flow to the spotify api that allows us to fetch listening history for a user periodically and update:

  • on the settings page, user connects account
  • client sends token to the backend server to store in keystore
  • adds a controller endpoint to periodically fetch from spotify on behalf of user
  • call the upload api to store data for user

https://github.com/dgendill/spotify-play-history has a good javascript example for connecting to spoify api and fetching periodically.

Data should be stored in remote blob (if user consents) - /y/m/d/-listening_history.json

Nostr Implementation 🤪

this one is big! redefines how we onboard a fusion user - basically making you anon by default

[will update]

Onboarding flow on mobile app

We need to guide the user on more expressive in terms of what user should expect (e.g after creating prompt, tell them what happens next, why are prompts important?)

Figma link

  • Overview screens ( what the app is )
  • Our commitment to user privacy (see rewind flow)
  • Ask what is top of mind for user & save it in database
  • suggest prompts for them to add based on entry.

Screenshot 2023-03-24 at 12 06 17 PM

[Mobile] Key experience updates

  • Ensure the saved events are done with the prompt/notificationID
  • Response view display
    • Yes/No response
  • Allow user to click notification to respond
    • Page for responding to prompt
  • Make the edit/create prompt view scrollable
  • Account tab
    • Allow user send feedback from app!

Overall website updates

  • add Privacy policy page link to notion
  • add the dynamic page titles & basic SEO (og:title etc)
  • screenshot of the app in the center similar to neurosity
  • add "start neuro recording" to the landing page
  • change logos under the integration section (add apple health & google fit)
  • Include pioneer questions & responses in FAQs

Add mobile support for self sampling

start with simple flow

  • ios app that works
  • accepts configuration for:
    • question
    • cadence
    • input
  • when entry is complete make api call to move to data store

Dashboard - Brain data

  • Show more information about selected frequency band
  • Filter out noise
  • Need to be descriptive about what the change means
  • Allow to view neurosity focus metrics against context switches

Flow for creating, subscribing & completing quests!

This needs some more detailed thinking but the gist here is that:

  • An "explorer/researcher" on fusion defines a quest ( a set of experiments & workflow that a user should do) with duration

    • create db table & web route
    • define what variables to collect
      - [ ] descriptions
      - [ ] what prompts
      - [ ] what experiments
  • Explorer can share for other users to subscribe to

    • subscription means
      • functionality to see active quests (study/trials) and join on web & mobile
      • you'd get notified to do the recordings
      • if self-prompting is involved, we allow you easily configure & set them up on the mobile app
      • you get instant analysis/ summary of your results
      • you chose to share your data (anonymously with the quest creator)
  • Researcher should be able to track adherence & see raw data

Bug: Investigate token expiry for user

Just did a 30min recording and upload failed because for some reason I had been logged out from fusion backend.

Currently the token expiry is set for 7days I believe... need to add a refresh flow

conditional probability

User Prompting

This will grow over time but the core objective here is around sending relevant messages to:

  • self sample a question of interest. e.g 'energy levels' - the user gets to set this

Securing APIs with JWT Auth & Validation for requests

In prep for launch this weekend, we need to make sure all our endpoints are 🔐

Now, when you login to fusion, we make a request to /api/userlogin which then (creates a user if not & returns details) See implementation

  • We will update this to just return a JWT token
  • #33

One thing to keep in mind though is that our analytics runner will still need to be able to access the api ( not sure what the best approach here is since it needs to access "regardless" of the user

Power spectral analysis on resting state (eyes closed)dataset recorded over weeks

  • read raw brainwaves & signalquality values
  • split into epochs - 3-5seconds
  • average resting state for a single recording
  • then compare two datasets together. (this will be the basis for defining baseline vs. new dataset)
  • see how data has changed over time - "morning", "afternoons", "evenings"

Dataset

  • Resting state EEG data Link

  • upload dataset to hugging face

Notification doesn't dismiss after user responds to text/number prompt.

Not sure why this is the case, I've added a Notifications.dismissNotificationsAsync(identifier) call.

  • This works for Yes/No type prompts,
  • Number & Input prompts get logged but don't dismiss automatically unless the user cancels it themselves.

This is annoying but good enough to ship for now (spent the last 30mins trying to fix this but no luck ._.)

Next steps:

  • Try using handleLastNotificationResponse instead of using the addNotificationResponseListener
  • File a bug with expo dev team

Screenshot_1679982176

Integrate tryVital api for fetching health data

Vital gives us access to different providers (oura, fitbit etc) Supported providers - Vital (tryvital.io)

Create combined dataset

From the existing data sources, we will take the following columns:

  • activity_watch_summarized = summary_day, total_time_surfing, what_app_did_user_spend_x_percent_of_time_on (one column per percent) , events_usage (tuple: event_classification (encoded), sum_total_time)

  • google_calendar = summary_day, total_time_in_meetings, average_meeting_duration, mode_meeting_duration, count_of_meetings_initiated, count_of_meetings_invited, avg_number_of_people_per_meeting

  • oura = (drop some rows) - remove combination identifiers

  • tweets = summary_day, count_of_tweets, count_of_total_positive, total_neutral, total_negative, sum_likes_positive, sum_likes_negative, sum_likes_neutral, sum_retweets_positive, sum_retweets_negative, sum_retweets_neutral

these datasets will then be joined by summary_day for a single day's entry

Things to keep in mind during combination:

activity watch

  • cluster events into groups (max 5 & then make them columns)
  • encode all events, consider magnitude = 0: 70, 1: 30

google calendar

  • considering how many meetings were created impromptu
  • meetings initiated vs invited ( giving / taking time )
  • how start_time vs end_time fit into daily activities

twitter

  • original tweets vs retweets
  • how are people interacting with tweets
  • people interacting with

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.