This API can be use to all developers to get location details of Sri Lanka 🇱🇰 including major cities, sub areas, districts and Provinces. ⛳️

Overview

Location Data API - Sri Lanka

MIT License Forks Stargazers

System Diagram

Table of Contents
  1. Introduction
  2. Technologies
  3. Use Cases
  4. Getting Started
  5. Project Setup
  6. Contributing
  7. Acknowledgements

Introduction

Developers can use this API to get datails of cities, districts and provinces which located all around the Sri Lanka. This API can easily intergarte to you appication using particular URI.

Technologies

Implemantations

  • MongoDB
  • NodeJS

Hosting

  • Heroku
  • DigitalOcean

Use Cases

  • Developers can get major cities and sub areas in each district
  • GPS cordinates (Latitude and Longitude) are avilabe for each major city and sub areas. GPS cordinates can be use with Google Maps and other GPS/ Map services
  • Developers can easily get Administrative Districts of the Colombo Mucipal Council with GPS cordinates, Administrative Distict Name and Sub Area (Known name like Kollupitiya, Modara, etc.)
  • Users can get all the disticts and provinces in Sri Lanka

Getting Started

API Documentation

1. Get Major Cities And Sub Areas in Sri Lanka

   https://locatesrilanka.herokuapp.com/cities 

2. Get All Provinces in Sri Lanka

   https://locatesrilanka.herokuapp.com/provinces

3. Get All Districts in Sri Lanka

   https://locatesrilanka.herokuapp.com/districts

4. Get GPS Cordinates of major city or sub area in Sri Lanka

   https://locatesrilanka.herokuapp.com/cities/cordinates/[CITY NAME IN ENGLISH]
Example

Assume user needs to find GPS cordinates of Kadduwela, Sri Lanka

   https://locatesrilanka.herokuapp.com/cities/cordinates/Kaduwela

5. Get all major cities or sub areas in selected distict Sri Lanka

   https://locatesrilanka.herokuapp.com/cities/cordinates/[DISTRICT ID]
Example

Assume user needs to find GPS cordinates of Colombo District, Sri Lanka

   https://locatesrilanka.herokuapp.com/cities/byDistrict/5

6. Get Administrative Districts of the Colombo Mucipal Council, Sri Lanka

   https://locatesrilanka.herokuapp.com/cities/colombo_mca/[COLOMBO SUB AREA]
Example

Assume user needs to find details of Colombo 1, Sri Lanka

   https://locatesrilanka.herokuapp.com/cities/colombo_mca/1

7. Get all Administrative Districts of the Colombo Mucipal Council, Sri Lanka

   https://locatesrilanka.herokuapp.com/cities/colombo_mca

8. Get all Districts in Selected Province

   https://locatesrilanka.herokuapp.com/districts/byprovince/[PROVINCE ID]
Example

Assume user needs to find districts in western province, Sri Lanka

   https://locatesrilanka.herokuapp.com/districts/byprovince/1

9. Get count of all Districts in Selected Province

   https://locatesrilanka.herokuapp.com/districts/districtcount/[PROVINCE ID]
Example

Assume user needs to find count of districts in western province, Sri Lanka

   https://locatesrilanka.herokuapp.com/districts/districtcount/1

Project Setup

  1. Clone the repo
    git clone https://github.com/PasinduS96/location-api-sl.git
  2. Install NPM packages
    npm install
  3. Create .env file for environment varialbes
  4. Create environment variables
    PORT=
    MONGO_URI=
  5. Run Project
    npm start

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Acknowledgements

License

MIT © PasinduS96

You might also like...

A Gmail Clone which built with ReactJS and Redux. You can sign in with your Google Account, compose a new e-mail and send realtime emails to the project.

Gmail Clone with ReactJS A Gmail Clone that you can sign in with your Google Account, compose a new e-mail and send realtime emails to the project. Cl

Nov 14, 2022

All aboard the Hacker Zephyr: a cross-country hackathon on a train!

All aboard the Hacker Zephyr: a cross-country hackathon on a train!

Hacker Zephyr Site Created using Theme UI & Next.js. Based on Hack Club Theme Starter. Usage Import this repo to your coding environment of choice. Do

Sep 25, 2022

An easy-to-use multi SQL dialect ORM tool for Node.js

