My Visa Angel is a service that provides useful long-term visa-related information to non-EU residents in France. You can try the chatbot for yourself here: m.me/MyVisaAngel
We created this project in response to the French government's general dysfunction in communicating important visa-related information to the public. Simple information such as the list of papers needed to apply for the most common visa types is usually either not available online or out of date. See below for a full list of features.
The bot is currently only available in French, and we don't currently have plans to translate it to English as 99% of our users are francophones.
Feedback from the bot has been almost entirely positive, and as of this writing My Visa Angel has been used by thousands of people.
- A questionnaire that tells you which kind of visa you're eligible for
- Visa-related general information such as price, explanation, requirements, etc.
- Prefecture-related information such as the list of papers, how to apply, average wait times, etc.
- Responds to well-formed related questions with some help from Recast AI
- Contact an expert: talk to a flesh-and-blood immigration expert or let us help you through the entire application process
Click here for a video of the chatbot in action.
Note that as there is no license currently associated with this project it is considered "All Rights Reserved" even though it is open source. Here's some more information as to what that means.
The following section is for my two non-technical cofounders.
# Take the code from GitHub and clone it to your local computer
git clone https://github.com/mokolodi1/myvisaangel
# Change your directory into the new folder you just created
cd myvisaangel
# Open the current directory in Finder (this will only work locally)
open .
First, make the changes you'd like to the API, either locally or on the Amazon box.
To save your work to GitHub:
# Prepare all changes to be committed
# (you can also add specific files with git add filename)
git add -A
# Commit the changes
# Be sure to write meaningful commit messages - it's so
# helpful if you have to go back and change stuff!
# Good commit messages are less than 50 characters, so be
# descriptive but not verbose.
git commit -m "fixed incorrect salary information for Algerians"
# Get the latest code from GitHub
# You might get a scary message that you need to merge. If
# that happens just call Teo and he'll help you through it.
git pull origin master --rebase
# Push your changes to GitHub for safekeeping
git push origin master
Here's a couple more useful git commands you should try out
# View the current status of git - this will likely be
# your most useful command
git status
# In order to see what you've changed before you do `git add -A`:
git diff
Download the code and then:
# Install dependancies
npm install
# Start the server on port 3000 (the default port)
npm start
Use the following commands to test the API:
# Make sure the dependancies have installed correctly
npm install
# Run the test suite
npm test
# Checking test coverage
npm run coverage
Open the command line and connect to the AWS box:
# Change the permissions for the .pem file - it yells at
# you if you don't do this. You only have to do this once
# for every time you download it.
# Don't forget to modify the path to the .pem file so it
# points to the right place.
chmod 500 ~/work/important-files/myvisaangel-prod.pem
# Connect to the box
ssh -i ~/work/important-files/myvisaangel-prod.pem ubuntu@api.myvisaangel.com
# Connect to the tmux session
tmux a
Once connected to the AWS box, go to the shell that isn't currently running the server and run git pull origin master
to pull all the latest code down from GitHub. Then you can go to the shell running the server and restart it by doing C-c (hold control and press C) and then calling the command to start the server (sudo PORT=80 npm start
).
- Log onto hover.com to get the old prod box's IP, keep tab open
- Terminate the old production box
- Create a new EC2 box (Ubuntu Server 16.04 LTS) with port 80 (HTTP) in the inbound rules for the security group.
- Add/edit the
bN
record to the DNS with the new box's IP on Hover - Connect:
ssh -i myvisaangel.pem ubuntu@bN.myvisaangel.com
- Do the following:
# Grab the code from GitHub and go into the code's folder
git clone https://github.com/mokolodi1/myvisaangel
# Install stuff
BOX_NUMBER=bN ./myvisaangel/scripts/new_prod_box.sh
# Go into the new directory
cd myvisaangel
# Start a new tmux session so the command keeps running
# after you close the window
tmux
# Optional: do C-b " to split the tmux window into two. (Hold control and
# press B, release everything, and then press ")
# Start it up!
# NOTE: use beta_start.sh for betas so they don't write to prod logs, and you
# don't have to specify the BOX_NUMBER for that
./scripts/beta_start.sh
- Give it a shot: http://b2.myvisaangel.com/v1/ping
- Clone the production bot: increment the number and name
beta
- Connect the beta bot to the
MVA Beta
Facebook page - Go through all the blocks and change the URLs to the new version number
- Verify you've changed all the block's URLs to the new version number. If you miss one that block won't work anymore when we kill what is now the current production box but will seem to work until then.
- Take the
MVA Beta
bot out for a whirl while watching the logs - Invite other team members to be admin of the new bot
- Merge the latest PR, and
git pull
on the new box - Clear the logs (
rm ~/chatbot_logs.txt
) and relaunch on the new box:BOX_NUMBER=b4 ./scripts/prod_start.sh
- Watch the logs and
tail -f ~/chatbot_logs.txt
, testMVA Beta
one last time - Make sure no one is using
My Visa Angel
- Disconnect the beta bot from
MVA Beta
on Chatfuel - Open both the
My Visa Angel
andMVA Beta
in tabs - Disconnect the old prod bot from
My Visa Angel
on Chatfuel - Connect the beta bot to
My Visa Angel
on Chatfuel - Test
My Visa Angel
(the new production bot). (Could take up to 5 minutes for DNS to propagate.) - Rename
My Visa Angel N production
toarchive
- Rename
My Visa Angel N beta
toproduction
Hello person providing emergency assistance to Manu! Thanks so much in advance for helping out.
We're running a Node/Express app on an AWS box that connects with Chatfuel via an HTTP API. No databases or anything, and the node app isn't even built - super simple.
Each version of the chatbot is versioned, and you can find the production version on the Chatfuel dashboard by looking for My Visa Angel N production
, where N
is the version. At the time of writing, the production version is 4
, so that's what'll be used from here on out.
The URL for the AWS box that hosts the API is b4.myvisaangel.com
. The 4
in b4
refers to the version of the app. (The whole b4
business is a little funky, I know. I'll explain the reasoning when I'm back online. - Teo)
Grab the myvisaangel.pem
file from Paola or Abdel (the one on Slack) and get connected to our server: ssh -i ~/Downloads/myvisaangel.pem ubuntu@b4.myvisaangel.com
.
The app is running in a tmux session, and you can connect with tmux a
. (This is the first command you should type.)
From there you should be able to see more or less what the problem is. If you've never used tmux it might be a little funky, but scrolling should work more or less. If you ever get stuck scrolling with the yellow box in the upper right, use C-c
to stop scrolling. (C-c
means type c
while holding the control key.)
To start the app, the command should look something like this: BOX_NUMBER=b4 ./scripts/prod_start.sh
.
Test if the API is up by checking this page: http://b4.myvisaangel.com/v1/ping
There are two private credential files that I've sent Abdel and Paola in a private message on Slack that you'll have to grab and put in the private
folder. (One is for Google, one is for Slack integration.)
The two sections in this README about setting up a new box and deploying should provide you some more information as to how things are managed.
The DNS for myvisaangel.com
is managed on Hover. The email is mokolodi1@gmail.com
, and you can get the password from Paola.
Teo (aka mokolodi1
) is the admin of the GitHub repo, so you won't be able to push anything to master
if you edit locally. Feel free to deploy on a branch if you have to set up a new box.
If you change the url for the production box you'll have to change it on Chatfuel in each of the places it connects to the API. Paola should be able to help with that.
- change the
.pem
files for the production boxes on AWS - change my Hover password
- buy whoever helped us a beer