A Mock API made with JSON Server by Typicode for Full Throttle Lab Assessment Project.
A JSON based Backend for Member Activity Viewer Application
Data Generated from Mockaroo Realistic Data Generator
-
Generated Fake Data using Mockaroo, the template is displayed above.
-
As the end_time should be greater then the
start_time& mockaroo had no such method to generaterelative datetime, I made custom python script to generaterandom end_time(greater thanstart_timebut closer to 1-4 hours) for each member's eachactivity_periodsentry. Thus convertingdb_unstructured.jsontodb_structured.jsonfile usinggenerate_end_time.py. -
Later realized that this structure itself is not suitable as per
JSON Specificationsto have multiple endpoints for fetching data. So in order to make it suitable forjson-server, I created another python script to restructure the JSON File by separating theactivity_periodas a separate entity in another collection calleddb.activity_periodshaving entries with relationship todb.memberscollection using a foreign key calledmemberId. Thus convertingdb_structured.jsontodb.jsonusingrestructuring_json.pythat will be used byjson-serverto autocreate a JSON API Server. -
Deployed the server on repl at this link.
-
The Frontend Site that uses this mock API is deployed on netlify at this link and a private github repository.
-
Note : Use this link to get JSON similar to Sample File : https://json-server.cyogian.repl.co/members?_embed=activity_periods
-
Started Mocking...