Coronator is corona detection application that aim perfect contact tracing between it's user anonymously.
The rise of coronavirus cases in Indonesia and the lack of awareness of ourselves which is we are contagious or not.
Create the perfect contact tracing app that lets users know if they've been exposed to people who have been confirmed positive in the last 7 days anonymously
You need to have all of this to run core-onator
- Go with a version of 1.14.6 or higher
- MYSQL
- Redis
- Kafka & Zookeeper
- Altair, used for API gateway and authentication service. You can install it by clone it in here
Here is step by step if you want to contribute to core-onator.
- clone this repo
git clone [email protected]:coronatorid/core-onator.git
- Run the migration (make sure mysql is on and the schema is already created)
go run coronator.go db:migrate
- Login whatsapp
go run coronator.go whatsapp:login
- Scan the barcode with your phone
- Copy all of the value into your .env
- Don't forget to run Altair.
- Lastly run coronator
go run coronator.go run:api
- Make sure you follow the standard of golang coding style using
gofmt
- All PR will be reviewed by main contributor of this repo
- PR which inactive more than 1 month will be closed. (You can reopen it)
This one seems like a good idea, we will have on in near future.
All diagram related to core-onator.
Here.
Table users {
id int [pk, increment] // auto-increment
phone varchar(255) [not null]
state tinyint [not null,note: '1 -> active, 0 -> inactive']
role tinyint [not null,note: 'null -> admin, 1 -> superadmin']
created_at datetime [not null]
updated_at datetime [not null]
indexes {
phone [unique]
(phone,state) [name:'phone_state']
}
}
Table locations {
id int [pk, increment]
user_id int [not null]
lat double [not null]
long double [not null]
created_at datetime [not null]
updated_at datetime [not null]
indexes {
(user_id,lat) [name:'user_id_lat']
(user_id,long) [name:'user_id_long']
}
}
Table reported_cases {
id int [pk, increment]
user_id int [not null]
status int [not null, note:'1 -> confirmed, 0 -> not_confirmed']
telegram_message_id varchar(255) [not null]
telegram_image_url varchar(255) [not null]
image_path varchar(255) [not null]
image_deleted boolean
created_at datetime [not null]
updated_at datetime [not null]
indexes {
(user_id) [name:'user_id',unique]
}
}
Table confirmed_cases {
id int [pk, increment]
user_id int [not null]
status int [not null, note:'1 -> positive, 2 -> suspek, 3 -> probable, 4 -> kontak erat']
created_at datetime [not null]
updated_at datetime [not null]
indexes {
(user_id) [name:'user_id',unique]
}
}
Table exposed_users {
id int [pk, increment]
user_id int [not null]
confirmed_cases_id int [not null]
lat double [not null]
long double [not null]
created_at datetime [not null]
updated_at datetime [not null]
indexes {
(user_id) [name:'user_id']
}
}
Ref: exposed_users.user_id > users.id
Ref: locations.user_id > users.id
Ref: users.id - confirmed_cases.user_id
Ref: confirmed_cases.id < exposed_users.confirmed_cases_id
Ref: users.id - reported_cases.user_id