Work

PickIt V1.0 API Backend

Go
Docker
Redis
Goroutines
PostgreSQL

Need a Rider to Pick Up your order from any local market with safe and fast delivery?, well we've got you.

A bright pink sheet of paper used to wrap flowers curves in front of rich blue background

Tools Used

  • Go
  • Gorilla Mux
  • Goroutines
  • Docker/Docker Compose
  • PostgreSQL
  • Redis

Pickitup V1 Available Endpoints and Their Business Logic Description

Auth Service Endpoints

  • Register /register POST All User’s registration endpoint
  • Login /login POST All User’s login endpoint
  • Register Rider /register/riders POST Registers and creates a new rider user. riders and users are related to one another on a one to one basis, hence once a riders is registered its creates it associated user, however when when a user is registered it only creates the user.

User Service Endpoints

  • Give a rider a review /{rider_id}/ratings POST gives a rider a review which will be used to rate riders, thus users can user this metric to select the rider the rider they among list of riders. This endpoint is only authorized to users alone, therefore a rider is not allowed give him/herself a review

Rider Service Endpoints

  • Get all Riders /riders GET this endpoint retrieves all riders available
  • Get a rider /riders/{id} GET this enpoints retrieves a rider by its id
  • Update rider min and max charges /riders/charges PATCH this endpoint updates the rider min and max charges Only Riders Authorized
  • update rider status /riders/status PATCH this endpoint updates rider availability status to any of the the following enum values choices: Available Unavailable On Break Busy PATCH base on the request payload Only Riders Authorized

Order Service Endpoints

  • Send a rider an order /orders/{rider_id} POST this endpoints creates a pickup order for a rider and sends a concurrent email to of the newly created to the rider and the user clientele. On order creation, the users get debited from their with the based on the minimum and maximum charge the rider has set for any of his/her pickup orders. However, the rider won’t get funded yet, until the order delivery has been successfully confirmed by the user clientele

  • Get all orders /orders GET gets all users or riders orders

  • Update order delivery status /orders/{id}/delivery PATCH updates the order delivery status Only Users Authorized When delivery is confirmed riders gets their wallets auto funded with the order charge price

  • Acknowledges an order /orders/{id}/acknowledge this endpoints allows a rider to acknowledge the receipt of the order.

All above are the basic MVP Implementation For The PickItUp Business Backend version 1 with some deliberately left features to be implemented in the V2 of the application such as;

  • Email Verification endpoint
  • Resend Email Verification Code
  • Persistent Email Notification
  • Add funds to wallet endpoint
  • Cancel pending pickup order
  • Users add riders to favorites list
  • Limit users to one review per rider

To be implemented in version 2.0.

Why Version 2?

  • Scalability
  • Orthogonality
  • Flexibility
  • Easy Maintainability

Right Now our v1 application might be scalable enough for small scale or medium scale business, but we have a vision of making the application a nationwide and eventually worldwide application, hence we need an application that can easily accommodate the growth. Thus we need to upgrade our system to distributed systems using microservices architecture.

Our Distributed System Architecture Overview

  • Version 1 live url link
  • Docs Page link

Checkout the Distributed system here