This is the 8th day of my participation in the First Challenge 2022. For details: First Challenge 2022.

preface

“What noodles do you like?” — “Inside your Heart”

“Who’s there” — “Your people”

The little love words that sound disgusting and shy and have a bit of local feeling, like the one above, are local love words. As a programmer certainly can’t think of these disgusting words, if do not make a native love words generator, the key time perhaps useful!!

implementation

First, search “local love words” on Zhihu, wechat and other platforms, and then use the packet capture tool to save some answers to a JSON. And then using random numbers you can generate it randomly.

[{"id": "495e1a80-fb5a-4c21-9c89-a5c2237f1619"."content": "Would you like to try my strawberry lipstick?"."likeCount": 24."dislikeCount": 3."type": "Default category"
    },
    {
      "id": "9eb93075-ffd4-458c-8b4e-301e219359b8"."content": "I like you because of your appearance. I like him because of your character."."likeCount": 4."dislikeCount": 11."type": "Default category"
    },
    {
      "id": "4621a013-a79b-4e1d-908b-fea4cb8b8cb4"."content": "No matter how mediocre I am, I always find love for you beautiful."."likeCount": 13."dislikeCount": 6."type": "Default category"
    },
    {
      "id": "35515ddf-7220-4b41-9046-5b4fe55c10e4"."content": "The circle of friends you've liked is called a donut."."likeCount": 11."dislikeCount": 10."type": "Default category"},]Copy the code

Preview the address

honeyed-words-generator.vercel.app/

Making the address

Github.com/maqi1520/ho…

Technology stack

  • typescript
  • tailwind
  • nextjs
  • animejs

Use Animejs to generate animations!

To start developing

I used The Next template from Sandmoon to quickly create the application

$ git clone [email protected]:shfshanyue/next-app.git
Copy the code

Update the package as early as possible in project creation, using NPm-check-updates

$ npm run ncu
Copy the code

Develop in a test environment

$ npm run dev
Copy the code

packaging

$ npm run build
Copy the code

File structure

.├ ── ├ _modules/ ├─ pages/# 所有的 pages├ ─ ─ utils / ├ ─ ─ package. The json ├ ─ ─ package - lock. Json ├ ─ ─ the README. Md └ ─ ─ serverless. YamlCopy the code

Deoploy

Vercel

$ vercel
Copy the code

summary

The program is not difficult to implement at all, mainly to start the idea of creation. Of course, it can also add many functions, such as user system, thumbs up, teasing comments, etc. Maybe it will develop into an online dating platform in the future, haha. Sometimes, when we have an idea, we have to put it into practice, or take it as a matter of charge. If there is no beginning, how can there be good works?

Here is my personal signature again:

You don’t have to be great to start; But you have to start to be good

That’s all the content of this article. I hope this article is helpful to you. You can also refer to my previous articles or share your thoughts and experiences in the comments section.

The last

Happy Valentine’s Day, Jack shall have Jill