Rust API with axum + jwt + sqlx deployed on shuttle.
This currently provides:
- Axum API REST
- JWT authentication
- Database interaction
- Social login
- Password encryption
- Setup for a Shuttle deployment
by default, shuttle, when running on local, will try to launch a Docker container with the configured database inside of it, you must have docker installed for this to succeed.
- You must have rust installed.
cargo install cargo-shuttlecargo shuttle run- POST
/api/user/register- requiresname, email, password - POST
/api/user/login- requiresemail, password, returns tokenPayload {access_token, token_type, user_name} - POST
/api/user/social-login- requiresname, email, return tokenPayload
Require authorization:
- GET
/api/timers/group/:id - GET
/api/timers/cronograma/:id - GET
/api/cronograma/user- returns all the user's cronogramas with their timers - GET
/api/groups/user- returns all the user's groups with their timers - GET
/api/groups - POST
/api/groups/new- requirestimer_group_id, name, timers[{timer_id, name, seconds}]returns the newGroup{timer_group_id, is_owner, name, timers[]} - DELETE
/api/groups/delete- requirestimer_group_id, name, owner, owner_name - POST
/api/user/add-group- requiresgroup_id, returns the group added to the user - POST
/api/cronograma/new- requirescronograma_id, name, returns the cronograma - PUT
/api/cronograma/update- requirescronograma_id, name, returns the cronograma - DELETE
/api/cronograma/delete- requirescronograma_id, name - POST
/api/cronograma/add-timer- requirescronograma_id, timer: {name, seconds}returns the timer