You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.7 KiB
58 lines
1.7 KiB
4 weeks ago
|
# Babypool.lol
|
||
|
|
||
|
An _anonymous_ baby pool website.
|
||
|
|
||
|
## How it works
|
||
|
|
||
|
You create a new new pool, choose the games you want to include and that's it.
|
||
|
No need to register, enter an email or a password or anything like that. Each
|
||
|
pool is given an ID that you can share with whoever you want to participate, you
|
||
|
can optionally select a password to make sure no strangers participate, and you
|
||
|
are given a unique token that gives you access to see the pool's entries and
|
||
|
select a winner. For participants, you need to include an email address so that
|
||
|
you can be contacted if you win, but there's no validation step involved, and
|
||
|
the email addresses are purged when a pool is closed, or at most 3 months after
|
||
|
the expected end date has passed.
|
||
|
|
||
|
## Games Included
|
||
|
|
||
|
You can choose whichever games you want to include in the pool, with a minimum
|
||
|
of one selected of course.
|
||
|
|
||
|
- Date
|
||
|
- Time of Day
|
||
|
- Weight
|
||
|
- Height
|
||
|
- Biological Sex
|
||
|
|
||
|
## Technical details
|
||
|
|
||
|
There are two tables: Pools, and Pool Entries.
|
||
|
|
||
|
Pools table:
|
||
|
| Column Name | Type | Constraints |
|
||
|
| ----------- | -------- | ----------- |
|
||
|
| ID | ULID | Unique |
|
||
|
| admin token | String | |
|
||
|
| password | bcrypt | |
|
||
|
| games | []String | |
|
||
|
|
||
|
`games` must a Set containing, from these possible values: `DAY`, `TIME`,
|
||
|
`WEIGHT`, `HEIGHT`, `BIOSEX`.
|
||
|
|
||
|
Pool Entries:
|
||
|
| Column Name | Type | Constraints |
|
||
|
| ----------- | ------ | ----------- |
|
||
|
| Pool ID | ULID | FK |
|
||
|
| email | String | |
|
||
|
| guesses | JSON | |
|
||
|
|
||
|
`guesses` must satisfy the following schema:
|
||
|
|
||
|
```
|
||
|
[]struct{
|
||
|
game string // one of DAY, TIME, WEIGHT, HEIGHT, BIOSEX
|
||
|
val: date | time | { v: int, unit: string } | ['M', 'F']
|
||
|
}
|
||
|
```
|