Skip to content

macurovc/wishpage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎁 Wishpage

Wishpage is a self-hosted wishlist for family and friends. It displays gift ideas for multiple people. The page viewers can anonymously reserve a gift if they plan to buy it. The wishlist authors can edit the content by authenticating with a common password.

The frontend is a Vite React App written in Typescript, while the backend is written in Go.

Deployment

The easiest way to deploy this app is via Docker. Here is a Docker Compose configuration example:

name: wishpage

services:
  wishpage:
    container_name: wishpage_server
    image: ghcr.io/macurovc/wishpage:latest
    environment:
      - ADMIN_PASSWORD=<<admin_password>>
      - DATABASE_DIR=/app/db
    volumes:
      - <<local_database_directory>>:/app/db
    ports:
      - 10000:8080
    restart: always

Remember to specify a strong admin password and a local directory where to store the database.

The container has only an HTTP endpoint, so it shouldn't be directly exposed on the internet. You can configure a reverse proxy or something like Cloudflare Tunnel to provide an additional layer of security.

Email Notifications

If you want, you can activate email notifications by setting the following environment variables:

Name Description
SMTP_SERVER SMTP server hostname (e.g. smtp.gmail.com)
SMTP_PORT SMTP server port (default: 587)
SMTP_USER username to log in
SMTP_PASSWORD user password to log in
EMAIL_RECIPIENTS comma-separated list of email addresses

In order to send notifications via Gmail, you have to activate the 2-factor authentication and then generate an app password by following this link.

Development

First, install go and node. You can run the server with the following commands:

cd wishpage-server
export ADMIN_PASSWORD=toto
export DEV_MODE=1
go run main.go

The server will create an in-memory database and it will fill it with dummy data. The frontend can be run with:

cd wishpage-app
npm run dev

A development server for the web app will run on http://localhost:5173. Any change to the frontend will automatically be applied.

In order to build the Docker image, install Docker Desktop and then run:

docker build -t wishpage .