How hsc-logic/payslipgenerator works
Sliply is a browser-based payment-slip workspace: users enter company, recipient, and payment details, review a live slip, then save, print, download, or optionally create a Google Doc. The app also supports searchable history, reusable recipients, settings, privacy controls, and browser-local recovery. Its shared view and calculation layer feeds both the preview and document outputs. Edges reflect shown imports, calls, or README statements; unsampled wiring is not inferred.
Main entry points: App.tsx App coordinator · paymentSlipView.ts Slip view model · googleDrive.ts Google Docs integration · currency.ts Currency calculations
Components 20
Slip Workflow
- App coordinator
src/App.tsx - Workflow steps
src/components/common/WorkflowStepper.tsx - Slip form
src/components/forms/SlipForm.tsx - Form fields
src/components/common/Field.tsx - Review panel
src/components/forms/ReviewPanel.tsx - Live preview
src/components/preview/PaymentSlipPreview.tsx
Records and Preferences
- Payment history
src/components/history/PaymentHistory.tsx - Settings panel
src/components/settings/SettingsPanel.tsx - Privacy controls
src/components/privacy/PrivacyControls.tsx - Browser persistence
src/utils/storage.ts - Recovery state
src/utils/recovery.ts - Reference sequence
src/utils/reference.ts
Document Outputs
- PDF and printing
src/utils/pdf.ts - Google Docs integration
src/services/googleDrive.ts
Shared Logic
- Slip view model
src/utils/paymentSlipView.ts - Currency calculations
src/utils/currency.ts - Amount in words
src/utils/amountInWords.ts - Field validation
src/utils/validation.ts
Other components
- Slip creator
- Google Drive and Docs
Connections 24
- Slip creator → App coordinator: creates slip
README.md - App coordinator → Workflow steps: shows steps
src/App.tsx - App coordinator → Slip form: renders form
src/App.tsx - Slip form → Form fields: uses fields
src/components/forms/SlipForm.tsx - App coordinator → Review panel: renders review
src/App.tsx - App coordinator → Live preview: renders preview
src/App.tsx - Review panel → Slip view model: builds summary
src/components/forms/ReviewPanel.tsx - Live preview → Slip view model: builds preview
src/components/preview/PaymentSlipPreview.tsx - App coordinator → Payment history: renders history
src/App.tsx - App coordinator → Settings panel: renders settings
src/App.tsx - App coordinator → Privacy controls: renders controls
src/App.tsx - App coordinator → Browser persistence: loads and saves
src/App.tsx - App coordinator → Recovery state: persists recovery
src/App.tsx - App coordinator → Reference sequence: reserves reference
src/App.tsx - App coordinator → Field validation: validates slip
src/App.tsx - Slip view model → Currency calculations: calculates totals
src/utils/paymentSlipView.ts - Slip view model → Amount in words: converts total
src/utils/paymentSlipView.ts - App coordinator → PDF and printing: exports and prints
README.md - PDF and printing → Slip view model: builds document view
src/utils/pdf.ts - App coordinator → Google Docs integration: creates Google Doc
README.md - Google Docs integration → Google Drive and Docs: sends document content
README.md - Google Docs integration → Currency calculations: calculates totals
src/services/googleDrive.ts - Google Docs integration → Amount in words: converts total
src/services/googleDrive.ts - Payment history → Currency calculations: calculates totals
src/components/history/PaymentHistory.tsx