# smallbird social i'm sure you have a question and that the question is this: ## why would you do this. to test my abilities. also, for some reason social-app's dependency install situation is fucked for me and rather than try and fight node's gdawful ecosystem i decided to just see how much i could accomplish in php with as few dependencies as possible and as little javascript as possible because i'm so fucking tired of dependency chaining where i'm instaling 80384498549320934 packages and don't know what 90% are. i also just think it's funny to write things in php in this day and age. similarly to [red dwarf](https://reddwarf.whey.party/), my approach is to try and use data from outside the core bsky servers as much as possible (so, getting DID info directly from their DNS/.well-known, pulling info from plc.directory and constellation, etc) to reduce reliance on a singular entity. you can set a default fallback public API to try and resolve information; by default it's set to the bsky api. if another public API comes into being i might switch it to that. ## is it going to have [x] feature maybe! i'm not sure if i can or will go for 100% feature parity but i'm going to try my darndest the idea is * no javascript components just straight vanilla javascript (except the compilation tools) * only the javascript required to load new posts and set settings * use as much native html functionality as possible (popovers, details/summary) * work around the central bsky servers whenever possible * keep it runnable on a potato * maintain admin flexibility with respect to data sources and themeing ## tdl * [X] Move profile rendering to bskyRenderer lib file (and also fix the rendering) * [X] Unmove profile rendering and then move it to template files * [X] Implement feeds page (still dependent on bsky) * [X] Implement search (still dependent on bsky) * [ ] Make settings page??? * [ ] Create account page * [X] Hashtag feed page (still dependent on bsky) * [ ] Move interaction stuff to the renderer * [X] Apply facets to text * [X] Templating engine?? * [ ] Make login page actually work * [X] Figure out how to do threading (never mind threading sucks) * [ ] User authentication (:C) * [ ] Fetch next set of items when user hits bottom of container * [ ] ?? how to get following count ?? * [ ] Make the interaction buttons work * [ ] Posting box * [X] Figure out how to run Constellation server despite build time for rocksdb being FOREVER * [ ] More color themes? (i have priorities) * [X] Figure out why pages cut off loading halfway (why) * [ ] Find out how to implement a better concurrency version of sqlite * [ ] Add more exception handlers so it 500 errors less ## thanks to * [pdsls.dev](https://pdsls.dev) for helping me figure out what API endpoints to call from the network tab * [constellation](https://constellation.microcosm.blue) and [slingshot](https://slingshot.microcosm.blue) for a lot of data fetching to reduce load on PDS + dependence on bsky.app * [plc.directory](https://plc.directory) and [plc.parakeet.at](https://plc.parakeet.at) for plc lookups * [red dwarf](https://reddwarf.whey.party) for being inspirational (and *also* helping me figure out what API endpoints to call) * [bailey townsend]() because i stared at your rust oauth code for several hours trying to divine how to make PHP work. thank you ## dependencies * guzzle (for http requests) * monolog (for logging; mostly just a dev thing) * flight (for routing) * latte (for templating) * opengraph (for what you'd expect) * php-oauth (also for what you'd expect) ## suppose i am someone who wanted to install this ok wowee!! just so you know this isn't fully cooked yet so there's a lot of features missing. there's a lot of stuff that goes into one of these things as it turns out. but if you really want to: - edit the values in config.php. if you don't have a pds you're willing to let people sign up with or don't have a favorite (or don't know what that is) just leave it set as-is. you'll need to graph the atURIs of feeds to use for your frontpage/favorite feeds area; you can look those up using [pdsls.dev](https://pdsls.dev). - copy .env.example to .env and add your secret values to it. - copy the files in the data folder and remove the .example suffix. these are for globally banning/suspending people at the client level (e.g. if you just don't want anyone to be able to see j*sse s*ngal on your client). - get [composer](https://getcomposer.org) if you don't have it and then do `composer install` in the folder - install a javascript runtime if you don't have one (e.g. [node.js](https://nodejs.org), [bun](https://bun.sh), [deno](https://deno.com)) and a package manager if you're using regular node.js (e.g. [npm](https://npmjs.com), [pnpm](https://pnpm.io/), [yarn](https://yarnpkg.com/)) and then do `[runtime/pkg manager] vite build` to build the files. (you can also run `[runtime/pkg manager] vite dev` if you want to run a local server to check it out.) - make a `jwks.json` file (can generate one [here](https://jwkset.com/generate); use ECDSA, ES256, and Signature as your options. delete the "d" key from the file before using) and put it in your root folder. if you want the pretty urls you will want to run this on a server with rewrites, configure them, and set that to "on" in your config. it's not required! i feel like the ugly urls are part of the charm honestly ## i think this is neat and i want to give you money my ko-fi is [here](https://ko-fi.com/veryroundbird) and if you have, like, real jobs definitely [hit me up](mailto:carly@veryroundbird.house)