diff --git a/README.md b/README.md
index b5b2950..f4d0670 100644
--- a/README.md
+++ b/README.md
@@ -1,38 +1,86 @@
-# sv
+# svelte atproto client oauth demo
-Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli).
+this is a scaffold for how to get client side oauth working with sveltekit and atproto
+using the `@atcute/oauth-browser-client` library.
-## Creating a project
+perfect for static builds e.g. using github pages.
-If you're seeing this, you've probably already done this step. Congrats!
+## how to install
-```bash
-# create a new project in the current directory
-npx sv create
+### either clone this repo
-# create a new project in my-app
-npx sv create my-app
+1. clone this repo
+2. run `npm install`
+3. run `npm run dev`
+4. go to `http://127.0.0.1:5179`
+5. for deployment change the `SITE_URL` variable in `src/lib/oauth/const.ts`
+(e.g. for github pages: `https://your-username.github.io`) and set your base in `svelte.config.js`
+(e.g. for github pages: `base: '/your-repo-name/'`)
+
+
+### or manually install in your own project
+
+- copy the `src/lib/oauth` folder into your own project
+- also copy the `src/routes/client-metadata.json` folder into your project
+- add the following to your `src/routes/+layout.svelte`
+
+```svelte
+
+
+{@render children()}
```
-## Developing
+## how to use
-Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
+### login flow
-```bash
-npm run dev
+Either use the `LoginModal` component to render a login modal or use the `client` object to handle the login flow yourself.
-# or start the server and open the app in a new browser tab
-npm run dev -- --open
+```ts
+// handlin login flow yourself
+import { client } from '$lib/oauth';
+
+// methods:
+client.login(handle); // login the user
+client.isLoggedIn; // check if the user is logged in
+client.logout(); // logout the user
```
-## Building
+LoginModal is a component that renders a login modal, add it for a quick login flow.
+
+```svelte
+
-To create a production version of your app:
+
-```bash
-npm run build
+
```
-You can preview the production build with `npm run preview`.
+### make requests
+
+Get the user's profile and make requests with the `client.rpc` object.
-> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
+```ts
+import { client } from '$lib/oauth';
+
+// get the user's profile
+const profile = client.profile;
+
+// make requests with the client.rpc object
+const response = await client.rpc.request({
+ type: 'get',
+ nsid: 'app.bsky.feed.getActorLikes',
+ params: {
+ actor: client.profile?.did,
+ limit: 10
+ }
+});
+```
diff --git a/src/lib/UI/Input.svelte b/src/lib/UI/Input.svelte
deleted file mode 100644
index 3d0284d..0000000
--- a/src/lib/UI/Input.svelte
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
diff --git a/src/lib/UI/Button.svelte b/src/lib/oauth/UI/Button.svelte
similarity index 100%
rename from src/lib/UI/Button.svelte
rename to src/lib/oauth/UI/Button.svelte
diff --git a/src/lib/UI/LoginModal.svelte b/src/lib/oauth/UI/LoginModal.svelte
similarity index 73%
rename from src/lib/UI/LoginModal.svelte
rename to src/lib/oauth/UI/LoginModal.svelte
index 3f811c6..33e76be 100644
--- a/src/lib/UI/LoginModal.svelte
+++ b/src/lib/oauth/UI/LoginModal.svelte
@@ -1,7 +1,13 @@
+
+
-{#if showLoginModal.visible}
+{#if loginModalState.visible}
diff --git a/src/routes/client-metadata.json/+server.ts b/src/routes/client-metadata.json/+server.ts
index 17ac8c7..a668e20 100644
--- a/src/routes/client-metadata.json/+server.ts
+++ b/src/routes/client-metadata.json/+server.ts
@@ -1,4 +1,4 @@
-import { metadata } from '$lib/client-metadata';
+import { metadata } from '$lib/oauth';
import { json } from '@sveltejs/kit';
export const prerender = true;
diff --git a/svelte.config.js b/svelte.config.js
index cc35615..4b8510e 100644
--- a/svelte.config.js
+++ b/svelte.config.js
@@ -8,9 +8,6 @@ const config = {
preprocess: vitePreprocess(),
kit: {
- // adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
- // If your environment is not supported, or you settled on a specific environment, switch out the adapter.
- // See https://svelte.dev/docs/kit/adapters for more information about adapters.
adapter: adapter(),
paths: {
base: process.env.NODE_ENV === 'development' ? '' : '/svelte-atproto-client-oauth'