Skip to content

dsmurl/mirror-ball

Repository files navigation

mirror-ball

Welcome to the best mirror ball project ever!

Rated the best image hosting project of 2025 by New York Tymes.

Simple image upload and listing site with role-based access, built as an Nx monorepo. Frontend (Vite) and backend (Bun) share Zod schemas. Infra is provisioned with Pulumi on AWS (S3, CloudFront, Cognito, DynamoDB, App Runner).

Docs

Plans

Workspace

  • Nx monorepo using pnpm
  • Apps:
  • apps/web — Vite + React
  • apps/api — Bun HTTP service
  • Libs:
  • libs/shared-schemas — Zod schemas and inferred types
  • Infra:
  • apps/infra/ — Pulumi TypeScript program

See the docs above for details.

Run locally (quick start)

  • Prerequisites: pnpm, Node LTS, Bun (for API)
  1. Install deps
pnpm install
  1. Start the API (Bun)
pnpm nx run api:dev

Environment variables commonly used by the API (place in apps/api/.env):

  • PORT (default 8080)
  • AWS_REGION (e.g., us-west-2)
  • IMAGE_TABLE_NAME - from pulumi stack output
  • CONFIG_TABLE_NAME - from pulumi stack output
  • BUCKET_NAME - from pulumi stack output
  • USER_POOL_ID - from pulumi stack output
  1. Start the web app (Vite)
pnpm nx run web:dev

Recommended .env in apps/web/:

  • VITE_API_BASE_URLhttp://localhost:8080/api (for local dev)
  • VITE_USER_POOL_ID - from pulumi stack output
  • VITE_USER_POOL_CLIENT_ID - from pulumi stack output
  • VITE_COGNITO_DOMAIN - from pulumi stack output (e.g., https://<domain>.auth.us-west-2.amazoncognito.com)

Notes:

  • Contracts and types are shared from libs/shared-schemas.
  • The API enforces role checks (Cognito groups) and optional email-domain allowlist.

About

A simple project to manage and serve images publicly

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors