Skip to content

App information Page

Polly Schandorf edited this page Jun 13, 2025 · 1 revision

SIF App Project Overview - Ruby For Good

Table of Contents


Project Background

Organization: Stocks in the Future (SIF) - Non-profit organization
Development Team: Ruby For Good
App Name: SIF
Target Users: Middle school students, teachers, and non-profit administrators

This is a financial literacy education platform that gamifies stock market learning through simulated trading with real market data.


Mission & Purpose

Stocks in the Future develops highly motivated middle school students who are eager to learn and dedicated to attending class through the use of incentives coupled with a financial literacy curriculum focused on investing that reinforces Math, Language Arts, and Social Studies. The program aims to educate, encourage, and empower the next generation of financially-literate individuals.

Key Educational Goals

  • Financial literacy education for middle schoolers
  • Encourage attendance and academic performance
  • Integrate with Math, Language Arts, and Social Studies curricula
  • Use intrinsic and extrinsic motivators effectively
  • Discourage risky day-trading behaviors

Project History

Previous Challenges

  • Original App: SIF had an existing Rails application
  • Failed Upgrade: Several years ago, Ruby For Good attempted to upgrade the Rails version
  • Complete Rebuild: The upgrade failed, leading to a decision to rebuild the entire application
  • Event Continuity: Maintaining project momentum after Ruby For Good events has been historically difficult

Current Rebuild Status

  • Progress: Approximately 12% complete
  • Foundation: Good structural bones in place
  • Needs: Significant technical work, UI improvements, and stakeholder iterations

Current State

βœ… Completed

  • Basic application structure
  • New student login flow (recently implemented)
  • Core user models and relationships
  • Basic authentication system

🚧 In Progress

  • UI/UX improvements
  • Stock trading functionality
  • API integrations

πŸ“‹ Needs Work

  • User interface design and implementation
  • Authorization system refinement
  • Stock purchase/sell workflow
  • Documentation and resources
  • Deployment pipeline

User Roles & Workflow

graph TD
    A[Non-Profit Admin] --> B[Create Schools & Classrooms]
    A --> C[Select Available Stocks ~12 per year]
    A --> D[Manage Teacher Accounts]
    
    B --> E[Teacher Account Creation]
    E --> F[Teacher adds Students to Class]
    
    F --> G[Students Receive Username/Password]
    G --> H[Students Get Starting Balance]
    
    H --> I[Students Browse Available Stocks]
    I --> J[Students Place Buy/Sell Orders]
    
    J --> K[Orders Held Until End of Day]
    K --> L[Overnight: Orders Execute at Day's Price]
    L --> M[API Call Updates Stock Prices]
    M --> N[Next Day: New Prices Available]
    
    style A fill:#ff9999
    style E fill:#99ccff
    style G fill:#99ff99
Loading

User Types & Permissions

1. Non-Profit Administrators

  • Account: Email-based Devise accounts
  • Permissions: Full system access
  • Responsibilities:
    • Set up schools and classrooms
    • Select 10-12 stocks available for purchase annually
    • Manage teacher accounts
    • Enter stock information and updates
    • Generate year-end reports
    • Reset student passwords
    • Transfer continuing partnerships between school years

2. Teachers

  • Account: Email-based Devise accounts
  • Permissions: Access to their assigned classes and students only
  • Responsibilities:
    • Add students to their classes
    • Track student attendance and grades
    • Award bonus money for good attendance/performance
    • Reset student passwords
    • Monitor student portfolios

3. Students

  • Account: Username/password (NO email required)
  • Privacy: No personally identifying information stored
  • Permissions: View only their own portfolio
  • Capabilities:
    • Browse available stocks (limited selection)
    • Place buy/sell orders using fake money balance
    • View their portfolio performance
    • Continue trading through high school graduation

Technical Architecture

Stock Trading Workflow

sequenceDiagram
    participant S as Student
    participant A as SIF App
    participant D as Database
    participant API as Stock API
    
    S->>A: Places buy/sell order during day
    A->>D: Store pending order
    Note over A,D: Orders held until end of day
    
    A->>D: Execute all pending orders (overnight)
    A->>API: Fetch closing prices
    API->>A: Return updated stock data
    A->>D: Update stock prices for next day
    
    Note over S,API: Students see previous day's closing prices
Loading

Key Technical Decisions

  • No Real-time Trading: Orders execute once daily to discourage day trading
  • Privacy First: Student accounts use usernames only, no email addresses
  • Simplified Stock Data: Less detailed information than previous app version
  • External Resources: Teachers directed to Yahoo Finance, Motley Fool for additional research

Recent Implementations

New Student Login Flow

  • Implemented secure username/password authentication
  • Maintains student privacy (no email requirement)
  • Teachers can reset passwords as needed
  • Admin override capabilities for password management

Immediate Priorities

πŸ”₯ Critical Tasks

  1. Deployment Setup

    • Deploy application to Heroku
    • Configure production environment
  2. Code Standards

    • Decide between StandardRB or RuboCop
    • Fix linting issues
    • Create TODO list for outstanding fixes
  3. Authorization System

    • Implement Pundit-based permissions
    • Teachers see only their classes/students
    • Students see only their portfolios
    • Admins have full access
  4. Stock Trading Core

    • Research and document API response format
    • Implement stock purchase workflow
    • Build daily order execution system
    • Create stock price update mechanism

πŸ“Š Reporting Requirements

End-of-year reports must include:

  • Number of students in program
  • Number of students who invested
  • Companies students invested in
  • Total dollars invested
  • Breakdown by schools

Future Roadmap

Phase 1: Core Functionality (Current Focus)

  • Complete stock buy/sell workflow
  • Implement proper authorization
  • Deploy to production
  • Basic UI improvements

Phase 2: Enhanced Features

  • Attendance tracking integration
  • Performance-based bonus system
  • Portfolio transfer for graduating students
  • Teacher dashboard improvements

Phase 3: Advanced Features

  • Enhanced reporting and analytics
  • Integration with external educational tools
  • Mobile-responsive design
  • Advanced financial literacy content

Phase 4: Scalability & Maintenance

  • Performance optimizations
  • Enhanced security measures
  • Comprehensive documentation
  • Training materials for users

Getting Started

For New Contributors

  1. Understand the Mission: Review the educational goals and user workflows
  2. Explore the Codebase: Check the /docs folder in the repository for technical documentation
  3. Review Current Priorities: Focus on immediate tasks listed above
  4. Join Team Communication: Connect with Ruby For Good team leads
  5. Start Small: Pick up UI improvements or bug fixes to get familiar with the codebase

Key Resources

  • Repository documentation in /docs folder
  • Ruby For Good team communication channels
  • SIF stakeholder contact information
  • Stock API documentation (TBD - needs research)

Questions for New Team Members

  • What educational organizations use for student PII anonymization?
  • Best practices for financial education apps?
  • Ruby For Good project continuation strategies?

Contact & Support

Project Maintainers: Ruby For Good team
Stakeholder: Stocks in the Future non-profit
Documentation: Repository /docs folder


Last Updated: 6/13/25
Document Maintainer: Polly