Giter Club home page Giter Club logo

fampay_extern_assignment's Introduction

Fampay Extern Assignment

This project consists of a simple rest api made using django-rest-framework and a react app that consumes this api to form a dashboard.

Running the API

First clone the repository from Github and switch to the project directory, make sure the branch is set to main:

$ git clone https://github.com/shivchauhan332/fampay_extern_assignment/
$ cd ./videoAPI

Install Virtual Environment for For django, if not present:

$ pip install virtualenv

Activate virtual environment:

$ ./env/scripts/activate

Start the development server:

$ python manage.py runserver --noreload

OR

After cloning and changing directory, run:

$ pip install -r requirements.txt
$ python -m manage.py makemigrations
$ python -m manage.py migrate

Then start the development server:

$ python -m manage.py runserver --noreload

For testing the API

Go to http://localhost:8000/api/get-videos on your browser

Running React App

First clone the repository from Github and switch branch to "dashboard" and then move to the project directory:

$ git clone https://github.com/shivchauhan332/fampay_extern_assignment/
$ git checkout dashboard
$ cd ./youtube_api_dashboard

Then install node package dependencies, and then start the server, make sure API is also running at the same time

$ npm i
$ npm start

Go to http://localhost:3000 on your browser

Features and Screenshots

API

API makes use of django rest framework, and returns the data in JSON format. The results are paginated, with default page length of 12. Default Home View

The API supports sorting and searching, which can be done by added query params in the url (for eg. http://localhost:8000/api/get-videos?ordering=title_name will return results sorted by title name). The additional info about endpoints is easily obtained by going to the url "http://localhost:8000/api/get-videos?" itself. Default Home View

React App

The react app makes use of this API to build a user friendly dashboard which displays the data in a nicely-formatted way. Homepage: The home pages fetches data from localhost:8000 and displays it in paginated form Default Home View

Searching: Search can be invoked by clicking on the magnified glass button. Default Home View

Sorting: Sorting can be done by clicking on the buttons provided in the header. Default Home View

fampay_extern_assignment's People

Contributors

shivchauhan332 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.