Skip to content

safegergis/playability

Repository files navigation

Playability

Making video games accessible and inclusive for everyone

Live Site License Go Nuxt PostgreSQL


Mission Statement

At Playability, we believe that everyone should have the opportunity to enjoy video games, regardless of their physical or cognitive abilities. We strive to break down barriers in gaming by providing accurate, user-driven accessibility information and advocating for more inclusive game design. Our goal is to create a world where no gamer is left behind due to lack of accessibility features.

Visit us live at: playablty.com


Screenshots

Home Page Game Details Search Results

Features

User-Facing Features

  • User Registration & Authentication: Secure JWT-based authentication with bcrypt password hashing
  • Comprehensive Game Database: Access thousands of games with detailed information sourced from IGDB and PCGamingWiki
  • Detailed Game Pages: View comprehensive game information including:
    • Cover art and screenshots
    • Supported platforms
    • Release date and developer information
    • Genre and tags
    • Accessibility features with user-submitted ratings
  • User-Driven Accessibility Feedback:
    • Submit detailed reports on game accessibility features
    • Rate the effectiveness of existing accessibility options
    • Provide comments and tips for other users
  • Accessibility Information: Track features such as:
    • Closed captions and subtitle options
    • Colorblind modes and visual assistance settings
    • Full controller support and button remapping capabilities
  • Accessibility Scoring System: Aggregate user feedback to provide overall accessibility scores for games
  • Responsive Design: Mobile-friendly interface using Tailwind CSS, accessible across all devices

Technical Features

  • RESTful API: Well-structured API endpoints for seamless frontend-backend communication
  • JWT Authentication: Secure, token-based authentication system for protected routes
  • AI Content Moderation: Automated moderation of user submissions to ensure quality and safety
  • Docker Support: Complete containerization for easy deployment and development
  • Database Migrations: Version-controlled schema management
  • WCAG Compliance: Platform itself follows accessibility best practices

Tech Stack

Frontend

Backend

  • Go 1.23 - High-performance programming language
  • Chi Router - Lightweight and flexible HTTP router
  • PostgreSQL 16 - Robust relational database
  • JWT Auth - Secure authentication with go-chi/jwtauth
  • Bcrypt - Password hashing

External APIs

DevOps

  • Docker & Docker Compose - Containerization and orchestration
  • GitHub Actions - CI/CD pipeline

Project Structure

playability/
├── frontend/              # Nuxt 3 frontend application
│   ├── components/       # Vue components (including ShadCN UI)
│   ├── pages/           # Nuxt pages (routes)
│   ├── server/          # Server API routes
│   └── types/           # TypeScript definitions
├── backend/              # Go REST API
│   ├── auth/            # JWT & password hashing
│   ├── cmd/api/         # Application entry point
│   ├── db/              # Database layer
│   ├── handlers/        # HTTP request handlers
│   ├── pkg/             # Utilities (AI, calc, fetch)
│   └── types/           # Go type definitions
├── database/             # Database schema & scripts
│   ├── migrations/      # Database migrations
│   └── scripts/         # Backup, restore, init scripts
├── docker-compose.yml    # Development environment
└── Makefile             # Development commands

Quick Start

Prerequisites

  • Docker and Docker Compose installed
  • API keys for IGDB API and AI moderation service

Setup

  1. Clone the repository:

    git clone <repository-url>
    cd playability
  2. Create environment file:

    cp .env.example .env
  3. Generate JWT secret:

    openssl rand -base64 32
  4. Edit .env with your credentials:

    # Required values:
    DB_PASSWORD=your_secure_password
    JWT_SECRET=<paste generated secret>
    IGDB_ACCESS_TOKEN=your_igdb_token
    IGDB_CLIENT_SECRET=your_igdb_secret
    
    # Match DB_PASSWORD with POSTGRES_PASSWORD
    POSTGRES_PASSWORD=your_secure_password
  5. Start the application:

    docker-compose up -d
  6. Access the application:

The database initializes automatically on first run.


Development Commands

Docker Operations

# Start all services
docker-compose up -d

# View all logs
docker-compose logs -f

# View specific service logs
docker-compose logs -f backend
docker-compose logs -f frontend

# Stop all services
docker-compose down

