A web application for creating and printing address labels for holiday cards with MySQL database integration.
🔗 https://verson-tech.github.io/print-labels/
- 🎄 Multi-Holiday Support - Christmas, Easter, 4th of July, Veteran's Day themes
- 🖨️ Print Ready Labels - A4 format with proper spacing for label sheets
- 📝 CRUD Operations - Add, edit, and delete recipients through the UI
- 🗄️ MySQL Database - Persistent data storage
- 📱 Responsive Design - Works on desktop and mobile devices
- 🎨 Theme-Based UI - Different color schemes for each holiday
- Frontend: HTML, CSS, JavaScript
- Backend: Node.js, Express
- Database: MySQL
- Dependencies: mysql2, cors, dotenv
- Clone the repository
git clone <repository-url>
cd addresses- Install dependencies
npm install- Set up MySQL database
mysql -u root -p < database.sql- Configure environment variables
cp .env.example .env
# Edit .env with your MySQL credentials- Start the server
npm start- Open your browser
http://localhost:3000
The app uses a MySQL database named christmas_cards with two main tables:
CREATE TABLE recipients (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255) NOT NULL,
address VARCHAR(255) NOT NULL,
city VARCHAR(100) NOT NULL,
state VARCHAR(10) NOT NULL,
zip VARCHAR(20) NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);CREATE TABLE sender (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255) NOT NULL,
address VARCHAR(255) NOT NULL,
city VARCHAR(100) NOT NULL,
state VARCHAR(10) NOT NULL,
zip VARCHAR(20) NOT NULL,
label_count INT DEFAULT 20,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);- Select a holiday theme
- Add recipients using the "Add Recipient" button
- Edit or delete existing recipients as needed
- Print recipient labels or sender labels
- Labels are formatted for standard A4 label sheets
GET /api/recipients- Get all recipientsPOST /api/recipients- Add new recipientPUT /api/recipients/:id- Update recipientDELETE /api/recipients/:id- Delete recipient
GET /api/senders- Get all sendersPOST /api/senders- Add new senderPUT /api/senders/:id- Update senderDELETE /api/senders/:id- Delete sender
MIT License