project for CF test.
-
sandbox: -- base url: https://cf-nff5.onrender.com/ -- mentor schedule: https://cf-nff5.onrender.com/api/school/v1/students/fcb0272c-c341-4b0c-a9ec-fd2e74ffb6f0/mentors/27760bc3-0f35-408d-aa3b-12be1ba30900/availability
-
documentation: https://documenter.getpostman.com/view/13898358/TVt18QJi
-
postman collection: https://www.getpostman.com/collections/6a8fe5404917e5b58e5c
I decide to separate the api models from the rails models in order to be able to have a domain driven approach, which allow us to quickly change between versions without having to much legacy/dependency as different parts of the system can be morphed to work with different versions.
Serializer for API Mentors
Methods
- build(mentor, calendar_client, time_zone)
- builder pattern for api v1 mentors
- #filter_slots_by_date(date: date)
- returns the slots available for a given date
- #slot_present?(datetime):
- validate if date is available
- #refresh_slots!
- remove allocated calls not longer in mentor calendar
- nth: clears cache
- nth: should trigger some kind to notification for user
Serializer for CalendarSlots
Model information
Attributes
- first_name
- last_name
- time_zone
- mentors, through: mentorship
- allocated_calls
Attributes
- first_name
- last_name
- time_zone
- students, through: mentorships
- allocated_calls
- calendar_id
Attributes
- student
- mentor
Attributes
- mentor
- student
- date_time
- description
If you want to contribute download the repositorie and follow the next steps, all requests should be done trought a PR, pushing directly to main
is not allowed.
docker-compose build
docker-compose up -d
docker-compose exec cf bundle exec rake db:setup
docker-compose bundle exec rspec
- Codeclimate [rubocop]
- TODO