Skip to content

A5rocks/code-jam-12

Repository files navigation

The Social Query Language (SQL-BSky)

Python BlueSky License Status

A retro terminal-style SQL interface for querying the BlueSky social network. Experience social media through the lens of structured query language with authentic CRT visual effects.

App Initialization

Features

  • Dual Authentication: Full BlueSky login or anonymous "stealth mode"
  • Public API Access: Query public content without authentication
  • ASCII Art Images: View embedded images as beautiful ASCII art
  • Real-time Validation: Live SQL syntax checking as you type
  • Retro CRT Interface: Authentic 1980s terminal experience with visual effects
  • Fast Performance: Optimized queries with scrolling support
  • Easter Eggs: Hidden surprises for the adventurous

Quick Start

Installation

  1. Clone the repository:

    git clone [email protected]:A5rocks/code-jam-12.git
    
    # move to the dir
    cd code-jam-12
  2. Start the development server:

    python3 dev.py
  3. That's it! Open your browser to: http://localhost:8000

First Steps

  1. Choose Authentication Mode:
    • Authenticated: Login with BlueSky credentials for full access
    • Stealth Mode: Browse public content anonymously

Note

If the page is slow, try disabling the CRT effect at this point.

  1. Try Your First Query:

    SELECT * FROM tables

    Running Test Query

  2. Explore Public Profiles:

    SELECT * FROM profile WHERE actor = 'bsky.app'

Query Reference

Available Tables

Table Description Auth Required Parameters
tables List all available tables No None
profile User profile information No actor (optional)
feed Posts from a specific user No author (required)
timeline Your personal timeline Yes None
suggestions Suggested users to follow No None
suggested_feed Recommended feeds No None
followers User's followers No actor (required)
following Who user follows No actor (required)
mutuals Mutual connections No actor (required)
likes User's liked posts Yes actor (required)

Example Queries

SELECT * FROM feed WHERE author='bsky.app'
  • This will get all fields from all posts from the author's feed
SELECT description FROM followers WHERE author='bsky.app'
  • This will get the bio of all followers of the author
SELECT * FROM tables
  • This will get all available table names

Known Issues

Warning

Please be aware of these current limitations before using the application.

Note

Queries to non-existent tables or fields will return empty rows instead of proper error messages.

Example:

-- Both of these return empty rows (same behavior)
SELECT likes FROM feed WHERE author = "bsky.app"
SELECT apples FROM feed WHERE author = "bsky.app"

KeyError in Feed Processing

Important

There's a known KeyError where the system looks for "feeds" but should be looking for "feed". This is a human error we discovered after the Code Jam programming time had ended, so we weren't able to fix it, but we're aware of the issue and it may cause some like-table-related queries to fail unexpectedly.

Table likes Not Functional

Caution

The likes table is currently broken and behaves like a non-existent table. This is due to the KeyError

Team - Iridescent Ivies

License

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


Thank you for exploring our project!!

About

iridescent ivies

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5