Maporia is a smart mobile application focused on domestic tourism in Egypt. It helps users explore Egyptian governorates, discover historical and cultural attractions, and interact with intelligent tools such as an AI chatbot and a landmark scanner.
After cloning or downloading the project, open a terminal in the project directory and run:
bash flutter pub get
bash flutter run
Clone the backend folder and navigate to it:
bash cd backend npm install
Create a .env file with the following:
env PORT=4040 DB_HOST=localhost DB_PORT=3306 DB_USER=root DB_PASSWORD= DB_NAME=mydb
JWT_SECRET=super_secret_key_123
bash npm run dev
npm run seed => to full database npx tsc => to make build folder
API available at:
http://localhost:4040
All APIs need token in header except login , signup
Method: POST URL: http://localhost:4040/auth/signup
Headers: Content-Type: application/json
Body (raw JSON): { "name": "John Doe", "email": "john@example.com", "password": "123456" }
Success Response: Status: 201 Created { "message": "User registered successfully" }
Error: Status: 400 Bad Request (if email already used or missing fields) β 2. POST /auth/login β Login and receive JWT makefile Copy Edit Method: POST URL: http://localhost:4040/auth/login
Headers: Content-Type: application/json
Body (raw JSON): { "email": "john@example.com", "password": "123456" }
Success Response: Status: 200 OK { "token": "<JWT_TOKEN>" }
Error: Status: 401 Unauthorized (if credentials are invalid) β 3. POST /visit/create β Create a visit (requires auth) makefile Copy Edit Method: POST URL: http://localhost:4040/visit/create
Headers: Content-Type: application/json Authorization: Bearer <JWT_TOKEN>
Body (raw JSON): { "idUser": 1, "idcities": 2, "idlandmarkes": 3, "visit_date": "2025-07-29" }
Success Response: Status: 201 Created { "message": "Visit created successfully" }
Error: 401 Unauthorized (missing or invalid token) β 4. GET /city/all β List all cities makefile Copy Edit Method: GET URL: http://localhost:4040/city/all
No headers or auth required.
Success Response: Status: 200 OK [ { "idcities": 1, "name": "Cairo" }, { "idcities": 2, "name": "Luxor" } ] β 5. GET /visit/all β List all visits yaml Copy Edit Method: GET URL: http://localhost:4040/visit/all
No headers or auth required.
Success Response: Status: 200 OK [ { "idUser": 1, "idcities": 2, "idlandmarkes": 3, "visit_date": "2025-07-29" } ] β 6. GET /auth/profile β Get current user's profile makefile Copy Edit Method: GET URL: http://localhost:4040/auth/profile
Headers: Authorization: Bearer <JWT_TOKEN>
Success Response: Status: 200 OK { "idUser": 1, "name": "John Doe", "email": "john@example.com", "role": "user" }
Error: 401 Unauthorized (missing or invalid token) β 7. GET /landmarks/:id β Get landmarks for a specific city makefile Copy Edit Method: GET URL: http://localhost:4040/landmarks/1
No headers or auth required.
Success Response: Status: 200 OK [ { "idlandmarkes": 1, "name": "Pyramids", "description": "Famous pyramids of Giza" } ] β 8. GET /landmark/all β List all landmarks makefile Copy Edit Method: GET URL: http://localhost:4040/landmark/all
No headers or auth required.
Success Response: Status: 200 OK [ { "idlandmarkes": 1, "name": "Pyramids", "description": "Famous pyramids" } ] β 9. POST /landmark/create β Add a new landmark (admin only) makefile Copy Edit Method: POST URL: http://localhost:4040/landmark/create
Headers: Content-Type: application/json Authorization: Bearer <ADMIN_JWT_TOKEN>
Body (raw JSON): { "name": "Abu Simbel", "description": "Ancient temple", "idcities": 2 }
Success Response: Status: 201 Created { "message": "Landmark created successfully" }
Error: 403 Forbidden (if not admin) β 10. POST /city/create β Add a new city (admin only) makefile Copy Edit Method: POST URL: http://localhost:4040/city/create
Headers: Content-Type: application/json Authorization: Bearer <ADMIN_JWT_TOKEN>
Body (raw JSON): { "name": "Aswan" }
Success Response: Status: 201 Created { "message": "City created successfully" }
Error: 403 Forbidden (if not admin) β 11. POST /AI/detect β Upload image to detect landmark makefile Copy Edit Method: POST URL: http://localhost:4040/AI/detect
Headers: Content-Type: multipart/form-data
Body (form-data): Key: image | Type: File | Value: Choose image file
Success Response: Status: 200 OK { "name": "Pyramids", "description": "Ancient Egyptian pyramids", "image": "" }
Error: 400 Bad Request (if image is missing) β 12. POST /AI/chat β Ask question about landmarks makefile Copy Edit Method: POST URL: http://localhost:4040/AI/chat
Headers: Content-Type: application/json
Body (raw JSON): { "question": "Where are the pyramids located?" }
Success Response: Status: 200 OK { "answer": "The pyramids are located in Giza, Egypt." }
This component answers user questions about Egyptian tourism using local LLMs and a FAISS vector store.
json POST /chat { "question": "What are the best places to visit in Aswan?" }
json { "answer": "Some top places in Aswan include Philae Temple, the Unfinished Obelisk, and the Nubian Museum.", "response_time_sec": 1.23 }
bash python chatbot_server.py
App runs at:
http://localhost:1234
This module detects Egyptian landmarks in photos using a trained YOLOv8 model and returns details about the site.
bash
curl -X POST http://127.0.0.1:5000/detect
-F image=@path_to_image.jpg
json { "landmark": "Karnak_Temple", "description": "The Karnak Temple Complex is a vast mix of decayed temples near Luxor.", "image": "base64_encoded_image_string" }
bash pip install flask opencv-python numpy ultralytics
bash python detection_server.py
Server runs at:
http://127.0.0.1:5000/detect
For support or questions:
Wessam β [wessamelden7@gmail.com]
Dart
53.6%
JavaScript
14.4%
TypeScript
10.5%
Python
8.9%
C++
7.0%
CMake
3.8%
HTML
1.2%
Maporia is a smart mobile application focused on domestic tourism in Egypt. It helps users explore Egyptian governorates, discover historical and cultural attractions, and interact with intelligent tools such as an AI chatbot and a landmark scanner.
After cloning or downloading the project, open a terminal in the project directory and run:
bash flutter pub get
bash flutter run
Clone the backend folder and navigate to it:
bash cd backend npm install
Create a .env file with the following:
env PORT=4040 DB_HOST=localhost DB_PORT=3306 DB_USER=root DB_PASSWORD= DB_NAME=mydb
JWT_SECRET=super_secret_key_123
bash npm run dev
npm run seed => to full database npx tsc => to make build folder
API available at:
http://localhost:4040
All APIs need token in header except login , signup
Method: POST URL: http://localhost:4040/auth/signup
Headers: Content-Type: application/json
Body (raw JSON): { "name": "John Doe", "email": "john@example.com", "password": "123456" }
Success Response: Status: 201 Created { "message": "User registered successfully" }
Error: Status: 400 Bad Request (if email already used or missing fields) β 2. POST /auth/login β Login and receive JWT makefile Copy Edit Method: POST URL: http://localhost:4040/auth/login
Headers: Content-Type: application/json
Body (raw JSON): { "email": "john@example.com", "password": "123456" }
Success Response: Status: 200 OK { "token": "<JWT_TOKEN>" }
Error: Status: 401 Unauthorized (if credentials are invalid) β 3. POST /visit/create β Create a visit (requires auth) makefile Copy Edit Method: POST URL: http://localhost:4040/visit/create
Headers: Content-Type: application/json Authorization: Bearer <JWT_TOKEN>
Body (raw JSON): { "idUser": 1, "idcities": 2, "idlandmarkes": 3, "visit_date": "2025-07-29" }
Success Response: Status: 201 Created { "message": "Visit created successfully" }
Error: 401 Unauthorized (missing or invalid token) β 4. GET /city/all β List all cities makefile Copy Edit Method: GET URL: http://localhost:4040/city/all
No headers or auth required.
Success Response: Status: 200 OK [ { "idcities": 1, "name": "Cairo" }, { "idcities": 2, "name": "Luxor" } ] β 5. GET /visit/all β List all visits yaml Copy Edit Method: GET URL: http://localhost:4040/visit/all
No headers or auth required.
Success Response: Status: 200 OK [ { "idUser": 1, "idcities": 2, "idlandmarkes": 3, "visit_date": "2025-07-29" } ] β 6. GET /auth/profile β Get current user's profile makefile Copy Edit Method: GET URL: http://localhost:4040/auth/profile
Headers: Authorization: Bearer <JWT_TOKEN>
Success Response: Status: 200 OK { "idUser": 1, "name": "John Doe", "email": "john@example.com", "role": "user" }
Error: 401 Unauthorized (missing or invalid token) β 7. GET /landmarks/:id β Get landmarks for a specific city makefile Copy Edit Method: GET URL: http://localhost:4040/landmarks/1
No headers or auth required.
Success Response: Status: 200 OK [ { "idlandmarkes": 1, "name": "Pyramids", "description": "Famous pyramids of Giza" } ] β 8. GET /landmark/all β List all landmarks makefile Copy Edit Method: GET URL: http://localhost:4040/landmark/all
No headers or auth required.
Success Response: Status: 200 OK [ { "idlandmarkes": 1, "name": "Pyramids", "description": "Famous pyramids" } ] β 9. POST /landmark/create β Add a new landmark (admin only) makefile Copy Edit Method: POST URL: http://localhost:4040/landmark/create
Headers: Content-Type: application/json Authorization: Bearer <ADMIN_JWT_TOKEN>
Body (raw JSON): { "name": "Abu Simbel", "description": "Ancient temple", "idcities": 2 }
Success Response: Status: 201 Created { "message": "Landmark created successfully" }
Error: 403 Forbidden (if not admin) β 10. POST /city/create β Add a new city (admin only) makefile Copy Edit Method: POST URL: http://localhost:4040/city/create
Headers: Content-Type: application/json Authorization: Bearer <ADMIN_JWT_TOKEN>
Body (raw JSON): { "name": "Aswan" }
Success Response: Status: 201 Created { "message": "City created successfully" }
Error: 403 Forbidden (if not admin) β 11. POST /AI/detect β Upload image to detect landmark makefile Copy Edit Method: POST URL: http://localhost:4040/AI/detect
Headers: Content-Type: multipart/form-data
Body (form-data): Key: image | Type: File | Value: Choose image file
Success Response: Status: 200 OK { "name": "Pyramids", "description": "Ancient Egyptian pyramids", "image": "" }
Error: 400 Bad Request (if image is missing) β 12. POST /AI/chat β Ask question about landmarks makefile Copy Edit Method: POST URL: http://localhost:4040/AI/chat
Headers: Content-Type: application/json
Body (raw JSON): { "question": "Where are the pyramids located?" }
Success Response: Status: 200 OK { "answer": "The pyramids are located in Giza, Egypt." }
This component answers user questions about Egyptian tourism using local LLMs and a FAISS vector store.
json POST /chat { "question": "What are the best places to visit in Aswan?" }
json { "answer": "Some top places in Aswan include Philae Temple, the Unfinished Obelisk, and the Nubian Museum.", "response_time_sec": 1.23 }
bash python chatbot_server.py
App runs at:
http://localhost:1234
This module detects Egyptian landmarks in photos using a trained YOLOv8 model and returns details about the site.
bash
curl -X POST http://127.0.0.1:5000/detect
-F image=@path_to_image.jpg
json { "landmark": "Karnak_Temple", "description": "The Karnak Temple Complex is a vast mix of decayed temples near Luxor.", "image": "base64_encoded_image_string" }
bash pip install flask opencv-python numpy ultralytics
bash python detection_server.py
Server runs at:
http://127.0.0.1:5000/detect
For support or questions:
Wessam β [wessamelden7@gmail.com]
Dart
53.6%
JavaScript
14.4%
TypeScript
10.5%
Python
8.9%
C++
7.0%
CMake
3.8%
HTML
1.2%