Skip to content

blacksky-algorithms/SAFEskies

Repository files navigation

SAFEskies Front‑End 🛡️

License: MIT Stability: Alpha

SAFEskies (Software Against a Fearful Environment) is a BlueSky feed management interface that enables secure moderation of custom feeds. Currently configured for the Blacksky feed generator with extensibility for other feeds.

Requires the SAFEskies API for backend operations.

Live Application: www.safeskies.app

SAFEskies Dashboard


Table of Contents


Features

Core Functionality

  • DID-Based Authentication: Secure login via BlueSky OAuth
  • Role-Based Access Control:
    • Admins: Feed creators (DID-matched) with full permissions
    • Moderators: Users with post removal privileges
  • Feed Management:
    • View managed feeds
    • Promote/demote moderators
    • Audit logs for all actions

Technical Highlights

  • Next.js 13 App Router architecture
  • TypeScript type safety
  • Tailwind CSS styling
  • Jest testing suite
  • Husky pre-commit hooks

⚠️ Stability Warning

IMPORTANT: SAFEskies is currently in an alpha state of development. The application is functional but subject to significant changes as we work toward a stable release.

You should be aware of the following:

  • The API and frontend interfaces may change without backward compatibility
  • Data structures and storage mechanisms could be modified between versions
  • Documentation is still evolving along with the application
  • Deployment procedures might change as we stabilize the architecture

We encourage testing and feedback but recommend caution when using SAFEskies in production environments at this stage.


Prerequisites

  • Node.js v18+
  • npm v9+ or yarn 1.22+
  • Backend API: Running instance of SAFEskies API
  • BlueSky Account: For authentication via OAuth

Installation

1. Clone Repository

git clone https://github.com/FreedomWriter/SAFEskies.git
cd SAFEskies

2. Install Dependencies

npm install
# or
yarn install

Configuration

Create .env.local:

NEXT_PUBLIC_BSKY_BASE_API_URL=https://api.bsky.app
NEXT_PUBLIC_BSKY_BASE=https://bsky.social
NEXT_PUBLIC_SAFE_SKIES_API=http://localhost:4000
NEXT_PUBLIC_CLIENT_URL=http://localhost:3000

Running the Application

Development

npm run dev
# Access at http://localhost:3000

Production Build

npm run build && npm start

Testing

npm test

Usage

SAFEskies provides a user-friendly interface for managing and moderating BlueSky feeds. Here's how to get started:

Authentication

  1. Navigate to the application at www.safeskies.app
  2. Click "Sign in with BlueSky" to authenticate using your BlueSky account
  3. Grant the requested permissions to allow SAFEskies to access your feed data

Core Functions

  • View Feeds: See all feeds you have permission to moderate
  • Search: Search for users or posts using the right-side search panel (desktop only)
  • Moderation: Remove posts that violate feed guidelines
  • User Management: Admins can promote users to moderator status or remove their privileges
  • Audit Logs: Review all moderation actions taken on your feeds

Search Functionality

SAFEskies includes a search panel (desktop layouts only) that allows you to search for both users and posts:

  • User Search: Search across all BlueSky users by handle or display name
  • Post Search: Search for posts with moderation context included

Important Note on Post Search

For performance reasons, post search always uses BlackSky as the moderation context, regardless of which feed you're currently viewing. This design decision was made because:

  1. Performance: Checking actual feed membership for each search result would be too slow
  2. BlackSky API Compatibility: The BlackSky moderation service is forgiving and works well with posts from any feed
  3. User Experience: Provides immediate search results without delays

This means that when you click on a post from search results, you'll always navigate to that post within the BlackSky feed context, even if the post might not actually be a member of BlackSky. This tradeoff prioritizes search speed and usability over perfect feed context accuracy.

Admin vs. Moderator Capabilities

  • Admins (feed creators) can:

    • Manage moderator permissions
    • View complete audit logs
    • Access all moderation functions
    • Configure feed settings
  • Moderators can:

    • Remove inappropriate posts
    • View their own moderation history
    • Access posts from managed feeds

For detailed usage instructions, please reference the SAFEskies Documentation (coming soon).

API Dependency

The frontend requires a running instance of the SAFEskies API for:

  • OAuth authentication with BlueSky
  • DID validation
  • Role management
  • Audit logging
  • Feed configuration

Security

Critical Requirements

  • Never expose Bluesky app passwords in client code
  • Use HTTPS in production
  • Rotate credentials quarterly
  • Validate DIDs on both client and API

Secure Practices

# Audit dependencies
npm audit

# Update packages
npm update --audit

Contributing

SAFEskies welcomes community contributions, but please note our current development phase focuses on establishing stability before implementing major new features.

Current Contribution Priorities

  • Bug fixes and stability improvements
  • Documentation improvements
  • Accessibility enhancements
  • Test coverage expansion

Contribution Process

  1. Check Existing Issues: Review open issues to see if your concern is already being addressed.

  2. Open an Issue First: Before submitting code changes, please open an issue to discuss your proposed changes.

    • For bugs, include reproduction steps and expected behavior
    • For features, explain the use case and implementation approach
  3. Development Workflow:

    # Fork and clone the repository
    git clone https://github.com/your-username/SAFEskies.git
    cd SAFEskies
    
    # Create a descriptive feature branch
    git checkout -b fix/issue-description
    
    # Install dependencies
    npm install
    
    # Make your changes with tests
    # Run tests to ensure no regressions
    npm test
  4. Code Standards:

    • Follow existing code style patterns
    • Include comments for complex logic
    • Add tests for new functionality
    • Update documentation to reflect changes
  5. Pull Request Process:

    • Ensure all tests pass
    • Reference the related issue in your PR
    • Provide a clear description of changes
    • Be responsive to review feedback

The maintainer will review PRs on a regular basis, prioritizing stability-focused contributions during this alpha development phase.

License

MIT License - See LICENSE for details.

Maintainer

Maintainer: Natalie Davis (@codefreedomritr.bsky.social)

About

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages