Experimental app for markers to test Gazeteers + Geo lexicons. See ATgeo Experiments.
You'll need pnpm installed. If you don't have node installed, you can install it with pnpm.
# to add node everywhere, add the --global flag to the commands below
pnpm env latest
pnpm env use latest
Warning
OAuth login will only run in localhost and will persist challenges and sessions to disk. Must be heavily updated for real production use.
- Run
pnpx @atproto/lex-cli gen-api ./generated/api ./lexicons/**/*.json
to generate the Lexicons client code - Run
pnpx @atproto/lex-cli gen-server ./generated/server ./lexicons/**/*.json
to generate the Lexicons server code
- Run
pnpm install
- In the top level folder of the project, run
pnpm run db:migrate
. - Run
pnpm dev
- Go to
http://127.0.0.1/
- In the top level folder of the project, create a
.env
file. - Add
MARKER_APPVIEW_DID
to your.env
file. It should be of the formdid:web:a-reachable-url.com
. NOTE: this URL needs to be reachable from the web! You might want to use a local tunnel for this, liketailscale serve/funnel
orngrok
. - Enter the
appview/
directory, and runpnpm install
- From the
appview/
directory, runpnpm run dev
- Main entrypoint is at
src/routes/index.tsx
- Everything related to OAuth is in
src/lib/auth.ts
(stolen from simple local-only setup I had written previously) - Login component is in src/components/Login.tsx. There's no real validation logic.
- To log out, delete the
.tokens/
folder. And feel free to implement a real auth flow!
- You can add
DEFAULT_USER=your-pds-url
in.env
to have the login automatically prefilled - Install a new lexicon with
deno run jsr:@lpm/cli add path.to.lexicon.def
(needs deno)