Screenshot generation tool for social media graphics, monthly updates, announcement images, and printable materials.
This repository contains print-optimized and screenshot-optimized pages designed to generate high-quality 1:1 images for:
- Social media posts (Instagram, Facebook, Twitter/X)
- Monthly update graphics
- Pricing sheets
- Announcement posters
- Printable materials
- Vite - Build tool and dev server
- Solid.js - UI framework
- Playwright - Screenshot generation and testing
- Tailwind CSS - Styling
- TypeScript - Type safety
- pillar-ui - Shared component library (git submodule)
- Node.js 20+ (LTS recommended)
- Git with SSH access to GitHub
- SSH key configured for KahitSan organization
-
Clone the repository with submodules:
git clone --recurse-submodules git@github.com:KahitSan/kahitsan-posters.git cd kahitsan-postersIf you already cloned without
--recurse-submodules:git submodule update --init --recursive
-
Install dependencies:
npm install
-
Install Playwright browsers:
npx playwright install chromium
npm run devThe dev server will start at http://localhost:5173
/monthly-update/oct-2025-p1- October 2025 Monthly Update (Part 1)/monthly-update/oct-2025-p2- October 2025 Monthly Update (Part 2)/pricing/panganiban- Panganiban Pricing Sheet/pricing/compact-panganiban- Compact Panganiban Pricing/announcement/early-closing-dec-21- Early Closing Dec 21 Announcement
Add ?dark query parameter to any route to see dark mode:
http://localhost:5173/announcement/early-closing-dec-21?dark
# Generate announcement screenshots
npm run screenshot:announcements
# Generate monthly update screenshots
npm run screenshot:monthly
# Generate all screenshots
npm run screenshot:all# Run all screenshot tests
npm run test
# Run with UI
npm run test:ui
# Run in headed mode (see browser)
npm run test:headedScreenshots are saved to screenshots/ directory (gitignored):
screenshots/
├── announcements/
│ └── early-closing-dec-21-2025/
│ ├── light.png
│ └── dark.png
├── monthly-updates/
│ ├── oct-2025-p1/
│ └── oct-2025-p2/
└── pricing/
└── panganiban/
kahitsan-posters/
├── src/
│ ├── pages/
│ │ ├── announcements/ # Announcement posters
│ │ ├── monthly-updates/ # Monthly update graphics
│ │ └── pricing/ # Pricing sheets
│ ├── App.tsx # Router configuration
│ ├── index.tsx # Entry point
│ └── index.css # Global styles
├── tests/ # Playwright screenshot tests
├── scripts/ # Screenshot generation scripts
├── assets/ # Images and logos
├── app/
│ └── pillar-ui/ # Shared UI components (submodule)
├── screenshots/ # Generated output (gitignored)
└── playwright.config.ts
- Create page component in appropriate directory
- Add route to
src/App.tsx - Create screenshot script in
scripts/ - Add Playwright test in
tests/(optional) - Run dev server to preview
- Generate screenshots
All poster pages must use the following logo convention:
- Light mode: Use
LOGO-kahitsan.v2.svg - Dark mode: Use
logo.png
Example imports (from src/pages/announcements/):
import logoLight from '../../../assets/LOGO-kahitsan.v2.svg'
import logoDark from '../../../assets/logo.png'This ensures proper contrast and visibility across both display modes.
This repo uses pillar-ui as a git submodule for shared components. To update:
cd app/pillar-ui
git pull origin master
cd ../..
git add app/pillar-ui
git commit -m "update: pillar-ui submodule"- All pages are optimized for 1:1 aspect ratio (square) screenshots
- Pages support light and dark modes via
?darkquery parameter - Screenshots are 1080x1080 at 2x DPI (2160x2160 actual pixels)
- This is a standalone tool, separate from the main pillar application