- Inspired by fakku.dating
- Aimed to provide more stable connections between matched partners
- Designed for high concurrency and performance
- Raw WebSocket, instead of socket.io
- Love, rather than sorry
$ git clone [email protected]:Equim-chan/broken-pantsu.git
$ make
Build executable files for all platforms and archs
$ make release -j4
Running
make
with the-j4
flag will cause it to run 4 compilation jobs concurrently which may significantly reduce build time. The number after-j
can be changed to best suit the number of processor cores on your machine. If you run into problems runningmake
with concurrency, try running it without the-j4
flag. See the GNU Make Documentation for more information.
To make make
print verbosely
$ make V=1
Config can be passed via environment variables. Example:
$ BP_ADDR=:5543 BP_ROOT_PATH=../dist BP_QUEUE_CAP=100 ./broken-pantsu
List of environment variables:
Field | Default Value | Comment |
---|---|---|
BP_ADDR | localhost:56833 | Where the application listens to (56833 means "loved") |
BP_ROOT_PATH | ./public | Where the static files are located. Relative path will be resolved into absolute path automatically |
BP_QUEUE_CAP | 1000 | The capacity of singleQueue and lovelornQueue |
BP_MIN_SIM | 5 | The initial minimum similarity required for a match (range from 0 to 255) |
BP_COOKIE_EXP | 48h | The age of cookie |
BP_LOVELORN_AGE | 1h30m | The age of lovelorn pairs stored in redis |
BP_REDIS_ADDR | localhost:6379 | The address of redis |
BP_REDIS_PASS | (empty) | The password of redis |
BP_REDIS_DB | 0 | The DB of redis |
BP_QUIET | (empty) | Set any value to disable logging |
- Redis 3.x
We use glide as package manager.
There are lots of things to do at the moment...
- recv -> InBoundMessage -> unpack -> process -> pack -> OutBoundMessage -> send
- reject new connection from the same client when there is already one
- enforce matching algorithm
- check for thread safety
- check for possible memory leak
- setup travis CI
- migrate build_all into Makefile
- add test suite
- complete the UI
- add emoji support
- add "savelog" button
- add "switch partner" button
- add "quit" button
- check for XSS
- separate HTML, CSS and JS
- add browser-out-of-date warning
- add auto-reconnection after dc
- add i18n support
- display "your partner is typing"
- display and auto-refreash online users count
- display partner's nickname, avatar, likes, timezone
- ensure partners can still find each others after unexpected disconnection