Run Screenshothis on your own infrastructure with complete control and customization.
.env.example
files contain the definitive setup information.apps/server
Hono + tRPC API with TypeScript for fast, type-safe screenshot generationapps/web
React with TanStack Start and TailwindCSS for the dashboard and playgroundpackages/*
Common schemas, utilities, and types shared across applicationsComponent | Technology | Purpose |
---|---|---|
Runtime | Node.js + TypeScript | Fast, type-safe execution |
API Framework | Hono + tRPC | Lightweight, type-safe API |
Frontend | React + TanStack Start | Modern, fast web interface |
Database | PostgreSQL + Drizzle ORM | Reliable data persistence |
File Storage | S3-compatible storage | Screenshot and asset storage |
Cache/Sessions | Redis | Fast caching and session management |
Styling | TailwindCSS | Utility-first CSS framework |
Linting/Formatting | Biome | Fast, consistent code formatting |
Package Manager | pnpm | Efficient dependency management |
Monorepo | Turborepo | Fast, scalable build system |
Containerization | Docker + Docker Compose | Easy deployment and scaling |
Install Node.js
node --version
should show v18.0.0 or higherInstall pnpm
pnpm --version
should show the installed versionInstall Docker
docker --version
and docker-compose --version
should both workInstall Git
git --version
should show your Git installationClone the repository
Install dependencies
Start supporting services
localhost:5432
localhost:6379
localhost:9000
(API) and localhost:9001
(Console)docker-compose ps
should show all services as “Up”Configure environment variables
Set up the database
Configure local storage
screenshothis-access-key
screenshothis-secret-key
screenshothis-bucket
Start the applications
apps/server/.env
)apps/web/.env
)Command | Description |
---|---|
pnpm install | Install all dependencies for the monorepo |
pnpm run dev | Start both web and server in development mode |
pnpm run dev:web | Start only the web (frontend) application |
pnpm run dev:server | Start only the server (backend) application |
Command | Description |
---|---|
pnpm run build | Build all applications for production |
pnpm run start | Start production builds (after building) |
Command | Description |
---|---|
pnpm run db:push | Apply Drizzle schema changes to the database |
pnpm run db:studio | Open Drizzle Studio to view and manage the database |
pnpm run db:generate | Generate migration files for schema changes |
pnpm run db:migrate | Apply migrations to the database |
Command | Description |
---|---|
pnpm run check-types | Run TypeScript type checking across all packages |
pnpm run check | Run Biome linting and formatting checks |
pnpm run format | Apply Biome formatting to the codebase |
pnpm run lint | Run Biome linting checks |
pnpm run lint:fix | Run Biome linting and fix issues automatically |
Build production images
Set up external services
Configure production environment
Set up infrastructure
openssl rand -base64 32
Request size limits
Rate limiting
CSP bypass auditing
bypass_csp=true
is audit-logged server-sideInput validation
Keep dependencies updated
Secure your database
Configure HTTPS
Monitor and log
http://localhost:4983
where you can:
db:push
for rapid development iteration, but use migrations (db:generate
and db:migrate
) for production deployments where you need versioned, reversible database changes.Port conflicts
docker-compose.yml
sudo lsof -i :5432
to find what’s using PostgreSQL portDatabase connection errors
docker-compose ps
docker-compose exec postgres psql -U screenshothis -d screenshothis
docker-compose down && docker-compose up -d
S3 storage connection errors
http://localhost:9001
curl http://localhost:9000/minio/health/live
Build and dependency errors
rm -rf node_modules && pnpm install
rm -rf .turbo
pnpm run check-types
node --version
(should be v18+)npm install -g pnpm@latest
docker-compose logs
or docker-compose logs <service-name>
Report issues
Improve documentation
Submit code changes
pnpm run check
before committingpnpm run check-types
pnpm run dev
Join discussions
git checkout -b fix-something
pnpm run dev