Giter Site home page Giter Site logo

cyogian / json-server Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 499 KB

Full Throttle Lab Assessment API | Member Activity Viewer Backend

Home Page: https://json-server.cyogian.repl.co

License: Apache License 2.0

Python 88.09% JavaScript 11.91%
json-api json json-server mockaroo

json-server's Introduction

Full Throttle Lab Assessment API

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

Data Template Screenshot

How did I create a suitable database?

The database file db.json was prepared in multiple steps:

  • 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 generate relative datetime, I made custom python script to generate random end_time(greater than start_time but closer to 1-4 hours) for each member's each activity_periods entry. Thus converting db_unstructured.json to db_structured.json file using generate_end_time.py.

  • Later realized that this structure itself is not suitable as per JSON Specifications to have multiple endpoints for fetching data. So in order to make it suitable for json-server, I created another python script to restructure the JSON File by separating the activity_period as a separate entity in another collection called db.activity_periods having entries with relationship to db.members collection using a foreign key called memberId. Thus converting db_structured.json to db.json using restructuring_json.py that will be used by json-server to 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...

json-server's People

Contributors

cyogian avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.