Skip to content

A Reading System for Improving Reading focus, Speed and Comprehension

License

Notifications You must be signed in to change notification settings

Ahmadkhaled11/Open.Bionic

Repository files navigation

Open|Bionic

Modern Accessibility Reading System for ADHD


Open|Bionic helps ADHD readers improve focus and comprehension by transforming text into bionic reading formatβ€”bolding the first half of each word to guide the eye and reduce cognitive load.


🎯 What Is This?

An accessibility tool that makes reading easier for people with ADHD by:

  • Bolding word beginnings to guide eye movement
  • Reducing reading friction through visual anchoring
  • Improving focus and comprehension

πŸš€ New Architecture (v2.0)

This version has been completely refactored into a universal, technology-agnostic library:

Backend: Elixir/Phoenix LiveView

  • βœ… RESTful API accessible from any technology
  • βœ… Real-time text transformation
  • βœ… Export to HTML, RTF, and PDF
  • βœ… High performance (<50ms response time)

Frontend: TypeScript (Vite)

  • βœ… Modern, responsive web interface
  • βœ… Dark/Light mode toggle
  • βœ… Live bionic text preview
  • βœ… PDF & RTF download functionality
  • βœ… WCAG 2.1 AA accessibility compliant

πŸ“¦ Quick Start

Prerequisites

  • Elixir 1.15+ & Erlang/OTP 26+
  • PostgreSQL 15+
  • Node.js 20+

Installation (Windows)

Run PowerShell as Administrator:

# Install dependencies
choco install elixir postgresql15 nodejs-lts -y

# Initialize backend
.\setup-backend.ps1

# Initialize frontend
.\setup-frontend.ps1

See INSTALLATION.md for detailed instructions.


πŸƒ Running Locally

Terminal 1: Backend

cd open_bionic_lib
mix deps.get
mix ecto.create
mix phx.server

Backend: http://localhost:4000

Terminal 2: Frontend

cd frontend
npm install
npm run dev

Frontend: http://localhost:3000


πŸ“š API Documentation

Transform Text

# GET endpoint
curl http://localhost:4000/api/v1/transform/Hello%20World

# POST endpoint
curl -X POST http://localhost:4000/api/v1/transform \
  -H "Content-Type: application/json" \
  -d '{"text":"Hello World"}'

Response:

{
  "success": true,
  "data": {
    "html": "<b>Hel</b>lo <b>Wor</b>ld",
    "raw": "Hello World",
    "stats": {
      "word_count": 2,
      "char_count": 11
    }
  }
}

Export Endpoints

# PDF
POST /api/v1/export/pdf

# RTF
POST /api/v1/export/rtf

# HTML
POST /api/v1/export/html

See Backend README for complete API documentation.


πŸ—οΈ Project Structure

Open.Bionic/
β”œβ”€β”€ open_bionic_lib/       # Elixir/Phoenix backend
β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   β”œβ”€β”€ open_bionic/
β”‚   β”‚   β”‚   β”œβ”€β”€ core/      # Transformation algorithm
β”‚   β”‚   β”‚   └── export/    # HTML, RTF, PDF generators
β”‚   β”‚   └── open_bionic_web/
β”‚   β”‚       └── controllers/api/
β”‚   └── test/
β”‚
β”œβ”€β”€ frontend/              # TypeScript/Vite frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ api/           # API client
β”‚   β”‚   β”œβ”€β”€ components/    # UI components
β”‚   β”‚   β”œβ”€β”€ styles/        # Design system
β”‚   β”‚   └── utils/
β”‚   └── index.html
β”‚
β”œβ”€β”€ backend.py             # Legacy Python backend (preserved)
β”œβ”€β”€ frontend.py            # Legacy Streamlit UI (preserved)
└── INSTALLATION.md        # Setup guide

🎨 Features

Backend

  • βœ… RESTful API with versioning
  • βœ… Phoenix LiveView support
  • βœ… CORS enabled for cross-origin access
  • βœ… Native PDF generation (no external dependencies)
  • βœ… Comprehensive test coverage (>90%)

Frontend

  • βœ… Modern TypeScript architecture
  • βœ… Real-time bionic text preview (300ms debounce)
  • βœ… Dark/Light theme toggle (localStorage persistence)
  • βœ… Responsive design (mobile, tablet, desktop)
  • βœ… Accessibility: WCAG 2.1 AA, keyboard navigation, screen reader support

πŸ§ͺ Testing

# Backend tests
cd open_bionic_lib && mix test

# Frontend type check
cd frontend && npm run type-check

# E2E tests
cd frontend && npm run test:e2e

πŸš€ Deployment

Fly.io (Recommended)

# Backend
cd open_bionic_lib
fly launch
fly deploy

# Frontend (static hosting)
cd frontend
npm run build
# Deploy dist/ to Fly.io, Vercel, or Netlify

Docker

docker-compose up -d

πŸ“– Documentation

Document Purpose
Implementation Plan Refactoring architecture
Backend API API reference
Frontend Guide Component documentation
Installation Setup instructions

πŸ›£οΈ Product Roadmap

  • Rebuilding core with Elixir/TypeScript
  • HTML, RTF, PDF export support
  • Text-to-speech (Whisper API integration)
  • Multiple font styles and sizes
  • Enhanced dark mode and letter fixation
  • OpenAI tokenization for advanced saccade control
  • Browser extensions (Chrome, Firefox)
  • Speed reading features
  • Divergent Readers Annual Challenge

🀝 Contributing

Contributions welcome! This is an open-source accessibility project.

  1. Fork the repo
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“œ License

MIT


πŸ‘₯ Credits

Created by: @ahmedbenaw (Product Manager, ADHD Survivor)
Refactored by: @Ahmadkhaled11 (Technical Lead)

This tool exists to help people with ADHD learn, grow, and thrive by making reading more accessible and less overwhelming.


🌟 Support

If Open.Bionic helps you, please:

  • ⭐ Star this repository
  • πŸ“’ Share with others who might benefit
  • πŸ’¬ Report bugs or suggest features via Issues
  • 🀝 Contribute to the codebase

Let's make reading accessible for everyone! πŸš€

About

A Reading System for Improving Reading focus, Speed and Comprehension

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •