···11-# sv
22-33-Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli).
44-55-## Creating a project
66-77-If you're seeing this, you've probably already done this step. Congrats!
88-99-```sh
1010-# create a new project in the current directory
1111-npx sv create
1212-1313-# create a new project in my-app
1414-npx sv create my-app
1515-```
11+# athost
1621717-## Developing
1818-1919-Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
2020-2121-```sh
2222-npm run dev
33+An experimental web host built on atproto.
2342424-# or start the server and open the app in a new browser tab
2525-npm run dev -- --open
2626-```
55+Nothing has been formalized yet. Right now, a website is stored as a "bundle" record that looks something like this:
2762828-## Building
77+```ts
88+interface Bundle {
99+ /** The timestamp at which the latest version of the bundle was created. */
1010+ createdAt: string;
29113030-To create a production version of your app:
1212+ /** Human-readable summary of the deploy; notes, commit message, etc. */
1313+ description?: string;
31143232-```sh
3333-npm run build
1515+ /** A map of asset paths to blob references. */
1616+ assets: Record<string, { $type: "blob"; ref: { $link: string }; mimeType: string; size: number }>;
1717+}
3418```
35193636-You can preview the production build with `npm run preview`.
2020+To deploy a new version, upload the relevant blobs and update the record.
37213838-> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
2222+To serve the website, you need some sort of proxy server that fetches the appropriate files from the PDS when requests come in. `proxy.js` is a small (~150 line) example server.
+7-1
src/lib/atproto.ts
···44import type { Did } from "@atcute/lexicons";
5566export interface Bundle {
77+ /** The timestamp at which the latest version of the bundle was created. */
88+ createdAt: string;
99+1010+ /** Human-readable summary of the deploy; notes, commit message, etc. */
711 description?: string;
1212+1313+ /** A map of asset paths to blob references. */
814 assets: Record<string, { $type: "blob"; ref: { $link: string }; mimeType: string; size: number }>;
1515+916 fallback?: {
1017 path: string;
1118 status?: number;
1219 };
1313- createdAt: string;
1420}
15211622export default class ATProto {