Run cargo watch in terminal:
cargo watch -x runlet duration = end_time.to_chrono() - initial_time.to_chrono();
println!("DURATION {:?}", duration); let chrono_dt: chrono::DateTime<Utc> = "2021-10-19T20:25:17.734Z".parse().unwrap();
let initial_time: bson::DateTime = chrono_dt.into();
println!("{:?}", initial_time.to_string());- Remove dependency on custom
Resulttype and use thestd Resultinstead - Add user's id field to each task. (So we can use authorization to allow deletion and creation etc)
- Update
claplib impls (using deprecated methods at the moment) - Remove thiserror dependency
- Add proper error handling for DB interactions, no more
?or unsafeunwrapsall around. - Refactor all db object types
- Refactor project into a library and a binary so its easier to run non blackbox tests.
- Move routes in main to their own files
- Create better types for json errors.
- Better return messages to routes success (instead of just 200);
- Extract Routes to its own files
- Add Archive option for Clients and Projects
- Add Delete option for Clients and Projects
- Dockerize frontend and backend.
- Better Error handling in general:
-
- BodyDeserializeError
-
- CorsForbidden
-
- UNPROCESSABLE_ENTITY (invalid ID for example)
- Add filter requests based on headers (for example team names) so we can log and understand from where and how the requests are being done.
- Add health_check route
- Add tracing to all routes
- Limit fake events data to maximum of
8 hours a day. (Good challenge) - Make use of Default Trait. I.e: impl Default for PaginationQuery/Pagination
- ~~ Rename the
modelsfolder totypes~~ Add authentication and authorizationPagination toGet All Tasks Grouped By Dateroute, one page per week.api/tasks?page=1&size=2Add UsersExtract Error handling functions to its ownlib
-
Add Task
-
Edit Task
-
Add Project
-
Delete Project
-
Add Client
-
Delete Client
-
Whole user journey from seeding tasks, create tasks, projects and clients, check Charts and so on.
- Add script to the frontend and backend repos that creates a docker-compose/Dockerfile configuration in the parent folder so to start the project with just one command.
- cargo run -- --db-host localhost --log-level warn --db-name rust-time-tracker-base --db-port 5000 --db-password 12345
- Better understading of how
tracingandtracing-subscriberworks; - How would I implement Datadog here?
In the filters chaing, when expecting a query from the url, is it better to just use warp::query() and later build a struct or whatever from it, or use it as a generic recieving the apropriate type from the beginning, example: warp::query::tasks::PaginationQuery()