Skip to content

MrCrin/swiish

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

109 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Swiish


Swiish Logo


Version License: AGPL-3.0 Node.js Docker Image

Open-source digital business card platform with QR codes and PWA support

Swiish is a self-hostable platform for creating and sharing digital business cards. Create beautiful, customizable business cards with QR codes, share them via links, and let users save your contact information directly to their phones.

Table of Contents

Features

  • πŸ“‡ Create and manage digital business cards - Build professional digital cards with all your contact information
  • 🎨 Advanced theming engine - Fully customizable design system with multiple theme variants, design token system, background textures, and automatic light/dark mode support
  • πŸ“± Progressive Web App (PWA) - Install cards as apps on mobile devices for offline access
  • πŸ”² QR code generation - Generate QR codes with simple URLs or full vCard contact information
  • πŸ”’ Privacy controls - Require interaction before revealing contact details, obfuscate contact info, and block search engines
  • πŸ“€ File uploads - Upload custom avatars and banner images
  • πŸŒ™ Dark mode support - Automatic dark mode with manual toggle
  • πŸ“± Responsive design - Works beautifully on desktop, tablet, and mobile
  • πŸ” Admin dashboard - Manage all your cards, users, and organization settings from a central dashboard

Demo

Have a look at a working demo:

Note: The demo is reset hourly and doesn't include the setup process that runs when you first install Swiish.

Quick Start

Prerequisites

  • For Docker deployment: Docker and Docker Compose
  • For local development: Node.js 18+ and npm

Installation

Option 1: Docker Deployment (Recommended)

See DOCKER.md for complete Docker setup instructions.

Option 2: Manual Installation (For Development)

  1. Clone and install dependencies:

    git clone https://github.com/MrCrin/swiish.git
    cd swiish
    npm install
  2. Configure environment:

    cp .env.example .env
    # Edit .env
  3. Start development server:

    npm start  # React dev server on http://localhost:3000

For production, build and serve:

npm run build
npm run serve  # Runs on PORT from .env, default 3000

Configuration

All configuration is done via environment variables. Copy .env.example to .env and fill in your values.

Required Variables

  • JWT_SECRET - Secret key for JWT token signing. Generate with: openssl rand -base64 32

Optional Variables

  • NODE_ENV - Environment mode (development or production)
  • PORT - Server port (default: 3000)
  • APP_URL - Base URL for the application (required in production)
  • ALLOWED_ORIGINS - Comma-separated list of allowed CORS origins
  • MAX_FILE_SIZE - Maximum file upload size in bytes (default: 5MB)
  • FORCE_HTTPS - Force HTTPS redirects (true or false)
  • Email Configuration (SMTP) - For email features like invitations

See .env.example for all available options and their descriptions.

Demo Mode (Experimental)

Demo mode allows visitors to explore Swiish without requiring authentication or setup. This is useful for showcasing the platform on dedicated demo instances.

Enabling Demo Mode

  1. Set the DEMO_MODE environment variable to true
  2. Restart the server
  3. The app will automatically:
    • Seed the database with demo company "Demon Straight" (a fictional company that makes really straight things)
    • Create 6 demo employees with different card configurations
    • Skip the login flow and auto-authenticate visitors
    • Reset all data every hour to maintain a clean demo state

Usage

Creating Your First Card

  1. Complete the initial setup wizard at /setup to create your organization and admin account
  2. Log in to access the admin dashboard at /admin
  3. Click "Create New Card"
  4. Enter a unique slug (e.g., john-doe)
  5. Fill in your contact information, upload images, customize the theme
  6. Click "Save"
  7. Your card is now available at http://your-domain.com/john-doe

Sharing Cards

  • Direct Link: Share the card URL directly
  • QR Code: Click the share button on any card to generate a QR code
    • Simple Mode: QR code contains just the card URL
    • Full Details Mode: QR code contains vCard data for direct contact saving

Privacy Controls

Each card supports three privacy options:

  • Require Interaction: Users must click "See my details" before contact info is revealed
  • Client-Side Obfuscation: Contact information is obfuscated in the HTML
  • Block Robots: Prevents search engines from indexing the card

Theme Customization

Swiish features a powerful theming engine with design tokens for colors, textures, border radius, and border width. Built-in themes include "swiish" and "minimal". You can create custom themes by adding files to src/theme/.

For detailed theming instructions, see the full documentation.

Development

Local Development Setup

  1. Clone and install:

    git clone https://github.com/MrCrin/swiish.git
    cd swiish
    npm install
  2. Set up environment:

    cp .env.example .env
    # Configure for development
  3. Start development server:

    npm run dev  # Runs build and server in watch mode

Project Structure

swiish/
β”œβ”€β”€ src/                    # React frontend
β”‚   β”œβ”€β”€ App.js             # Main application
β”‚   β”œβ”€β”€ index.js           # React entry point
β”‚   └── theme/             # Theming system
β”œβ”€β”€ public/                # Static assets
β”œβ”€β”€ server.js              # Express backend
β”œβ”€β”€ data/                  # SQLite database
β”œβ”€β”€ uploads/               # User uploads
└── migrations/            # Database migrations

Available Scripts

  • npm start - Start React development server
  • npm run build - Build production React app
  • npm run serve - Serve production build
  • npm run dev - Development mode with hot reload
  • npm run migrate - Run database migrations

Contributing

We welcome contributions!

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/your-feature
  3. Make your changes and add tests
  4. Run the development server: npm run dev
  5. Submit a pull request

License

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

Changelog

See CHANGELOG.md for a list of changes and version history.

About

Open-source digital business card platform with QR codes and PWA support

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages