中文 | English

Giftie
:sparkles: Introduction
The Chrome extension marie for one-click marriage appointment booking in Guangdong Province is now open source. After using Giftie, you might want to consider using marie next :smirk:
Giftie is the ultimate solution for conquering the “gift-giving dilemma”.
Using a combination of “custom messages” + “custom gifts” + “lottery draw”, it helps the gift recipient (mother/wife/girlfriend) feel your genuine love and heartfelt affection.
💍I used this little tool and successfully proposed!
Interesting backstory: Part.1, Part.2
Note: Runtime environment only supports Node v14.15.0
:chestnut: Demo

(WeChat access only, please scan QR code with WeChat to view demo)
:bookmark: Usage Guide
:star: Click Star
Click star on GitHub to continuously follow this project (you can quickly find this project through your personal homepage); and it can slightly satisfy the author’s vanity, providing motivation for future iterations.
Fun fact: star is equivalent to follow/bookmark/like.
:loop: Fork and Customize Configuration
After forking, you can make customized configurations in this “your own code” repository.
Giftie puts all customizable variables in the configuration file gift.setting.js, with detailed comments on each field. Here’s a quick overview of the key fields:
export const GLOBAL_KEYS = {
EXIST_KEY: 'HAS_GIFT',
NAME_KEY: 'GIFT_NAME',
IMAGE_KEY: 'GIFT_IMAGE_URL',
};
export const IS_SHOW_RESTART = false;
export const homeConfig = {
title: '520 Gift Lottery',
messages: [
{ key: 'a', wording: 'This is the first line of copy', },
{ key: 's', wording: 'This is the second line of copy', },
{ key: 'd', wording: 'And here is the third line of copy', },
],
owner: 'XXX',
timeout: 5000,
targetGiftIndex: null,
};
export const gifts = [
{ key: 'q', name: 'Dior Duo Set', alias: 'Dior Duo', image: '/images/1.png', description: '"Classic charming colors, showcasing luxurious charm"' },
{ key: 'w', name: 'Tencent Video Lifetime VIP', alias: 'VIP', image: '/images/2.png', description: '"Covering your lifetime VIP"' },
{ key: 'e', name: 'Lancôme Advanced Génifique Set', alias: 'Black Bottle Set', image: '/images/3.png', description: '"Strong stabilization, fast repair"' },
{ key: 'r', name: '520 Red Envelope', alias: '520', image: '/images/6.png', description: '"Want to sing a hundred love songs for you"' },
{ key: 't', name: 'Dior Starry Sky Set', alias: 'Dior Starry', image: '/images/5.png', description: '"Versatile lip makeup, exquisitely crafted"' },
{ key: 'y', name: '1314 Red Envelope', alias: '1314', image: '/images/6.png', description: '"From now on, I will always be by your side"' },
{ key: 'u', name: 'UR Shopping Voucher: ¥1,000', alias: 'UR', image: '/images/7.png', description: '"UR! Buy!"' },
{ key: 'i', name: 'Dyson Hair Styling Set', alias: 'Dyson', image: '/images/8.png', description: '"Meeting all different styling needs"' },
];
Note: When configuring gifts, please find gift images yourself. To ensure visual experience, please choose square and compressed images.
:rocket: Deployment
After modifying the configuration and checking that everything is correct, you can go live.
Just put the built files directly on your own server. If you don’t have your own server, we recommend using Tencent Cloud’s Static Website Hosting Service.
Tip: This project is a “pure frontend” project, with key states saved in the client (localStorage). After all, it’s an MVP product, and surely no one’s mother/wife/girlfriend would delete the client state to re-draw (cheat) the lottery, right? Right? If anyone feels this is not secure enough, you can also modify it to save user states in a database.
:flags: Future Roadmap
- Support for multiple fonts
- Support for multiple themes
- Support for custom lottery modes (wheel or nine-grid)
- More flexible copy configuration
:star2: If Giftie helps you, feel free to express your support with a star, thanks~
If you want to get my new open source projects first-hand, make sure to follow me on GitHub~
:star: Star Trends

Updating in real time…
:green_heart: Finally
Follow my personal original WeChat official account to get more fun and interesting articles/projects first-hand, making frontend development more enjoyable :stuck_out_tongue_closed_eyes:

评论