Sequelize Sequelize is a promise-based Node.js ORM tool for Postgres, MySQL, MariaDB, SQLite and Microsoft SQL Server. It features solid transaction s

Jan 4, 2023

Workshop to illustrate how to use GraphQL

Workshop to illustrate how to use GraphQL

🎓 Netflix Clone using Astra DB and GraphQL 50 minutes, Intermediate, Start Building A simple ReactJS Netflix homepage clone running on Astra DB that

Jan 4, 2023

A proposal to add modern, easy to use binary encoders to the web platform.

proposal-binary-encoding A proposal to add modern, easy to use binary encoders to the web platform. This is proposed as an addition to the HTML spec,

Nov 27, 2022

Illustration of issues around use of top-level await in Vite apps

vite-top-level-await-repro Illustration of issues around use of top-level await in Vite apps: https://github.com/vitejs/vite/issues/5013 Top-level awa

Apr 25, 2022

NodeDomainScrape - Use puppeteer to catch the data from domain.com.au

nodeDomainScrape 1 install node (https://nodejs.org/en/) and download the code; 2 run npm install in the terminal; 3 go to "https://www.domain.com.au/

Jan 2, 2022

a Node.JS script to auto-import USB drives that are attached to a computer. Use it to turn your NAS into a smart photo / file importer.

File Vacuum 5000 ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ WARNING: This script is designed to manipulate files on both an external drive and another specif

Jan 10, 2022

Use Pinata (IPFS) as a simple datastore

🦄 Pinatastore A simple module to store and retrieve simple JSON data from a decentralized databse. (Pinata IPFS) Pinatastore uses a structure similar

Jan 10, 2022
Owner
Pasindu Senarathne
Full-Stack Developer 👨🏻‍💻
Pasindu Senarathne
Execute one command (or mount one Node.js middleware) and get an instant high-performance GraphQL API for your PostgreSQL database!

PostGraphile Instant lightning-fast GraphQL API backed primarily by your PostgreSQL database. Highly customisable and extensible thanks to incredibly

Graphile 11.7k Jan 4, 2023
The social network for developers. Discover creative websites and build a community.

Driwwwle The Social Network for Developers Features ⚡ Server-side rendering with Next.js ?? Cookie-based authorization with JSON web tokens ?? Infinit

Nitin Ranganath 107 Dec 26, 2022
Get started developing on Arbitrum

Arbitrum Interop Quickstart This monorepo will help you get started with building on Arbitrum. It provides various simple demos showing and explaining

Offchain Labs 202 Dec 21, 2022
Get JSON RPC on a stream

json-rpc-on-a-stream Get JSON RPC on a stream npm install json-rpc-on-a-stream

Mathias Buus 13 May 31, 2022
🌐 API and CLIENT API for FiveM to externalize database responsibilities.

?? Query API API and CLIENT API for FiveM to externalize database responsibilities. FAQ Is the project finished? Definitely NOT, this is a first versi

Thiago Neubern 2 Jul 5, 2022
A query builder for PostgreSQL, MySQL and SQLite3, designed to be flexible, portable, and fun to use.

knex.js A SQL query builder that is flexible, portable, and fun to use! A batteries-included, multi-dialect (MSSQL, MySQL, PostgreSQL, SQLite3, Oracle

knex 16.9k Jan 4, 2023
Lovefield is a relational database for web apps. Written in JavaScript, works cross-browser. Provides SQL-like APIs that are fast, safe, and easy to use.

Lovefield Lovefield is a relational database written in pure JavaScript. It provides SQL-like syntax and works cross-browser (currently supporting Chr

Google 6.8k Jan 3, 2023
⛰ "core" is the core component package of vodyani, providing easy-to-use methods and AOP implementations.

Vodyani core ⛰ "core" is the core component package of vodyani, providing easy-to-use methods and AOP implementations. Installation npm install @vodya

Vodyani 25 Oct 18, 2022
A WebAssembly build of the Tesseract OCR engine for use in the browser and Node

tesseract-wasm A WebAssembly build of the Tesseract OCR engine for use in the browser and Node. tesseract-wasm can detect and recognize text in docume

Robert Knight 80 Dec 28, 2022
Fast File is a quick and easy-to-use library to convert data sources to a variety of options.

Fast File Converter The Express.js's Fast File Converter Library Fast File Converter Library is a quick and easy-to-use library to convert data source

Ali Amjad 25 Nov 16, 2022