A modern, professional printer server solution that allows devices on your local network to upload files and print them through a centralized printer server.
- π Modern Stack: Built with NestJS backend and Next.js frontend
- π€ Drag & Drop Upload: Intuitive file upload with drag and drop support
- π¨οΈ Multi-Printer Support: Select from available printers or use default
- π Real-time Status: Live print job tracking and printer status monitoring
- π Auto-refresh: Real-time updates for print jobs and server status
- π± Responsive Design: Works seamlessly on desktop, tablet, and mobile
- π File Validation: Supports PDF, Word, Excel, images, and text files
- β‘ Fast & Reliable: Built for performance and reliability
- Framework: NestJS with TypeScript
- File Upload: Multer for handling file uploads
- Printer Integration: Windows PowerShell commands for printing
- API: RESTful endpoints with proper error handling
- File Management: Automatic cleanup and file type validation
- Framework: Next.js 15 with App Router
- Styling: Tailwind CSS for modern, responsive design
- State Management: React hooks for real-time updates
- File Upload: Drag & drop interface with progress indicators
- Real-time Updates: Polling for live status updates
printer-server/
βββ apps/
β βββ backend/ # NestJS backend application
β β βββ src/
β β β βββ print/ # Print module (jobs, printers)
β β β βββ files/ # File management module
β β β βββ uploads/ # File upload directory
β β βββ package.json
β βββ frontend/ # Next.js frontend application
β βββ src/
β β βββ app/ # Next.js app router
β β βββ components/ # React components
β β βββ lib/ # API utilities
β βββ package.json
βββ packages/ # Shared packages (future use)
βββ package.json # Root package.json (monorepo)
- Node.js 18+
- npm 9+
- Windows OS (for printer integration)
-
Clone and install dependencies:
npm install
-
Start both backend and frontend:
npm run dev
Or start them individually:
# Backend (port 3001) npm run dev:backend # Frontend (port 3000) npm run dev:frontend
-
Access the application:
- Frontend: http://localhost:3000
- Backend API: http://localhost:3001
GET /api/print/printers- Get available printersGET /api/print/default-printer- Get default printerPOST /api/print/upload-and-print- Upload file and create print jobGET /api/print/jobs- Get all print jobsGET /api/print/jobs/:jobId- Get specific print job
GET /api/files- Get uploaded files listDELETE /api/files/:filename- Delete uploaded file
GET /api/health- Server health checkGET /api- API welcome message
Create .env.local in the frontend directory:
NEXT_PUBLIC_API_URL=http://localhost:3001- Documents: PDF, DOC, DOCX, XLS, XLSX, TXT
- Images: JPG, JPEG, PNG, GIF, BMP
- Maximum Size: 50MB per file
The application uses Windows PowerShell commands to interact with system printers:
- Automatically detects available printers
- Shows printer status and default printer
- Supports printing to specific printers
- Handles print job status tracking
# Development
npm run dev # Start both apps
npm run dev:backend # Start backend only
npm run dev:frontend # Start frontend only
# Production Build
npm run build # Build both apps
npm run build:backend # Build backend only
npm run build:frontend # Build frontend only
# Production Start
npm run start # Start both apps in production
npm run start:backend # Start backend in production
npm run start:frontend # Start frontend in production
# Utilities
npm run lint # Lint all workspaces
npm run test # Test all workspacesTo allow other devices on your LAN to access the printer server:
-
Find your local IP address:
ipconfig
-
Update the frontend API URL in
.env.local:NEXT_PUBLIC_API_URL=http://YOUR_LOCAL_IP:3001
-
Start the applications:
npm run start
-
Access from other devices:
- Open
http://YOUR_LOCAL_IP:3000in any browser on your network
- Open
- Currently designed for trusted local networks
- File uploads are validated for type and size
- Temporary files are automatically cleaned up
- Consider adding authentication for production use
- User authentication system
- Claude AI integration for document processing
- Print history and analytics
- Email notifications for print jobs
- Mobile app support
- Docker containerization
- Linux/macOS printer support
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
-
Printers not detected:
- Ensure printers are properly installed on Windows
- Check printer drivers are up to date
- Verify PowerShell execution policy allows scripts
-
File upload fails:
- Check file size (max 50MB)
- Verify file type is supported
- Ensure uploads directory has write permissions
-
Network access issues:
- Verify firewall settings allow connections
- Check that both backend and frontend are accessible
- Confirm correct IP addresses in configuration
For issues and questions:
- Check the troubleshooting section above
- Review the API documentation
- Check the console for error messages
- Ensure all dependencies are properly installed
Built with β€οΈ using NestJS and Next.js for reliable, professional printer sharing on your local network.