diff --git a/README.md b/README.md index f2858dd..65a6462 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,112 @@ -# Button Designer +# Simmarith Neocities Site -Create print-ready A4 PDF sheets for 35mm buttons. Import images, set the quantity per design, preview the layout, and export a 300 DPI PDF with a 25mm center guide ring. +Vite + React source for Simmarith's Neocities page. -## Scripts +The site currently includes: +- A retro-style home page +- A Button Designer tool for creating printable 35mm button sheets -- `npm install` -- `npm run dev` to launch the Electron app with hot reload -- `npm run build` to build the renderer -- `npm run start` to run the packaged renderer from `dist` +## Features -## Notes +### Home +- Intro page with navigation to available tools -- Each button is placed at 35mm diameter. -- The inner 25mm guide ring can be toggled on or off. -- If the total count exceeds the A4 capacity, extra buttons are not placed. +### Button Designer +- Import one or more images +- Set quantity per design +- Edit image positioning and zoom inside a circular crop +- Set background color per button +- Preview an A4 sheet layout +- Optional 25mm guide circle in preview +- Export a print-ready A4 PDF (300 DPI render) + +## Tech Stack + +- React 18 +- Vite 5 +- jsPDF +- Neocities API client (`neocities`) + +## Development + +Requirements: +- Node.js 18+ (recommended) +- npm + +Install dependencies: + +```bash +npm install +``` + +Start local dev server: + +```bash +npm run dev +``` + +Build production assets: + +```bash +npm run build +``` + +Preview production build locally: + +```bash +npm run preview +``` + +## Deploy to Neocities + +Deployment uses `scripts/deploy-neocities.mjs` and uploads files from `dist/`. + +1. Build the project: + +```bash +npm run build +``` + +2. Set environment variables: + +```bash +export NEOCITIES_USER="your_username" +export NEOCITIES_PASS="your_password" +``` + +3. Deploy: + +```bash +npm run deploy +``` + +Or run everything with one command (build + deploy): + +```bash +npm run deploy +``` + +You can also create a local `.env` file (loaded via `dotenv`) with: + +```bash +NEOCITIES_USER=your_username +NEOCITIES_PASS=your_password +``` + +## Project Structure + +```text +. +├─ scripts/ +│ └─ deploy-neocities.mjs +├─ src/ +│ └─ renderer/ +│ ├─ App.jsx +│ ├─ Home.jsx +│ ├─ ButtonDesigner.jsx +│ ├─ main.jsx +│ └─ styles.css +├─ index.html +├─ vite.config.js +└─ package.json +```