Posts

Showing posts from August, 2017

Hasura Auth API + Postman collection

Image
In my previous post, I had mentioned that Hasura platform provides Data API as well as Auth API. I used Data API to insert and retrieve data into tables of my database schema. Check out my previous post about  Hasura Data API Auth service Hasura Auth provides services for user authentication & authorization, user management, session management and table permissions. In a typical app, we require to Register a new user. Login an existing user and maintain his/her session. Logout the user and terminate his/her session. Reset password for a user. Table for user information is already there in Auth service. Roles There are three roles in the auth service admin user anonymous A user of user table can have more then one role, and each role have its permission and access restrictions. The  admin   role can do CRUD queries to all the tables. Permissions for other roles is need to be defined in each table. When we register a new user, it assigned least  user

Hasura Data API + Postman Collection

Image
After doing data modelling for my app, I moved to next task in the third week. The task was to learn how to make CRUD queries across all your tables using Hasura Data APIs. My previous blog post is about data modelling for my app, check it out to understand database schema for my app. What is an API Application program interface ( API ) is a set of routines, protocols, and tools for building software applications. An  API  specifies how software components should interact and  APIs  are used when programming graphical user interface (GUI) components. Hasura provides Data API as well as Auth API on their platform. Before integration of the app with database, first I need to check the APIs and learn how that works. To know more about Hasura Data APIs, refer to this  link . Data service on hasura platform runs as any other service like my app. We need to contact to this data service in order to exchange data to/from the database tables. I used a third party app named

Data Modelling for White Board app

Image
In the journey of my internship at Hasura, as in the first week I had created the  prototype  for my  app idea  White Board , the next step was to make relational models for my app the first task in third week was to make data models for my app and to add relevant tables using the console UI of local development. http://www.lintao-dashboards.com/wp-content/uploads/2016/02/ldm930.jpg Data models Data models define the description of data structure and the way data are organized using a database. It define how data is connected to each other and how they are processed and stored inside the system. Data Models are fundamental entities to introduce abstraction in a DBMS. Data model should fulfil the requirements of the for which it is being created, with requirements I mean to visualize the necessary tables and relations between various tables, depending on what are the services app is giving. Once all things about data models are clear, we can proceed to integration of o

Setting up Hasura/local development

Image
In week 2, last task was to set up Hasura platform on my local machine. Hasura uses docker based deployment of apps on its server. Kubernaties is the tool to manage docker container of custom application on the virtual machines. The requirement of hasura platform on our local machine is because of our local environment and production environment should be same so that there shouldn’t be any problem when we deploy our application on the remote servers, all things are tested first on the local hasura platform. On the hasura platform, each application deployed as docker image, which contains separate virtual machine so that no other process can conflict with the processes of the application. Application packed in docker containers so that its resources are limited and it won’t affect the whole giant server. The thing we need to install was the platform and sync the basic docker image, which contains configurations and other required things to make the platform work for us. Pr

Playing with the Octo-Cat

Image
After I done with setting-up dev environment, next task of Hasura Internship was to learn git basics. https://octodex.github.com/images/dojocat.jpg Git is not a programming language or an IDE About Git Git is the most commonly used  distributed version control system . Git is a mature, actively maintained open source project originally developed in 2005 by Linus Torvalds, the famous creator of the Linux operating system kernel.  GitHub  is a company that provides a platform to do version controlling Git allows a team of people to work together, all using the same files. And it helps the team cope with the confusion that tends to happen when multiple people are editing the same files. Version control in simple terms is nothing but making flags/check points as significant changes are made to your code/work so that you can always go back to whichever version was last working properly or whichever version you want to use at the moment. Why Git and Github? Version contr