Posts

Week-4 App Screen 1

Image
Week-4 App Screen 1 (UI + Backend integration) Screenshot of screen 1 First screen of my App deals with confirming Roll number of student. When students register to this app, they will enter their basic information like roll number, class, branch . This information is retried and shown to the students when they click Proceed button. In the back-end, nodejs queries student table to fetch entries from the database. If unknown roll number is entered (roll number of non-registered student), system throws Roll number not found error. For login purpose, login page was built. For new registration of an user, signup page with incorporation G oogle reCAPTCHA feature was build. It was fun building these pages for my app Screenshot of Login Screen Here user will log in to feedback system with username or password. If the user do not have credential, he may sign up with this system. Google reCAPTCH has been used to verify human against robot. Onnce the ...

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