Bipin Maharjan

I am a IT Enthusiastic

Bipin Maharjan

Currently working as a Backend Web Developer in Ensue Nepal Pvt. Ltd., Gwarko, Kathmandu, Nepal. I am Computer Science student as well conducting my Master class in Nepal College of Information Technology, Balkumari, Lalitpur, Nepal.

  • Kathmandu, Nepal
  • bipinmhz@gmail.com
  • www.bipinmaharjan.com.np
Me

My Professional Skills

API Development, Backend Laravel Developer

API Laravel Development 90%
PHP 80%
MYSQL 85%
Server Management 60%

API Development

Skilled in development of APIs

Database Design

Normalized Database Design

Server Handling

Skillfully handling the server

Web Development

Develop web applications

Problem Solving

Solving critcal problem with optimal solution

Awesome Features

Able to develop awesome features according to client requirements.

0
lines of code
0
coffee cups
0
books
0
current projects
  • Sanctum with Socialite

    Sanctum with Socialite: API Authentication via Social Networks in Laravel 8


    Introduction

    Social network authentication is now an essential part of many web application as it saves the users a lot of time, as they won’t need to fill the whole form. They just sign up with their social account and next time they can log into the website by a single click.

    In this post, I will show you how easily we can integrate sanctum authentication with social networks via google, facebook, github, etc. with same piece of code.

    You can view the source code here.

    Lets get started …

    Laravel Sanctum provides a featherweight authentication system for SPAs (single page applications), mobile applications, and simple, token based APIs. Sanctum allows each user of your application to generate multiple API tokens for their account. These tokens may be granted abilities / scopes which specify which actions the tokens are allowed to perform.

    Install sanctum package:

    composer require laravel/sanctum

    Then, publish the configuration file of sanctum. The sanctum configuration file will be placed in your config directory:

    php artisan vendor:publish --provider="Laravel\Sanctum\SanctumServiceProvider"

    In User Model(app/models/user.php), add HasApiTokens Traits.

    user model

    Laravel also provides a simple, convenient way to authenticate with OAuth providers using Laravel Socialite. Socialite currently supports authentication with Facebook, Twitter, LinkedIn, Google, GitHub, GitLab and Bitbucket.

    Install socialite package:

    composer require laravel/socialite

    Then add credentials for the OAuth services your application utilizes. These credentials should be placed in your config/services.php configuration file, and should use the key equals to provider name (e.g., facebookgooglegithub etc.)

    env file

    If you want to use a provider that is not provided in Socialite by default take a look on Socialite Providers.

    We can easily setup developer account and get client id and client secret from respective OAuth provider. Here are few links of OAuth providers:

    GitHub: https://github.com/settings/developers

    Google: https://console.developers.google.com/apis/dashboard

    Facebook: https://developers.facebook.com/apps/

    In OAuth Service provider, Redirect URI is to be added. A redirect URI, or reply URL, is the location where the authorization server sends the user once the app has been successfully authorized and granted an authorization code or access token. Note: For Facebook, https callback url is required. Therefore, we need to set local environment accepting https.

    As you get credentials from OAuth Services, add client_id, client_secret and redirect_uri in your .env file for your OAuth service:

    add in env file

    We need to make few changes in users table migration before running migration. Password field should be made nullable as we will not require password column.

    User table migration

    Create a providers table to store OAuth service provider information:

    Socialite Provider table migration

    Run all migrations:

    php artisan migrate

    Make model for the providers table created:

    php artisan make:model Provider
    Provider Model

    Once provider model is created. User model is related with provider model by creating providers function.

    User Model

    Define the routes in api.php

    routes/api.php

    Make LoginController.php:

    php artisan make:controller LoginController

    Next, one route for redirecting the user to the OAuth provider, and another for receiving the callback from the provider after authentication. We will access Socialite using the Socialite facade:

    Login Controller

    The user method will read the incoming request and retrieve the user's information from the provider. Then we store only necessary user information to the database. With the help of sanctum, Bearer token is generated.

    php artisan serve

    Now, Paste and go http://localhost:8000/api/login/github in your browser.

    Then, add your credentials:

    Github redirected page

    After user is authenticated, we get the following response with Access-Token in its header:

    request with response headers
    response of payload

    Conclusion

    We have successfully implemented API authentication via social login in Facebook, Twitter, and Google using Socialite . Now you could easily add other providers like Twitter, GitLab, etc and work like a charm.

     

  • TDD Vs BDD


    Here is my short presentation on TDD Vs BDD. Please have a look at it.

  • Student Management System



    This is the project done using core PHP. This project was done during my internship period for learning the basics and core of programming.

    About

    A minor project on PHP using manual MVC

    Includes three tables

    1. Students
      • id(PK)
      • name
      • address
      • phone_no
      • email
      • photo
    2. Courses
      • id(PK)
      • name
      • start_date
      • end_date
    3. courses_students
      • course_id(FK)
      • student_id(FK)

    Query operations are performed showing

    1. create courses with start_date and end_date
    2. show running and past courses
    3. Add Students
    4. View all Students in addition to edit and delete students

    Source Code

  • Internship Project - WYESHR

    A practical work background carries a major significance when attempting to enter the job market. Doing an internship helped author get exposed to new people in a more controlled and stable  environment. The principal objective of doing internship project is to work on a real-world web application, strictly following agile values and principles. WYESHR internship project is named after the client organization name whose small step is to collect data of child marriages and women status in some parts of our country and aware the people about their rights. As survey is conducted, programs are conducted in different place to aware people about the various social topics. To keep records of the events conducted and the survey they take, this system is made. Using this system, employees of WYESHR are able of take child marriage survey and attendance of events from the mobile application. Once the mobile application is connected to the internet, data could be exported to the server. This system is made such that employees of WYESHR can generate a report and help in making decision to take right action in that area.

    Documentation

    Project: BipinMhzn/internship-project

    Report: Final Internship Project Report

    Result 

    Login Page:
                                              
    Dashboard Page:

    Survery List Page:
                                                 

     Survery Detail Page:
                                                  
    Change Password Page:
    Edit Profile Page:

    Events List Page:


     Data sent to server:
    \
     Reset Password Page:
     Register New User Page:



    Reset Password Email:


    Reset Password Page:



    Users List:




  • Mero Token

    This is my 7th Semester BSc. CSIT Final Year Project.

    The project Mero Token is developed in Ethereum platform in order to develop an ERC20 standard token and initiate the initial coin offering in a crowd sale. Its main concern is to remove the third-party trust issue between the investor and the company and therefore initiate the crowd fund in easy and fast way. Any tokens developed in ERC20 standard can be exchanged with each other. “Mero” token costs ether to buy it which acts as a fund raising for crowd sale. In real world, investors buy into ICOs in the hope of quick and powerful returns on their investments.

    Objective

    • Code own cryptocurrency on the Ethereum blockchain
    • Create own ERC20 token and crowd sale with Ethereum smart contracts
    • Build an ICO website
    • Enable users to transfer, approve and transferFrom tokens

    Documentation

    Project Completed In Collaboration With: Sonish Maharjan

    Github Project: Mero Token

    Result

    Home Page:

    Buy Asset page:

    Sequence Diagram:



  • Book Store

    E-commerce Project

    Sixth Semester-CSIT
    A book store created where admin is able to create, edit, update, delete book.
    Users are able to store the book into the cart and buy them.

  • Sulav Swastha - Android

    Sulav Swastha

    Android application made to learn the basics about android app development.

    Tools Used

    • Android Studio
    • SQLite

    Logo

    Result















  • Wonderful quotes - Vue js




    A Vue js app to learn how the communication between the components occurs.
  • Jr. Backend Developer | Ensue Nepal

    15 DEC 2020 - Present
    Plan, develop, test and maintain web application. Responsible for building REST APIs meeting the client needs. Collaboration with team members. Effectively translate client requirements into system requirements. Server maintenance.

    Jr. Backend Developer | Smartmobe Solutions

    16 NOV 2019 - 7 OCT 2020
    Plan, develop, test and maintain web application. Responsible for building REST APIs meeting the client needs. Collaboration with team members. Effectively translate client requirements into system requirements.
    1 AUG 2019 - 15th NOV 2019

    Web Developer - Intern | Smartmobe Solutions

    Partner closely with a dedicated engineering mentor to grow throughout the internship in line with your career ambitions. Participate in Agile/SCRUM SDLC. Participate in code and architecture reviews. Continuous research and learning.

    ADDRESS

    Kathmandu, Nepal

    EMAIL

    bipinmhz@gmail.com