GithubHelp home page GithubHelp logo

meganyyu / prolific Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 32.9 MB

A social app where users become co-creators by building stories together in a finish-the-story style game.

Objective-C 99.79% Ruby 0.21%
ios-app objective-c social-app storytelling

prolific's People

Contributors

meganyyu avatar

Watchers

 avatar  avatar

prolific's Issues

Basic Gamification - Badge System

Tasks

  • Design basic badges on paper and design schema
  • Create Badge model and model builder classes on client side
  • Add DAO methods that can fetch or update badge data from server side
  • Set up ProfileVC to load badge data
  • Implement some of the basic badges

Basic badges:

  • Contributor Badge: submit 50 snippets per level
  • Big Hit Writer Badge: win 20 rounds
    • will have to implement this later, once Cloud Functions are set up
  • Creator Badge: compose 20 projects per level (later on, change so that the higher level you are, the more projects you have to compose)

Adding to Cloud Firestore's Users documents

Note: bold text indicates a collection, italicized text indicates a document.

users

  • user 1
    • other user metadata
    • badges
      • contributor-badge
        • level
        • goalCompletedSoFar: amount completed so far for level
        • totalGoal: total amount needed to complete level
      • big-hit-writer-badge
        • ...
      • creator-badge
        • ...

Add main custom cells

  • create any necessary base cells (e.g. with rounded edges and appropriate drop shadow)

Setup models in app

  • Setup User model in Xcode
  • Setup basic Snippet model in Xcode
  • Setup basic Project model in Xcode
  • Setup basic Round model in Xcode

Add animations

  • Make sure app uses animations (e.g. fade in/out, e.g. animating a view growing and shrinking)

Build out navigational skeleton/skeleton views

Programmatically build out navigational skeleton and some basic skeleton views

  • Login View Controller
  • Register View Controller
  • Main Tab Bar Controller
  • Home View Controller
  • Favorites View Controller

User can login/logout of app

  • Setup login view controller
  • Setup home view controller with a logout button
  • Add basic password-based login/logout functionality with Firebase Auth
  • Add authentication state persistence, i.e. automatically sign in if user is already authenticated upon opening app - Resource: Manage Users in Firebase

Create custom camera view

  • Depending on what options are available on a user's device, offer option to select between camera or gallery

