demo-atp

command module
v0.0.0-...-430e21d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2024 License: MIT Imports: 28 Imported by: 0

README

ATProto Demo App

This repo implements an application on ATProto. It is an 'appview' for a linktree style app with a comment section on each users profile.

Architecture

The AppView portion (the Go application here) subscribes to the firehose and watches for relevant records, which it then indexes in its database. It then serves that data over its API to the frontend application where it is rendered.

The users edit their profile or leave comments by writing records to their repo, which then get propagated through the firehose and collected here.

For this app, I defined two record types world.bsky.demo.profile and world.bsky.demo.comment. These are in the records directory, and have cbor marshalers generated for them by the code in the gen directory.

Running it

Build

First, build the AppView server:

go build

Then build the frontend server.

cd frontend
npm install
Running

Run the Go AppView

./demo-atp

Then run the frontend

cd frontend
npm start
Now put some test data in

Publish some test data with your account by setting your auth info and running the script

export DEMOUSER=your.username.social
export DEMOPASSWORD=thebestapppassword
./setup-data.sh

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL