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).
- Infra setup
- AWS Access with Granted
- API — local development
- Deployment (API & Frontend)
- Post-Deployment Verification
- Nx monorepo using pnpm
- Apps:
apps/web— Vite + Reactapps/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.
- Prerequisites: pnpm, Node LTS, Bun (for API)
- Install deps
pnpm install
- 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- frompulumi stack outputCONFIG_TABLE_NAME- frompulumi stack outputBUCKET_NAME- frompulumi stack outputUSER_POOL_ID- frompulumi stack output
- Start the web app (Vite)
pnpm nx run web:dev
Recommended .env in apps/web/:
VITE_API_BASE_URL—http://localhost:8080/api(for local dev)VITE_USER_POOL_ID- frompulumi stack outputVITE_USER_POOL_CLIENT_ID- frompulumi stack outputVITE_COGNITO_DOMAIN- frompulumi 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.