https://github.com/softwaresing/popwaifu
click your any waifu, or...... friend?
https://github.com/softwaresing/popwaifu
pop popcat popwaifu
Last synced: 2 months ago
JSON representation
click your any waifu, or...... friend?
- Host: GitHub
- URL: https://github.com/softwaresing/popwaifu
- Owner: SoftwareSing
- License: mit
- Created: 2021-08-19T18:11:59.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2022-08-29T15:52:48.000Z (almost 4 years ago)
- Last Synced: 2025-07-08T19:15:21.859Z (11 months ago)
- Topics: pop, popcat, popwaifu
- Language: JavaScript
- Homepage: https://popwaifu.click
- Size: 126 KB
- Stars: 21
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# popwaifu
Here is [popwaifu.click](https://popwaifu.click/) backend project.
Frontend project is on [popwaifu-web](https://github.com/SoftwareSing/popwaifu-web)
## run server
1. Install Node.js
I use 14.17.6 when writing this, recommend using [NVM](https://github.com/nvm-sh/nvm) to install Node.js
2. Install MongoDB and Redis
3. git clone this project
4. run `npm install`
5. run `npm run build_web` to build frontend file
6. run `npm run server_dev` to start a develop server
## file architecture
- [config](/config) folder put some config file, you can change your MongoDB connection config here
- [dev-script](/dev-script) folder put some script help develop, you can use [insertWaifu.js](/dev-script/insertWaifu.js) to quickly put some waifu into your DB
- [popwaifu-web](/popwaifu-web) folder is a git submodule folder, it link to [popwaifu-web](https://github.com/SoftwareSing/popwaifu-web) project
- [src](/src) folder is our source code folder
### src
I try to follow [this video](https://youtu.be/gX5oB4fgX6U?t=2568)'s architecture
[entity](/src/entity) is the basic object, you can use repository object to get a entity object.
For example, you can use [WaifuRepo.getByUrlId()](/src/entity/waifu/WaifuRepo.js) to get a [Waifu](/src/entity/waifu/Waifu.js), and [WaifuRepo](/src/entity/waifu/WaifuRepo.js)'s methods should be the only way how you get this entity.