···11+# Generated by `openssl ecparam --name secp256k1 --genkey --noout --outform DER | tail --bytes=+8 | head --bytes=32 | xxd --plain --cols 32`
22+APPVIEW_K256_PRIVATE_KEY_HEX=
33+44+# Database
55+DB_HOST=localhost
66+DB_PORT=27017
77+DB_NAME=dev
88+DB_USER=mongo
99+DB_PASSWORD=mongo
1010+1111+# Server
1212+HOST=0.0.0.0
1313+NODE_ENV=development
1414+PORT=3000
1515+PUBLIC_URL=http://localhost:3000
1616+SERVICE_DID=did:web:localhost
+37
services/appview/README.md
···11# Appview
22+33+## Running
44+55+To run for development, first install dependencies.
66+`pnpm install`
77+88+To run in Docker, first build the image:
99+`docker build -t appview .`
1010+1111+Then run the container:
1212+`pnpm docker-dev`
1313+1414+For development without Docker, copy the .env.example file into a .env file and follow the instructions to generate a key, then start the development server:
1515+`pnpm dev`
1616+1717+This will start the server in development mode with hot reloading enabled.
1818+1919+## Environment Variables
2020+2121+The following environment variables are required:
2222+2323+- `PORT` - Port to run the server on (default: 3000)
2424+- `DATABASE_URL` - MongoDB connection string
2525+- `DID_RESOLVER_URL` - URL of the DID resolver service
2626+- `CDN_URL` - URL of the CDN service for serving media
2727+2828+## API Routes
2929+3030+The service exposes the following API routes:
3131+3232+### Actor Routes
3333+- `GET /xrpc/so.sprk.actor.getProfile` - Get profile details for an actor
3434+- `GET /xrpc/so.sprk.actor.searchActors` - Search for actors
3535+3636+### Feed Routes
3737+- `GET /xrpc/so.sprk.feed.getPosts` - Get post objects from URIs
3838+- `GET /xrpc/so.sprk.feed.getAuthorFeed` - Get a post and all replies to it