tuannguyen-TN / finnish-rp-queue-checker

Home Page:https://finnish-rp-queue-checker.onrender.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Finnish Residence Permit Queue Checker

Introduction

This repository offers a quicker and more convenient way to check the queue of your application when you apply for an extended residence permit to the Finnish Immigration Service, or Migri.

NOTE: The codes have only been tested and applied for study RP and job-seeking RP types of applications, with the diary number in the form of xxxxx/xxx/xxxx,so please use at your own discretion.

Since Migri does not provide the API for us to use the Kamu Chatbot from distance, what I did was to get the request from the Network tab of Chrome's inspect of the website when I submitted the suitable information to the chatbot on Migri's website.

Web Application: HTML + JavaScript - Python/Flask

Frontend

I built a simple user interface with HTML and Javascript, using some properties of PaperCSS for design. You can visit the website here and check where you are in queue right now.

Backend

I wanted to use a diverse tech stack, so I implemented the backend with Python/Flask. At the moment, there are two endpoints:

  • '/': homepage of the backend.
  • '/check/': API endpoint to check for RP queue number.

You can test via this link

Standalone CLI Application

Python version

Since there is no direct API endpoint, I utilized Python's subprocess package, and run Linux commands with shell in Python.

How to execute program

There are two ways for users to look up the information.

  1. Insert the diary number as a command line argument
python main.py <xxxxx/xxx/xxxx>
  1. If not, just run the program as usual.
python main.py

There will be a prompt at the beginning of running the program. Then you can enter your diary number.

Node.js version

For the Node.js version, I managed to get the request in the form of a fetch statement, including the necessary headers and parameters.

How to execute application

There are two ways for users to look up the information.

  1. Insert the diary number as a command line argument
node index.js <xxxxx/xxx/xxxx>
  1. If not, just run the program as usual.
node index.js

There will be a prompt at the beginning of running the program. Then you can enter your diary number.

NOTE: Not all diary number work in this version of Node.js application.

About

https://finnish-rp-queue-checker.onrender.com/


Languages

Language:Shell 38.4%Language:JavaScript 31.0%Language:Python 18.9%Language:HTML 9.0%Language:Dockerfile 2.7%