Skip to content

wrkode/ConfBadger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

0a46e84 · Mar 17, 2025

History

27 Commits
Mar 5, 2023
Mar 5, 2023
Mar 5, 2023
Mar 5, 2023
Mar 15, 2025
Mar 15, 2025
Mar 1, 2023
Mar 1, 2023
Mar 17, 2025
Mar 15, 2025
Mar 17, 2025
Mar 10, 2025
Mar 1, 2023
Mar 17, 2025
Mar 17, 2025

Repository files navigation

Conference Badge Generator

A web application for generating and managing conference badges from CSV data. The application allows you to upload attendee data, generate badges with QR codes, and search through attendees.

Features

  • Upload CSV files with attendee information
  • Generate badges with QR codes containing attendee details
  • Search attendees by name, title, company, or ticket type
  • Preview and download individual badges
  • Real-time search with instant results
  • Modern, responsive user interface

Prerequisites

  • Python 3.7 or higher
  • Node.js 14 or higher
  • npm (Node Package Manager)

Installation

  1. Clone the repository:
git clone https://github.com/wrkode/ConfBadger.git
cd ConfBadger
  1. Install Python dependencies:
pip install -r requirements.txt
  1. Install Node.js dependencies:
cd frontend
npm install

Configuration

Config file

Configuration is stored in a yaml file, which is config.yaml by default.

Attendee types

Create one list item in attendee-types for each attendee type. Each list item should have a name which will be printed to the badge and a ticket-titles which is a list of ticket types from the data file.

Customize the code

Fonts

To change the TrueType font used you need to update the source code, update font, font2 and font3 varible to point to your font path.

Running the Application

You can start both the backend and frontend servers in one of two ways:

Option 1: Using the startup script (Recommended)

From the root directory, simply run:

./start.sh

This will start both the backend (http://localhost:8000) and frontend (http://localhost:3000) servers concurrently.

Option 2: Manual startup

If you prefer to start the servers manually:

  1. Start the FastAPI backend (from the root directory):
python3 app.py

The backend will be available at http://localhost:8000

  1. Start the React frontend (from the frontend directory):
cd frontend
npm start

The frontend will be available at http://localhost:3000

CSV File Format

The application expects a CSV file with the following columns:

  • Order #
  • First Name
  • Last Name
  • Email
  • Phone Number
  • Country
  • Country Code
  • Job Title
  • Company
  • Discount

Example CSV format:

Order #,First Name,Last Name,Email,Phone Number,Country,Country Code,Job Title,Company,Discount
1,John,Doe,john@example.com,+1234567890,Netherlands,NL,Software Engineer,Example Corp,100.00% - KCDAMS23_ORGANIZERS_42

Usage

  1. Upload CSV File

    • Click the "Upload CSV File" button
    • Select your CSV file with attendee information
    • The system will validate the file and generate badges
  2. Search Attendees

    • Use the search fields to filter attendees by:
      • Name (searches in both first and last name)
      • Title
      • Company
      • Ticket Type
    • Results update automatically as you type
    • Clear individual fields using the X button
    • Reset all filters using the "Clear Search" button
  3. Preview and Download Badges

    • Each attendee card shows basic information
    • Use the "Preview Badge" button to view the badge in a new tab
    • Use the "Download" button to download the badge

Command line options

It is possible to generate the badges using python3 confbadger.py. Command line options in this case:

-h, --help            show this help message and exit
--data DATA           List of attendees in the CSV format as exported from Bevy. Default is data.csv
--save-path SAVE_PATH Path to save the generated badges. Default is ./codes
--template TEMPLATE   Template for the badges. Default is the example KCDAMS2023_Badge_Template.png file
--flags               Adds flags to the badges. False by default.
--config CONFIG       Config file. Default is config.yaml.

Project Structure

ConfBadger/
├── app.py                 # FastAPI backend
├── confbadger.py          # Badge generation logic
├── requirements.txt       # Python dependencies
├── data.csv               # Sample CSV file
├── KCDAMS2023_Badge_Template.png  # Badge template
├── frontend/              # React frontend
│   ├── package.json
│   ├── public/
│   └── src/
├── badges/                # Generated badges
├── codes/                 # Generated QR codes
├── fonts/                 # Font files
└── flags/                 # Country flag images

Development

  • Backend: FastAPI (Python)
  • Frontend: React with Material-UI
  • Badge Generation: PIL (Python Imaging Library)
  • QR Code Generation: PyQRCode

License

This project is licensed under the MIT License - see the LICENSE file for details.