├── public ├── img │ ├── img6.jpg │ ├── img14.jpg │ └── img1 (2).jpg ├── images │ ├── gg.png │ ├── gg2.png │ ├── us3.png │ ├── img15.jpg │ └── picture1.jpg ├── Profile Template │ └── Profile Template.rar ├── css │ ├── Home.css │ ├── sign.css │ ├── login.css │ ├── profilr.css │ ├── pic (1).css │ └── style.css ├── assets │ └── vendor │ │ ├── bootstrap-icons │ │ └── fonts │ │ │ ├── bootstrap-icons.woff │ │ │ └── bootstrap-icons.woff2 │ │ ├── bootstrap │ │ └── css │ │ │ ├── bootstrap-reboot.min.css │ │ │ ├── bootstrap-reboot.rtl.min.css │ │ │ ├── bootstrap-reboot.rtl.css │ │ │ └── bootstrap-reboot.css │ │ └── swiper │ │ └── swiper-bundle.min.css ├── js │ ├── user_log_session.js │ ├── fogetPass.js │ ├── feedback.js │ ├── login.js │ ├── signup.js │ ├── main.js │ └── backend_map.js ├── style1.css ├── foget.html ├── login.html ├── sign.html ├── style.css ├── pic (1).html ├── profile.html └── index.html ├── Read me first.txt ├── backend ├── Ballerina.toml ├── target │ ├── build │ └── cache │ │ └── niranga_nayanajith │ │ └── backend │ │ └── 0.1.0 │ │ └── java17 │ │ └── niranga_nayanajith-backend-0.1.0.jar ├── Dependencies.toml └── main.bal ├── .github └── workflows │ ├── npm-publish-github-packages.yml │ └── datadog-synthetics.yml └── README.md /public/img/img6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nngeek195/Ballerina-ToWo-Tech/HEAD/public/img/img6.jpg -------------------------------------------------------------------------------- /public/images/gg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nngeek195/Ballerina-ToWo-Tech/HEAD/public/images/gg.png -------------------------------------------------------------------------------- /public/images/gg2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nngeek195/Ballerina-ToWo-Tech/HEAD/public/images/gg2.png -------------------------------------------------------------------------------- /public/images/us3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nngeek195/Ballerina-ToWo-Tech/HEAD/public/images/us3.png -------------------------------------------------------------------------------- /public/img/img14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nngeek195/Ballerina-ToWo-Tech/HEAD/public/img/img14.jpg -------------------------------------------------------------------------------- /public/images/img15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nngeek195/Ballerina-ToWo-Tech/HEAD/public/images/img15.jpg -------------------------------------------------------------------------------- /public/img/img1 (2).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nngeek195/Ballerina-ToWo-Tech/HEAD/public/img/img1 (2).jpg -------------------------------------------------------------------------------- /public/images/picture1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nngeek195/Ballerina-ToWo-Tech/HEAD/public/images/picture1.jpg -------------------------------------------------------------------------------- /Read me first.txt: -------------------------------------------------------------------------------- 1 | if you are not running backend please use follow to log as a super admin 2 | 3 | 4 | user-name= admin 5 | password= admin -------------------------------------------------------------------------------- /public/Profile Template/Profile Template.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nngeek195/Ballerina-ToWo-Tech/HEAD/public/Profile Template/Profile Template.rar -------------------------------------------------------------------------------- /public/css/Home.css: -------------------------------------------------------------------------------- 1 | .footer { 2 | margin-top: 45px; 3 | margin: 0; 4 | padding: 90px; 5 | width: 120%; 6 | background: #ff0000; 7 | 8 | } -------------------------------------------------------------------------------- /public/assets/vendor/bootstrap-icons/fonts/bootstrap-icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nngeek195/Ballerina-ToWo-Tech/HEAD/public/assets/vendor/bootstrap-icons/fonts/bootstrap-icons.woff -------------------------------------------------------------------------------- /public/assets/vendor/bootstrap-icons/fonts/bootstrap-icons.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nngeek195/Ballerina-ToWo-Tech/HEAD/public/assets/vendor/bootstrap-icons/fonts/bootstrap-icons.woff2 -------------------------------------------------------------------------------- /backend/Ballerina.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | org = "niranga_nayanajith" 3 | name = "backend" 4 | version = "0.1.0" 5 | distribution = "2201.10.0" 6 | 7 | [build-options] 8 | observabilityIncluded = true 9 | -------------------------------------------------------------------------------- /backend/target/build: -------------------------------------------------------------------------------- 1 | { 2 | "last_build_time": 1728983844833, 3 | "last_update_time": 1728918475936, 4 | "distribution_version": "2201.10.0", 5 | "last_modified_time": { 6 | "backend": 1728828749683 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /backend/target/cache/niranga_nayanajith/backend/0.1.0/java17/niranga_nayanajith-backend-0.1.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nngeek195/Ballerina-ToWo-Tech/HEAD/backend/target/cache/niranga_nayanajith/backend/0.1.0/java17/niranga_nayanajith-backend-0.1.0.jar -------------------------------------------------------------------------------- /public/js/user_log_session.js: -------------------------------------------------------------------------------- 1 | 2 | window.addEventListener('load', () => { 3 | const loggedInUser = localStorage.getItem('loggedInUser'); // Get the logged-in user's username 4 | const loggedInEmail = localStorage.getItem('loggedInEmail'); 5 | if (loggedInUser) { 6 | // If the user is logged in, display their username 7 | document.getElementById('username').innerText = loggedInUser; // Replace username placeholder with actual username 8 | document.getElementById('email').innerText = loggedInEmail; // Replace email placeholder with actual email address 9 | } else { 10 | // If no user is logged in, redirect to the signup page 11 | window.location.href = 'sign.html'; // Redirect to registration page if user is not logged in 12 | } 13 | }); 14 | function logout(){ 15 | 16 | localStorage.removeItem('loggedInUser'); // Clear the logged-in user data 17 | window.location.href = 'index.html'; // Redirect to the login page 18 | }; 19 | 20 | -------------------------------------------------------------------------------- /.github/workflows/npm-publish-github-packages.yml: -------------------------------------------------------------------------------- 1 | # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created 2 | # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages 3 | 4 | name: Node.js Package 5 | 6 | on: 7 | release: 8 | types: [created] 9 | 10 | jobs: 11 | build: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v4 15 | - uses: actions/setup-node@v4 16 | with: 17 | node-version: 20 18 | - run: npm ci 19 | - run: npm test 20 | 21 | publish-gpr: 22 | needs: build 23 | runs-on: ubuntu-latest 24 | permissions: 25 | contents: read 26 | packages: write 27 | steps: 28 | - uses: actions/checkout@v4 29 | - uses: actions/setup-node@v4 30 | with: 31 | node-version: 20 32 | registry-url: https://npm.pkg.github.com/ 33 | - run: npm ci 34 | - run: npm publish 35 | env: 36 | NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} 37 | -------------------------------------------------------------------------------- /public/style1.css: -------------------------------------------------------------------------------- 1 | 2 | @import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap'); 3 | body,html{ 4 | height: 100%; 5 | margin: 0; 6 | font-family: 'poppins',sans-serif; 7 | } 8 | .background{ 9 | 10 | background-size: cover; 11 | background-position: center; 12 | height: 50%; 13 | display: flex; 14 | align-items: center; 15 | justify-content: center; 16 | } 17 | .booking-form{ 18 | background-color: rgba(255,255,255,0.7); 19 | padding: 20px; 20 | border-radius: 10px; 21 | max-width: 500px; 22 | width: 80%; 23 | margin: 0 auto; 24 | } 25 | .booking-form h2{ 26 | text-align: center; 27 | } 28 | .booking-form form{ 29 | display: flex; 30 | flex-direction: column; 31 | } 32 | .booking-form input{ 33 | padding: 8px; 34 | border: 1px solid #ccc; 35 | border-radius: 5px; 36 | } 37 | .booking-form button{ 38 | margin-top:10px; 39 | padding: 10px; 40 | background-color: #4CAF50; 41 | color: white; 42 | border: none; 43 | border-radius: 5px; 44 | cursor: pointer; 45 | } 46 | .booking-form button:hover{ 47 | background-color: #45a049; 48 | } -------------------------------------------------------------------------------- /public/js/fogetPass.js: -------------------------------------------------------------------------------- 1 | 2 | const apiUrl = 'http://localhost:9095/api'; 3 | 4 | // Handle foget password 5 | document.getElementById('foget').addEventListener('click', async (event) => { 6 | event.preventDefault(); // Prevent the form from submitting the traditional way 7 | 8 | const username = document.getElementById('username').value; 9 | const email = document.getElementById('email').value; 10 | 11 | // Display "Please wait" message while processing 12 | document.getElementById('msg_result').textContent = 'Your request is sending...'; 13 | 14 | try { 15 | // Make a POST request 16 | await axios.post(`${apiUrl}/foget`, { username,email }); 17 | 18 | // On success, display a welcome message and redirect to the login page 19 | document.getElementById('msg_result').textContent = 'Your request accepted!'; 20 | // Redirect to the login page after 3 seconds 21 | setTimeout(() => { 22 | document.getElementById('msg_result').textContent = 'Check your mail box'; 23 | }, 3000); 24 | 25 | } catch (error) { 26 | // Handle email sending failure or other errors 27 | document.getElementById('msg_result').textContent = `Check your username and Email`; 28 | } 29 | }); 30 | 31 | 32 | -------------------------------------------------------------------------------- /public/js/feedback.js: -------------------------------------------------------------------------------- 1 | 2 | const apiUrl = 'http://localhost:9094/api'; 3 | 4 | // Handle user feedback events 5 | document.getElementById('send_msg').addEventListener('click', async (event) => { 6 | event.preventDefault(); // Prevent the form from submitting the traditional way 7 | 8 | const username = localStorage.getItem('loggedInUser'); 9 | const msg = document.getElementById('msg').value; 10 | const email = localStorage.getItem('loggedInEmail'); 11 | 12 | // Display "Please wait" message while processing 13 | document.getElementById('msg_result').textContent = 'Your massage is sending...'; 14 | 15 | try { 16 | // Make a POST request 17 | await axios.post(`${apiUrl}/msg`, { username,email,msg }); 18 | 19 | // display a message 20 | document.getElementById('msg_result').textContent = 'Your massage sent successfully'; 21 | // Redirect to the login page after 3 seconds 22 | setTimeout(() => { 23 | document.getElementById('msg_result').textContent = 'Thank you'; 24 | }, 3000); 25 | 26 | } catch (error) { 27 | // Handle email sending failure 28 | document.getElementById('msg_result').textContent = `Fail to send, please try again`; 29 | } 30 | }); 31 | 32 | 33 | 34 | function cancel(){ 35 | window.location.href = "pic (1).html"; // Redirect to home page on cancel button click. 36 | } 37 | 38 | -------------------------------------------------------------------------------- /public/foget.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 |
90 |
91 |
108 |
109 | No nearby cities found.
"; 107 | } 108 | } catch (error) { 109 | console.error("Error fetching cities:", error); 110 | } 111 | } 112 | //check the shops in my nearest two cities 113 | async function fetchShopsForCities(cities) { 114 | let output = ''; 115 | 116 | // Get the user's current position for distance calculation 117 | navigator.geolocation.getCurrentPosition(async function (position) { 118 | const userLocation = { 119 | lat: position.coords.latitude, 120 | lng: position.coords.longitude 121 | }; 122 | 123 | allShops = []; // Reset the global shop array 124 | for (const city of cities) { 125 | try { 126 | const response = await axios.get(`http://localhost:9091/api/shops/${city}`); 127 | const shops = response.data; 128 | 129 | if (shops.length === 0) { 130 | output += `No shops found for ${city}.
`; 131 | } else { 132 | output += `${shop.city}
147 |WhatsApp: Connect
148 |Local:Call Now
149 |Distance: ${distance.toFixed(2)} km
150 |Navigate Me:Navigate Me
151 |Error fetching shops for ${city}.
`; 187 | } 188 | } 189 | 190 | document.getElementById('shops').innerHTML = output; 191 | }); 192 | } 193 | 194 | 195 | //search function. 196 | async function getAllShops() { 197 | try { 198 | const response = await fetch("http://localhost:9091/api/shops"); 199 | const shops = await response.json(); 200 | return shops; 201 | } catch (error) { 202 | console.error("Error fetching shops:", error); 203 | return []; 204 | } 205 | 206 | } 207 | 208 | // Async function to fetch shops for a specific city 209 | async function fetchShops() { 210 | const city = document.getElementById('city').value; 211 | clearMarkers(); 212 | 213 | 214 | try { 215 | const response = await axios.get(`http://localhost:9091/api/shops/${city}`); 216 | const shops = response.data; 217 | 218 | if (shops.length === 0) { 219 | document.getElementById('shops').innerHTML = "No shops found for this city.
"; 220 | return; 221 | } 222 | 223 | allShops = shops; // Store the fetched shops for filtering 224 | 225 | let output = ''; 226 | shops.forEach(shop => { 227 | const shopLatLng = { lat: shop.latitude, lng: shop.longitude }; // Corrected spelling 228 | const googleMapsLink = `https://maps.google.com/?q=${shop.latitude},${shop.longitude}`; 229 | output += ` 230 |${shop.city}
233 |WhatsApp: Connect
234 |Local:Call Now
235 |Navigate Me:Navigate Me
236 |${shop.city}
330 |WhatsApp: Connect
331 |Local: Call Now
332 |Navigate Me: Navigate Me
333 |
95 | 104 | At TowO Tech, we are more than just a 105 | garage—we’re 106 | a team of passionate automotive experts 107 | dedicated to keeping you and 108 | your vehicle on the road safely and efficiently. 109 | With years of experience 110 | in the industry, we offer a full range of 111 | services, from towing and roadside 112 | assistance to comprehensive repairs and 113 | maintenance. Our mission is simple: 114 | to provide reliable, high-quality service with a 115 | personal touch, ensuring 116 | every vehicle we work on leaves in top 117 | condition. Whether it's a minor 118 | repair or an urgent breakdown, our skilled 119 | technicians use the latest technology and 120 | techniques to get the job done right. At TowO 121 | Tech, your satisfaction and safety are our top 122 | priorities. 123 | 124 |
I work in both back-end and front-end 166 | development, but my main focus is on 167 | building efficient back-end systems that 168 | integrate well with the front end. I aim 169 | to ensure that the entire application 170 | runs smoothly for a great user 171 | experience. I always try understand the 172 | full stack and it helps me collaborate 173 | easily 174 | with 175 | designers and front-end developers to 176 | create user-friendly applications. 177 | 178 |
profile on 182 | LinkedIn 187 |UI/UX Designer & Front-End Developer 207 | I specialize in creating intuitive user 208 | interfaces and developing responsive, 209 | user-centered designs. 210 | With a passion for both design and 211 | functionality, I bridge the 212 | gap between aesthetics and technology, 213 | ensuring a seamless user experience across 214 | all platforms.
215 | 224 |I work on both front-end and back-end 244 | development 245 | to create user-friendly and efficient web 246 | applications. 247 | I design clean, responsive interfaces while 248 | ensuring smooth 249 | functionality behind the scenes. My focus is 250 | on delivering websites 251 | that not only look good but also perform 252 | well across various devices and platforms. 253 |
254 | 263 |I am an IT undergraduate passionate about 283 | programming, innovation, 284 | and emerging technologies. I thrive on 285 | solving challenges, continuously learning, 286 | and applying creative solutions to 287 | real-world problems through code and 288 | technology.
289 | 298 |