A modern web frontend application for the GoPrint print service API. It provides an intuitive interface for managing printers, submitting print jobs, handling manual/automatic duplex printing workflows, and viewing print queue statuses.
- Framework: React 19 + TypeScript
- Build Tool: Vite
- Routing: React Router DOM
- Styling: Tailwind CSS + PostCSS
- Icons: Lucide React
- Network: Axios
- Node.js (v16 or higher recommended)
- pnpm
Install the project dependencies:
pnpm installTo run the application locally, you have two main parts:
Start the Frontend Application:
In a separate terminal, launch the Vite development server.
pnpm devOpen your browser and navigate to the local URL (typically http://localhost:3000).
To create an optimized production build:
pnpm buildTo preview the generated production build locally:
pnpm startIn development, you may need to configure the backend API address to solve CORS issues. Create or modify the .env file in the root directory:
# Change this to your actual backend API URL
VITE_API_URL=http://localhost:5001In production, since the frontend is packaged and served directly by the backend server, it automatically uses the same domain and port, requiring no additional environment variable configuration for the API URL.
Run tests with Vitest:
pnpm vitest run # all tests once
pnpm vitest # watch modesrc/components/: Reusable UI elements (Header, Authentication, Language Switcher, etc.)src/pages/: Main application views (Home, Printers, Scanner)src/lib/: Utilities, API clients (api.ts,scannerApi.ts), PDF tools, and localization (i18n.tsx,i18n.json)
This frontend is built to work seamlessly with the GoPrint API (a CUPS-integrated print service built with Go and Gin). Refer to SAST Printer
This project is licensed under the Apache License 2.0.