Posts

Showing posts from June, 2017

Hasura Auth API + Postman collection

Image
Hasura Auth API + Postman collection  This link talk about Hasura Data API+ Postman Collection 1) Login Query: To login use http://auth.c101.hasura.me/login URL Snapshot of login query in Postman is  Response to login query is  {        " hasura_roles ":[                  " user "        ],         " auth_token ":"gv31vbfgfgfgfgec002hqhzr2gfgg0ey ",        " hasura_id ": 2 } When a user logs in, a new session token is created for the user. It is set as cookie and also returned in auth_token of the response. In the above example, the session token is gv31vbfgfgfgfgec002hqhzr2gfgg0ey. The token and the associated user’s information is stored in the session store. 2) User Info:  Used http://auth.c101.hasura.me/user/account/info URL to get use...

Hasura Data API + Postman collection

Image
Hasura Data API + Postman collection Part I In this blog I would introduce you with Hasura Data API available for accessing database. I have used Postman tool to interact with Hasura Postgres database. To refer data modeling of my app, check out this link . What is Postman? Postman is a Google Chrome app for interacting with HTTP APIs. It presents you with a friendly GUI for constructing requests and reading responses. You can download and install postman from this link . How to use Postman to fire basic database queries on Hasura data API? 1) Sign-up Query: The authentication API has been accessed using AUTH URL provided by Hasura along with signup request. In body section, username and password is provided for new user to signup in JASON format. In response to this query, we get Authentication code that will be used in further database queries. 2) Select Query: While firing any query through Postman(except signup/logout), Authentication code is necessary. Thi...

Data Modelling

Image
Data Modeling for Student Feedback Analysis app on Hasura Platform As a part of two month off-site internship with Hasura, I am embarked on developing a small 3-screen student feedback analysis app. Here is the link of  Three screen app idea and App wireframe/prototype   For modeling this application I have created following three tables. 1) Student: Purpose of this table is to store student information like rollno(Primary Key), name, class and branch. 2) Faculty: Purpose of this table is to store faculty_id(primary key), name of faculty and calculated average of feedback. 3) Feedback: Purpose of this table is to store student feedback ER Diagram for database schema is as follows (ER diagram drawn using PonyORM on-line editor- https://editor.ponyorm.com/) This ER diagram depicts two relationship. 1) One -to-many relationship between student to feedback table - depicting the fact that one student provide feedback of multiple faculties 2)...

Setup dev environment

Image
Setup device  environment As per recommendation from Hasura team, I decided to install Ubuntu 16.04 on desktop Computer. Hardware and software  configuration of my PC are shown in screen-shot.   I downloaded  Ubuntu 16.04 image from http://releases.ubuntu.com/16.04/ubuntu-16.04.2-desktop-amd64.iso, created bootable pendrive(using Startup Disk Creator), and installed plain ubuntu 16.04 operating system on my PC. Now I thought to install an editor. As suggested by @tanmay during his first webinar, I decided to install vim on my system. So next step was to install vim by giving command $sudo apt-get install vim . Used vimtutor to learn basic vim commands. Updated .vimrc file for colors, indentation, numbering lines etc. The screen-shot of .vimrc file is

Setup Hasura /Local Development

Image
Hasura Installation    Here are the steps to setup Hasua Local development on Ubuntu 16.04 on 64-bit machine Step I - Installation of virtualbox Use link https://www.virtualbox.org/wiki/Downloads to download virtualbox-5.1_5.1.22-115126~Ubuntu~yakkety_amd64.deb   Double click the downloaded .deb file for installer to start. Step 2 - Installation of hasuractl $curl -Lo hasuractl https://storage.googleapis.com/hasuractl/v0.1.1/linux-amd64/hasuractl && chmod +x hasuractl && sudo mv hasuractl /usr/local/bin/ Step 3- Installation of latest kubectl (>= 1.6.0) Refer web site https://kubernetes.io/docs/tasks/tools/install-kubectl/ for installation and set-up of kubeclt Following steps are followed to install kubectl.. $curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl $chmod +x ./kubectl $sudo mv ./kube...

Git Tutorial

Image
What is Git? Git is open source Distributed Version Control System. Git  plays an important role when collaborating on project by team members located  geographically at different locations. Local repository vs Remote Repository Create a directory where you would like to create local repository and fire command $git init to create local repository When you would like to collaborate with team which work on the same project and would like to contribute to it then create remote repository (e.g. GitHub). When we work with local repository there are there places where our files stay during its life-cycle in git. 1. Working Directory - Untracked and modified files are kept here. These files can be listed using $git status command 2. Staging Area - a cache of files that you want to commit 3. Local Repository - Directory with name .git in working directory. (Image source- https://softwareengineering.stackexchange.com/questions/119782/what-does-stage-mean-in-g...

Prototyping

Image
Hello guys.... I am up to developing a " Student Feedback Analysis" web-app.. I have used  proto.io tool for prototyping my app The main idea of this web-app to enable students to give their valuable input about teaching- learning process. First Screen: In this screen student Roll number is taken as input form user. Database will be queried to retrieved student information like name,class and branch. Validation to be carried out: 1) Based on valid roll number, genius students records are identified. If student record not found in the database, error message pop-up will be displayed. 2) It is checked whether  student has already provided his/her feedback. If yes, he/she will be directed to third screen else second screen will be presented. Second Screen: This is very important screen where student will evaluate faculty based on certain criteria ( communication, subject knowledge etc). Students will rate faculty on the scale from 1 to 5 where 1 refers to Poor an...

Three Screen App Idea

As a part of Introduction to Modern Application Development NPTEL online course, I was fortunate to be selected for two month off-site internship programme. This internship is meant to consolidate software development concept and deliver a working product on Hassura platform within a period of two month. After a long thought and looking at department requirement I decided to develop a Student Feedback  Analysis  Web App. The main concept of this web-app is to allow students to give feedback about teaching learning process of departmental faculty. I am planning to devise this app with three screen (Excluding login/logout/register screen) First Screen:   Take student roll number and retrieve his/her information from database. Check whether the student already provided feedback. Second Screen: Allow student to provide feedback based on various parameters. Third Screen: Display analysis of students feedback in Graphical format (Pie Chart / Bar Cart)