Add external visual library

  • Choose/add external library to add visual polish - CHOICE: Lottie
  • Resources: (LottieFiles)[https://lottiefiles.com/], (Lottie iOS github)[https://github.com/airbnb/lottie-ios]
  • Use this statement to install file, because latest version of Lottie uses Swift, not Obj-C: pod 'lottie-ios', '2.5.3'

Users can receive notifications

User can receive push notifications or see notifications on a notifications page

  • when snippet is liked
  • when a project they're contributing to is added to
  • when round is completed/started for a project they're following
  • when the round they contributed to is completed
  • Add a notifications/activity page

User can tap a project in feed to view thread details

  • Setup a details view controller with a Collection View
  • Tapping a cell opens the details view controller
  • Setup a reusable Collection View Cell for each snippet
  • Load necessary project data in details view controller's collection view (i.e. display snippets-so-far)

User can view snippets submitted so far

  • Programmatically setup a custom submissions view controller that appears upon tapping the latest snippet so far
  • Retrieve submitted snippets data from Firestore and display in view

Fix account sign up flow

  • Figure out where the bug is that is causing sign up flow to crash
  • Resolve issue
  • Make sure users are automatically created with badges
  • Clean up design for sign up and login flow
  • Make sure there's a loading screen

Create MVP version of round ranking algorithm

Overview of vote system

  • Votes of users without much karma is worth very little
  • Weight of a user's vote is # votes x karma
  • If a user votes for multiple snippets in a round then the weight of their vote is divided proportionately by the number of votes the user makes

Issue breakdown

  • 1. Prepare client side models and Firestore database to have the necessary data for ranking algorithm to use

    • For now, add a placeholder field for karma in the server side User document, and a placeholder property for karma in the client side User model: everyone starts with 1 karma!
    • Client side Round model has a dictionary of dictionaries called voteData: @{userId : @{voteCount : num of votes made by user, currentKarma : user's karma at time of latest vote}
      --> reason for dictionary of dictionaries design decision: We want to base a user's vote weight on their karma AT the time of the vote, and make it easy for algorithm to retrieve data needed to see how user's karma should be divided proportionately between votes
      • When updating a Snippet's voteCount & userVoted properties, the relevant entry in the Round's dictionary of dictionaries is also updated with the correct numOfVotes. If numOfVotes is 0, remove entry with key 'currUserId' from dictionary.
    • Server side round document has same dictionary of dictionaries
      • When updating the Snippet with votes, also update the Round with numOfVotes
  • 2. For MVP, setup a class that directly calculates some basic ranking from the client side to determine which snippet has won using below algorithm (for now, this is only called when a round is being marked as complete):

  • 3. Fix any functions involved in choosing the winning snippet to use the round ranking class/methods

  • 4. Test!

Algorithm:

  • On the round level, use the dictionary of dictionaries to compute another dictionary of @{userId : voteWeight = karma / numOfVotes}
  • For each submission, compute score:
    • For each user, add relevant user's voteWeight to totalScore
    • After computing totalScore, add totalScore to a dictionary of @{snippetId : totalScore}
  • Go through the dictionary and return an array of snippet ids sorted by score
  • Update Firestore with rank & score data

Future improvements (not for MVP)

Change to be a Firebase cloud function that periodically goes through all OPEN rounds and computes score for each snippet in that round:

  • Cloud function periodically (every hour?) goes through all OPEN rounds and computes score for each snippet in that round
  • For each round that finishes computing score, the cloud function then writes in value for "rank" field and "score" field in each submission for the round
  • Deploy cloud function

User can view their profile page

  • User can view basic profile information (display name, profile image, etc)
  • User can view projects they've created (query all projects under their user id)
  • User can see a visualization of their karma/engagement
  • User can see progress toward badges/achievements

Basic Gamification - Tracking User Engagement

  • Set up system to update karma for user easily

These engagement factors go through a function to generate your karma:

  • submit a snippet: +0.1 karma
  • voting on a snippet: +0.1 karma
  • winning a round: +5.0 karma
    - [ ] viewing projects: 0.01 x user karma (but only up to 100 views)
  • compose a starter project: +3.0 karma
  • complete a badge: +10.0 karma

Purpose of karma

  • Votes of users without much karma is worth very little
  • Power of a user's vote is # votes x karma
  • If a user votes for multiple snippets in a round then the weight of their vote is divided proportionately by the number of votes the user makes

Create logic for finalizing a project

Option 1: User-defined
- [ ] Users submitting a snippet can mark it as a "final snippet"
- [ ] If a snippet wins and it is a "final snippet", then the Project is considered complete - make rounds immutable except for votes??
- [ ] When voting for snippets, a snippet that is a "final snippet" is clearly marked differently

Option 2: Default value (for MVP, if not enough time)

  • For MVP, just add a property to a "Project" model that indicates how many default rounds a Project has before it's considered complete
  • When it's the last round, indicate that this is the last round on the submission section!

User can view starter projects in home feed

  • Add starter project data to database
  • Setup collection view
  • Create custom collection view cell to display starter projects
  • Retrieve data from database and display in home feed

Feature to automatically mark round as complete and pick winning snippet

  • After a certain amount of time (this is added as the properties start and end time in the "Project" object/database, can input this directly for now in the starter data), a round is marked as complete and votes are counted up
  • A new round is created if the original latest round was marked as complete
  • If no snippets have been submitted when time runs out, then add more time (start timer again)
  • Project details page updates with the new round data in a collection view

Configure Firebase

Reference

Description

  • Create Firebase project
  • Setup Cloud FireStore on Fireboard Console
  • Deploy local app to Firebase
  • Test deployment

Add Color Scheme

  • add a class to control the color scheme of the app
  • add custom colors

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.