2018-11-20 11:19:58 -08:00
# Christmas Community
2019-11-10 13:28:40 -08:00
![Docker Pulls ](https://img.shields.io/docker/pulls/wingysam/christmas-community?style=for-the-badge )
![Version ](https://img.shields.io/badge/dynamic/json?color=orange&label=Version&query=version&url=https%3A%2F%2Fgitlab.com%2Fwingysam%2Fchristmas-community%2Fraw%2Fmaster%2Fpackage.json&style=for-the-badge )
2019-11-13 09:34:49 -08:00
![Language ](https://img.shields.io/badge/Language-JavaScript-DDA000?style=for-the-badge )
2019-11-10 13:28:40 -08:00
![Runtime ](https://img.shields.io/badge/Runtime-Node.JS-68A063?style=for-the-badge )
2018-11-20 11:19:58 -08:00
Web app for your family's Christmas shopping
## Purpose
To create a simple place for your entire family to use to find gifts that people want, and to avoid double-gifting.
2019-11-10 13:29:00 -08:00
## Screenshots
![Screenshot ](screenshots/main.png )
![Screenshot ](screenshots/list.png )
![Screenshot ](screenshots/link-not-required.png )
![Screenshot ](screenshots/name-from-link.png )
2019-11-13 09:34:32 -08:00
## Amazon Smile
By default, Christmas Community converts www.amazon.com links to smile.amazon.com. If you do not want this, set the environment variable SMILE to false (if you are using Docker Compose, make sure to put "false" in quotes).
2020-10-29 11:14:38 -07:00
## Root Path
If you want put Christmas Community on a subdirectory, such as `/christmas-community` , set `ROOT_PATH` to that path.
2019-11-10 10:48:59 -08:00
## Docker
```
docker run --detach --name christmas-community -p 80:80 --restart always wingysam/christmas-community
```
## Docker Compose
```yml
---
version: "3"
services:
christmas-community:
image: wingysam/christmas-community
volumes:
- ./data:/data
ports:
2019-11-13 09:34:32 -08:00
# If you want to go to localhost:8080 to access Christmas Community,
# use - 8080:80 instead of
2019-11-10 10:48:59 -08:00
- 80:80
2019-11-13 09:34:32 -08:00
environment:
# Amazon Smile, set to 'false' to disable www.amazon.com links
# turning into smile.amazon.com
SMILE: 'true'
2019-11-16 20:34:04 -08:00
# Table mode, set to 'false' to revert to box mode
TABLE: 'true'
2019-11-18 10:57:47 -08:00
# Single list mode
# (for weddings, birthdays, etc. only the admin account's list is accessible)
# Set to 'true' to enable
SINGLE_LIST: 'false'
2019-11-10 10:48:59 -08:00
restart: always
```
2018-11-20 11:19:58 -08:00
## Install
```sh
git clone https://gitlab.com/wingysam/christmas-community
cd christmas-community
yarn
```
## Configuration
Add environment variables with a .env. Example:
2020-12-01 19:09:25 -08:00
```sh
## Core Settings
# Where to store databases, can be a CouchDB compatible server or directory.
DB_PREFIX=dbs/
# Where to send someone if they need to log in
DEFAULT_FAILURE_REDIRECT=/login
# Port to listen on
2018-11-20 11:19:58 -08:00
PORT=80
2020-12-01 19:09:25 -08:00
# Expose the internal PouchDB with CouchDB API and Fauxton browser. Mostly used for debugging. Leave empty to disable.
DB_EXPOSE_PORT=
2020-12-01 19:42:03 -08:00
# Proxy to send item data requests to. Leave empty to disable.
2020-12-01 19:09:25 -08:00
PROXY_SERVER=
# Secret string to store session cookies with. Automatically generated if not provided.
SECRET=
# How long a user is logged in (milliseconds). Defaults to one week.
SESSION_MAX_AGE=604800000
# The name of the site in the <title> and navigation bar
SITE_TITLE=Christmas Community
# Used when shared to home screen
SHORT_TITLE=Christmas
# The root path for forms, CSS, and a small amount of JS. Useful when proxying.
ROOT_PATH=/
# Where to trust the X-Forwarded-For header from. Defaults to "loopback". Useful for proxying to docker.
TRUST_PROXY=loopback
2020-12-01 19:20:01 -08:00
# Any theme from https://jenil.github.io/bulmaswatch
BULMASWATCH=default
2020-12-01 19:09:25 -08:00
## Wishlist Settings
# Set to true to not allow users to have their own lists. You may want this for a birthday or wedding.
SINGLE_LIST=false
# Set to false to allow viewing wishlists without logging in
LISTS_PUBLIC=false
# Defaults to true. Set to false for legacy cards view.
TABLE=true
# Convert Amazon links to Amazon Smile links. A percentage of the profit goes to a charity of buyer's choice. Defaults to true.
SMILE=true
# Allow Markdown in item notes. Does not work with TABLE=false. Defaults to false.
MARKDOWN=false
2018-11-20 11:19:58 -08:00
```
## Startup
```sh
2020-11-02 16:07:12 -08:00
npm start
2018-11-20 11:19:58 -08:00
```
## Setup
2021-01-02 14:28:32 -08:00
Visit `/` on the HTTP server to add an admin account.
# About Developer
Hi, I'm Wingy. I made this app. My website is [wingysam.xyz ](https://wingysam.xyz ). Please [hire me ](https://wingysam.xyz/hire ).
[![ko-fi ](https://www.ko-fi.com/img/githubbutton_sm.svg )](https://ko-fi.com/C1C2347HB)
# Contributors
As of writing, there are no code contributors. However, there are issue contributors and I appreciate these! Ideas on which features to add and bug reports are very helpful. Thank you!