- Objective
- Design
- Task Requirements
- Demo
- Architecture and Tools Used
- Running the application
- NOTICE BOARD
- Design the UI using the provided Figma link and implement an API to create a trip and view a trip. Submit the project as a GitHub repository.
- API Endpoint for CRUD Operations: https://beeceptor.com/crud-api/
Use the provided Figma design to create the UI. Ensure the UI matches the design specifications closely. Pay attention to details like spacing, fonts, colors, and alignment. Make the UI responsive for different screen sizes.
Integrate the UI with the API. Implement the necessary logic to send trip details to the API and handle the response. Provide feedback to the user on the success or failure of the trip creation.
Include a README file in the GitHub repository. The README should contain instructions on how to set up and run the project. Provide details on the API endpoints and their usage. Include any additional information that may be helpful for understanding your implementation.
Demo-Successful.mp4
Demo-Unsuccessful-2.mp4
- The application is built using Swift and SwiftUI.
- I made use of Async/Await for the GET request, URLSession for the POST request.
- I used the Model-View-ViewModel(MVVM) architecture.
You can run Hebron Plants on iOS 16.5 or later, iPadOS 15.5 and macOS 12.4 or later. You must have Xcode 15 or later installed.
- Click on the green button labeled
Code
then selectOpen with Xcode
- Click
allow
when the prompt shows. - Click
clone
when the prompt shows. - Click
Trust and Open
when the prompt shows. - Choose the device you'd like to run the app on.
- Press the play button!
-
GET all trips endpoint:
https://saladel.free.beeceptor.com/my-trip
,https://tripps.free.beeceptor.com/my-trip
-
POST create trip endpoint:
https://saladel.free.beeceptor.com/create-trip
,https://tripps.free.beeceptor.com/create-trip
- After Cloning the project, Go to
ViewModel -> CreateTripViewModel
comment the following line
let postEndpoint = "https://tripps.free.beeceptor.com/create-trip
by adding //
in front of it. i.e:
//let postEndpoint = "https://tripps.free.beeceptor.com/create-trip
then uncomment
// let postEndpoint = "https://saladel.free.beeceptor.com/create-trip"
by removing the //
in front of it.
- Also Go to
ViewModel -> TripDetailViewModel
comment
let endpoint = "https://tripps.free.beeceptor.com/my-trip"
by adding //
in front of it. i.e:
//let endpoint = "https://tripps.free.beeceptor.com/my-trip"
then uncomment
let endpoint = "https://saladel.free.beeceptor.com/my-trip"
by removing //
in front of it.
Feel free to reach out to me on Linkedin or Twitter if you have any questions or feedback!