This app uses a Rails back-end as an API to send doctor details and appointment data to the frontend of a booking application.
Enjoy your API!
Our group consists of 4 members and we are: @Melaku05 - Team Member #1 @aboongm - Team Member #2 @steveWDamesJr - Team Member #3 @Ismailco - Team Member #4
- Ruby
- Ruby on Rails
- Terminal
- IRB
- Rubocop (linters)
- PostgreSQL
Project Requirements - distributed into milestones below:
- Milestone 1: Setup the project for backend (group task) #1'
- Milestone 2: Implement devise gem
- Milestone 3: Rspec test user
- Milestone 4: Generate table and model for the Doctor (Melaku)
- Milestone 5: Generate table and model for the Reservation (Ranjit)
- Milestone 6: Rspec for Reservation (Ranjit)
- Milestone 7: Rspec for Doctor (Melaku)
- Milestone 8: Implement Rspec gem (Steve)
- Milestone 9: Create Documentation (steve)
-
Milestone 1: Setup the project for the frontend (group task)
-
Milestone 2: Node package manager dependencies (group task)
-
Milestone 3: Create login page (group task)
-
Milestone 4: Create navigation panel (group task)
-
Milestone 5: Create main page (Ranjit)
-
Milestone 6: Create details page (Melaku)
-
Milestone 7: Create Reservation page (Steve)
-
Milestone 8: Create my reservation page (Ismail)
-
Milestone 9: Create the redux store (group task)
-
Milestone 10: Create the doctor reducer (group task)
-
Milestone 11: Create the reservation reducer (group task)
-
Milestone 12: Create the login reducer (group task)
-
Debug linter errors
Live server: Rswag api documentations
-
GET /users/
- Get the logged in user data
- returns:
{ "id": 1, "username": "user", "created_at": "2022-08-28T21:31:51.962Z", "updated_at": "2022-08-28T21:31:51.962Z", "email": "[email protected]" }
-
POST /users
- Create a new user
- e.g:
{ "username": "user", "email": "[email protected]", "password": "password" }
-
DELETE /users/
- Logged out the logged in user
-
POST /doctors/
- Create a new doctor
- e.g:
{ "name": "Dr. doc", "detail": "Bio", "photo": "photo.jpg", "city": "London", "specialization": "Gynecologist", "fee": 100.00 }
-
GET /doctors/
- Get all doctors
- returns:
[{ "id": 1, "name": "Dr. doc", "detail": "Bio", "photo": "photo.jpg", "city": "London", "specialization": "Gynecologist", "fee": 100.0, "created_at": "2022-08-30T10:34:55.953Z", "updated_at": "2022-08-30T10:34:55.953Z" }]
-
GET /doctors/:id
- Get a doctor by id
- returns:
{ "id": 1, "name": "Dr. doc", "detail": "Bio", "photo": "photo.jpg", "city": "London", "specialization": "Gynecologist", "fee": 100.0, "created_at": "2022-08-30T10:34:55.953Z", "updated_at": "2022-08-30T10:34:55.953Z" }
-
DELETE /doctors/:id
- Delete a doctor by id
-
POST /reservations/
- Create a new reservation
- e.g:
{ "doctor_id": 1, "user_id": 1, "date": "2022-08-30", "city": "London", }
-
GET /reservations/
- Get all reservations
- returns:
[{ "id": 1, "doctor_id": 1, "user_id": 1, "date": "2022-08-30", "city": "London", "created_at": "2022-08-30T10:34:55.953Z", "updated_at": "2022-08-30T10:34:55.953Z" }]
-
GET /reservations/:id
- Get a reservation by id
- returns:
{ "id": 1, "doctor_id": 1, "user_id": 1, "date": "2022-08-30", "city": "London", "created_at": "2022-08-30T10:34:55.953Z", "updated_at": "2022-08-30T10:34:55.953Z" }
To get a local copy up and running follow these simple example steps.
Make sure you have Ruby and Rails installed on your computer. If not, you can follow this tutorial to install them.
If you don't have PostgreSQL installed, you can follow this tutorial to install it.
In your terminal, navigate to your current directory and run this code
git clone https://github.com/Melaku05/booking-app-backend.git
Then run:
cd booking-app-backend
Open the project in your favorite code editor. code .
for VS Code.
- Use the command
bundle install
or just simplybundle
to install all project dependencies. - Run
rails db:create db:migrate
to create the database and run migrations. - You might need to supply a username and password for your PostgreSQL database if you run into an error with the previous step.
- Simply navigate to
config/database.yml
and add your username and password to theusername
andpassword
fields.
Start terminal
rails s
- Then click on
http://127.0.0.1:3000
Enjoy your fantastic Doctoral bookings as your app opens in the web browser!
rubocop
rubocop --auto-correct-all
or
rubocop -A
rspec spec/models
bundle exec rspec spec/views
- Login into Booking App with your username
- Click on the list of Doctors to see their specific detailed information
- From Navigation or from details page click 'Reserve' to book an appointment
- Click from Navigation panel, 'My Reservation' to view a list of your appointment details
Enjoy saving time on long appointment calls by using our top ranking appointment booking App!
π€ Melaku Eshetu
π€ Ranjit Luwang
- GitHub: @aboongm
- Twitter: @John_luang1
- LinkedIn: LinkedIn
π€ STEVE W DAMES JR
- GitHub: @githubhandle
- Twitter: @twitterhandle
- LinkedIn: LinkedIn
π€ Ismail Courr
- GitHub: @ismailco
- Twitter: @ismailcourr
- LinkedIn: Ismail courr
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Give a βοΈ if you like this project!
- Hat tip to anyone whose code was used
- Original design idea by Murat Korkmaz on Behance.
This project is MIT licensed.