Replace Payload with Elysia admin
Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
@@ -1,37 +1,54 @@
|
||||
# pozor
|
||||
|
||||
Dark-only Next.js shame board powered by images from a GitHub repository.
|
||||
Dark-only shame board with a static Astro front end and a tiny Elysia admin/API.
|
||||
|
||||
## What it does
|
||||
## Apps
|
||||
|
||||
- Loads image files from a public GitHub repository through the GitHub Contents API.
|
||||
- Shows the images as a dark evidence-board style gallery.
|
||||
- Lets the user enter a repository, folder, and branch from the page.
|
||||
- Shows an honest empty state when no source is configured or no images are found.
|
||||
- `apps/site`: Astro public board. It reads published cards from the Elysia API.
|
||||
- `apps/api`: Elysia admin/API. It owns cards, uploads, and the `/admin` panel.
|
||||
|
||||
## Local development
|
||||
## Local Development
|
||||
|
||||
```bash
|
||||
bun install
|
||||
bun run dev
|
||||
```
|
||||
|
||||
Then open `http://localhost:3000`.
|
||||
Open:
|
||||
|
||||
## Optional source configuration
|
||||
- Site: `http://localhost:4321`
|
||||
- Admin: `http://localhost:3001/admin`
|
||||
- API docs: `http://localhost:3001/docs`
|
||||
- OpenAPI JSON: `http://localhost:3001/openapi.json`
|
||||
|
||||
The board can also be preconfigured with environment variables:
|
||||
## Environment
|
||||
|
||||
The API stores cards and uploads in `apps/api/.data` locally.
|
||||
On Vercel, set `BLOB_READ_WRITE_TOKEN` to store cards and uploaded images in Vercel Blob.
|
||||
|
||||
Set these values locally and on Vercel:
|
||||
|
||||
```bash
|
||||
NEXT_PUBLIC_GITHUB_REPO=owner/repository
|
||||
NEXT_PUBLIC_GITHUB_PHOTOS_PATH=path/to/images
|
||||
NEXT_PUBLIC_GITHUB_BRANCH=main
|
||||
ADMIN_PASSWORD=
|
||||
API_URL=http://localhost:3001
|
||||
PUBLIC_API_URL=http://localhost:3001
|
||||
PUBLIC_SITE_URL=http://localhost:4321
|
||||
BLOB_READ_WRITE_TOKEN=
|
||||
```
|
||||
|
||||
If these values are not set, the page starts empty and waits for a real GitHub source to be entered.
|
||||
For deployment, point the Astro app at the deployed API origin by setting `API_URL` and `PUBLIC_API_URL` to that origin.
|
||||
|
||||
## Images
|
||||
|
||||
Cards support two image sources:
|
||||
|
||||
- `Image URL`: direct public image URL.
|
||||
- `Upload image`: stored locally in development or in Vercel Blob when `BLOB_READ_WRITE_TOKEN` is set.
|
||||
|
||||
## Build
|
||||
|
||||
```bash
|
||||
bun run build
|
||||
```
|
||||
|
||||
The Astro app can be hosted on Vercel as a static/front-end project. The Elysia API can be hosted on Vercel as a separate backend project using the Bun runtime.
|
||||
|
||||
Reference in New Issue
Block a user