···109109110110The frontend will be available at http://localhost:3000 and will connect to the API at http://localhost:4444.
111111112112+## Running the Bluesky App against Konbini
113113+114114+Konbini implements a large portion of the app.bsky.\* appview endpoints that
115115+are required for pointing the main app to it and having it work reasonably
116116+well.
117117+118118+To accomplish this you will need a few things:
119119+120120+### Service DID
121121+122122+You will need a DID, preferably a did:web for your appview that points at a
123123+public endpoint where your appview is accessible via https.
124124+I'll get into the https proxy next, but for the did, I've just pointed a domain
125125+I own (in my case appview1.bluesky.day) to a VPS, and used caddy to host a file
126126+at `/.well-known/did.json`.
127127+That file should look like this:
128128+129129+```json
130130+{
131131+ "@context": [
132132+ "https://www.w3.org/ns/did/v1",
133133+ "https://w3id.org/security/multikey/v1"
134134+ ],
135135+ "id": "did:web:appview1.bluesky.day",
136136+ "verificationMethod": [
137137+ {
138138+ "id": "did:web:api.bsky.app#atproto",
139139+ "type": "Multikey",
140140+ "controller": "did:web:api.bsky.app",
141141+ "publicKeyMultibase": "zQ3shpRzb2NDriwCSSsce6EqGxG23kVktHZc57C3NEcuNy1jg"
142142+ }
143143+ ],
144144+ "service": [
145145+ {
146146+ "id": "#bsky_notif",
147147+ "type": "BskyNotificationService",
148148+ "serviceEndpoint": "YOUR APPVIEW HTTPS URL"
149149+ },
150150+ {
151151+ "id": "#bsky_appview",
152152+ "type": "BskyAppView",
153153+ "serviceEndpoint": "YOUR APPVIEW HTTPS URL"
154154+ }
155155+ ]
156156+}
157157+```
158158+159159+The verificationMethod isn't used but i'm not sure if _something_ is required
160160+there or not, so i'm just leaving that there, it works on my machine.
161161+162162+### HTTPS Endpoint
163163+164164+I've been using ngrok to proxy traffic from a publicly accessible https url to my appview.
165165+You can simply run `ngrok http 4446` and it will give you an https url that you
166166+can then put in your DID doc above.
167167+168168+### The Social App
169169+170170+Now, clone and build the social app:
171171+172172+```
173173+git clone https://github.com/bluesky-social/social-app
174174+cd social-app
175175+yarn
176176+```
177177+178178+And then set this environment variable that tells it to use your appview:
179179+180180+```
181181+export EXPO_PUBLIC_BLUESKY_PROXY_DID=did:web:YOURDIDWEB
182182+```
183183+184184+And finally run the app:
185185+186186+```
187187+yarn web
188188+```
189189+190190+This takes a while on first load since its building everything.
191191+After that, load the localhost url it gives you and it _should_ work.
192192+112193## License
113194114195MIT (whyrusleeping)
196196+197197+```
198198+199199+```