# Restart all services
docker-compose restart

# View running containers
docker-compose ps

# Rebuild specific service
docker-compose up -d --build backend

# Stop and remove everything (including data)
docker-compose down -v

Database Operations

# Open PostgreSQL shell
docker-compose exec postgres psql -U playability_user -d playability

# Create database backup
docker-compose --profile backup run --rm db-backup

# Run migrations
docker-compose run --rm db-migrate /migrate.sh up

# Check migration status
docker-compose run --rm db-migrate /migrate.sh status

# Rollback migration
docker-compose run --rm db-migrate /migrate.sh down

Frontend Development

cd frontend

# Development server
pnpm dev

# Production build
pnpm build

# Preview production build
pnpm preview

# Lint code
pnpm lint

# Type checking
pnpm typecheck

Backend Development

cd backend

# Run development server
go run cmd/api/main.go

# Build binary
go build cmd/api/main.go

# Run tests
go test ./...

# Run tests with coverage
go test -cover ./...

Database

Schema

The database uses PostgreSQL with three main tables:

  • users - User accounts and authentication
  • games - Game information with accessibility features
  • reports - User-submitted accessibility reports

Custom types:

  • feature_support - ENUM: 'false', 'unknown', 'limited', 'true'

Migrations

# Create new migration
./database/scripts/migrate.sh create migration_name

# Apply migrations
docker-compose run --rm db-migrate /migrate.sh up

# Check status
docker-compose run --rm db-migrate /migrate.sh status

# Rollback last migration
docker-compose run --rm db-migrate /migrate.sh down

Backups

# Create backup
docker-compose --profile backup run --rm db-backup

# Backups are saved to ./backups/ directory

# Restore from backup
./database/scripts/restore.sh backups/playability_full_YYYYMMDD_HHMMSS.dump.gz

API Endpoints

Public Endpoints

  • GET /search - Search games
  • GET /games?id={id} - Get game details
  • GET /featured - Get featured games
  • GET /reports/cards/{game} - Get report cards for game
  • GET /reports/features/{game} - Get feature statistics
  • GET /reports/score/{game} - Get accessibility score

User Endpoints

  • POST /user/login - User authentication
  • POST /user/register - User registration
  • GET /user/{id} - Get user profile

Protected Endpoints (JWT Required)

  • POST /user/report - Submit accessibility report

Security Features

  • JWT Authentication with HS256 signing and 24-hour expiration
  • Bcrypt Password Hashing with default cost factor (10)
  • AI Content Moderation for all user-submitted reports
  • Parameterized SQL Queries for injection protection
  • CORS Configuration with environment-based origins
  • HTTP-Only Cookies for secure token storage

Testing

Frontend Tests

cd frontend
pnpm test          # Run tests
pnpm lint          # Lint code
pnpm typecheck     # Type checking

Backend Tests

cd backend
go test ./...                    # Run all tests
go test -v ./db/                 # Test database layer
go test -cover ./handlers/       # Test with coverage

Contributing

We welcome contributions! Here's how to get started:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Run tests and linting
  5. Commit your changes (git commit -m 'Add amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

Development Guidelines

  • Frontend: Follow Vue.js and Nuxt best practices
  • Backend: Follow Go conventions and use dependency injection
  • Database: Always create migrations for schema changes
  • Testing: Write tests for new features
  • Documentation: Keep code well-documented

Roadmap

  • Enhanced search with filters and sorting
  • User profiles and contribution tracking
  • Game recommendations based on accessibility needs
  • Community forums and discussions
  • Mobile native apps (iOS/Android)
  • API documentation with Swagger/OpenAPI
  • Advanced analytics and reporting
  • Email notifications for game updates
  • Multi-language support
  • Accessibility audit tools for developers

License

This project is licensed under the MIT License - see the LICENSE file for details.


Acknowledgments

  • IGDB for providing comprehensive game data
  • PCGamingWiki for accessibility information
  • ShadCN for the UI component library
  • The gaming accessibility community for inspiring this project

Contact & Support

  • Live Site: playablty.com
  • Issues: Please use the GitHub issue tracker
  • Discussions: Use GitHub Discussions for questions and ideas

Made with care for accessible gaming

Visit Playability | Report Bug | Request Feature

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors