A Next.js application for tracking laundry items and generating formatted images with counts overlaid on a template. Includes Discord integration for automated submissions.
AI/agent guidance: see AGENTS.md.
- Laundry Item Counter: Track counts across multiple categories (Regular Laundry, Home Items, Other Items)
- Custom Items: Add and track custom laundry items
- Image Generation: Automatically generate images with counts overlaid on template
- Discord Integration: Send generated images directly to Discord via webhook
- Responsive UI: Clean, mobile-friendly interface built with Tailwind CSS and Radix UI
- Node.js 18+ and pnpm
- Discord webhook URL (for Discord integration)
- Signature image file (
public/signature.pngorpublic/signature_bo.png)
-
Clone and install dependencies:
pnpm install
-
Set up environment variables: Create a
.env.localfile with:DISCORD_WEBHOOK_URL=your_discord_webhook_url_here
-
Add signature file: Place your signature image as
public/signature.pngor update the path inapp/page.tsx(line 147) -
Run the development server:
pnpm dev
Open http://localhost:3000 in your browser.
laundry-silayan/
├── app/
│ ├── page.tsx # Main application page
│ ├── layout.tsx # Root layout
│ ├── api/discord/route.ts # Discord webhook API endpoint
│ └── assets/data/list.tsx # Laundry item categories and coordinates
├── components/ui/ # Reusable UI components
├── lib/utils.ts # Utility functions
└── public/ # Static assets (template.jpg, signature.png)
The application uses public/template.jpg as the base image. Item coordinates are defined in app/assets/data/list.tsx.
- Create a Discord webhook in your server settings
- Copy the webhook URL
- Add it to
.env.localasDISCORD_WEBHOOK_URL
Edit app/assets/data/list.tsx to:
- Add/remove laundry categories
- Adjust item coordinates for the template
- Modify item names
# Install dependencies
pnpm install
# Run development server
pnpm dev
# Build for production
pnpm build
# Run production server
pnpm start
# Lint code
pnpm lint- Framework: Next.js 15 with App Router
- Language: TypeScript
- Styling: Tailwind CSS with class-variance-authority
- UI Components: Radix UI primitives
- Icons: Lucide React
- Package Manager: pnpm
- ESLint configured for code consistency
- TypeScript for type safety
- Pre-commit hooks recommended (not yet configured)
The easiest way to deploy is using Vercel:
# Install Vercel CLI
pnpm add -g vercel
# Deploy
vercelMake sure to set the DISCORD_WEBHOOK_URL environment variable in your Vercel project settings.
- Ensure
public/template.jpgexists - Check item coordinates in
list.tsxmatch template layout - Verify signature image path is correct
- Confirm
DISCORD_WEBHOOK_URLis set in environment - Check Discord webhook is still valid
- Verify file size limits (Discord has 8MB limit for free tier)
- Clear
.nextcache:rm -rf .next - Reinstall dependencies:
pnpm install --force - Check Node.js version:
node --version(requires 18+)
See AGENTS.md for agent collaboration guidelines and GEMINI.md for detailed project context.
MIT