Merlion Tours is a web platform that operates on a Microservice-oriented architecture. This enterprise solution aims to connect prospective tourists with tour guides.
The project uses a local MySQL database with the source file attached to the SQL_Scripts
folder. The file is called tourDBdata.sql
.
1. Start up wamp server
2. Go to localhost
3. Select phpmyadmin
4. On the tabs above, select import
5. Select the add button and attach the <folder> and click go
6. Check that the import is done properly by finding the database on the left side menu.
7. You should see "tourdb" imported with 4 number of tables
- Mac users should check their root account if a password is required. If password is required, use
root:<your Wamp password
in the urls for.env
anddocker-compose.yml
- If any of the files give you any issues like npm modules not installed, run
npm install
to install all the dependencies.
- The microservices are running on docker-compose containerised.
- To start, make the changes to the
docker-compose.yml
file:- change all the image from /ESDtour... to /ESDtour....
- check the MySQL port to be your port
- check your WAMP root access or user
is213
access. If the access is not set, use
The frontend is a simple Vue.js cli frontend. To start the frontend, it is as simple as starting up the Vue local server.
- Run
npm run serve
to start up the Vue.js frontend. - If it doesn't work, you can follow the Vue troubleshoot:
- Ctrl + c to stop vue services
- Run
npm run build
to build the local Web application - Start up Vue again using
npm run serve
The projects uses some packages and libraries to make it work. In the event that npm install
and the requirements.txt
failed to install everything, here is a list of commands to install the other packages beyond the lab.
pip install python-dotenv python -m pip install requests python -m pip install request python -m pip install pyTelegramBotAPI python -m pip install python-telegram-bot python -m pip install -U Werkzeug
npm install
npm run serve
npm run build
npm run lint
npm install moment from 'moment'
npm install stripe
-
Access http://localhost:1337 in a browser to create an admin user for Konga Username: admin Email: Password: adminadmin
-
Sign in
-
Connect Konga to Kong by creating a new connection Name: default Kong Admin URL: http://kong:8001
-
Add a new service Name: tourapi Url: http://tour.v1.service:5002 Leave the defaults for the rest Then, click “SUBMIT SERVICE” button at the end of the page.
-
Click on the “bookapi” service, then the Routes tab.
-
Add a new route. Paths: /api/v1/tour (ensure no space before or after; MUST press “Enter”) Methods: GET (MUST press “Enter”) Then, click “SUBMIT ROUTE” button at the end of the page.
-
Open the UPSTREAMS page
-
Create an upstream (a virtual hostname) Name: tour.v1.service Then, click “SUBMIT UPSTREAM” button at the end of the page.
-
Click DETAILS, then the Targets tab
-
Add a target Target: tour-service-1:5002 Then, click “SUBMIT TARGET” button.
-
Add another target Target: tour-service-1:5003 Then, click “SUBMIT TARGET” button.
insert the API token in the .env file in backend_log
"6017383619:AAGCxlw36LUABFUBsbEdJ-48qWm9VsvpTak"
go to backend_log and run py telegram.py
and py bot2.py
go to the route https://t.me/ESD_Tours_bot
to start and input the booking ID to get the tour info.