{"id":14969083,"url":"https://github.com/mariadb-corporation/dev-example-places","last_synced_at":"2025-10-26T06:31:04.169Z","repository":{"id":42283318,"uuid":"252234422","full_name":"mariadb-corporation/dev-example-places","owner":"mariadb-corporation","description":"A web application (with multiple API project options) that uses MariaDB!","archived":false,"fork":false,"pushed_at":"2023-01-08T09:36:07.000Z","size":37819,"stargazers_count":10,"open_issues_count":16,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-31T16:11:50.525Z","etag":null,"topics":["mariadb","mariadb-connector","mariadb-platform","mariadb-server","mariadb-skysql","nodejs","reactjs"],"latest_commit_sha":null,"homepage":"https://mariadb.com/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mariadb-corporation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-01T16:51:49.000Z","updated_at":"2022-06-24T19:58:15.000Z","dependencies_parsed_at":"2023-02-08T05:31:14.327Z","dependency_job_id":null,"html_url":"https://github.com/mariadb-corporation/dev-example-places","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariadb-corporation%2Fdev-example-places","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariadb-corporation%2Fdev-example-places/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariadb-corporation%2Fdev-example-places/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariadb-corporation%2Fdev-example-places/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mariadb-corporation","download_url":"https://codeload.github.com/mariadb-corporation/dev-example-places/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238276041,"owners_count":19445331,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mariadb","mariadb-connector","mariadb-platform","mariadb-server","mariadb-skysql","nodejs","reactjs"],"created_at":"2024-09-24T13:41:06.352Z","updated_at":"2025-10-26T06:30:58.640Z","avatar_url":"https://github.com/mariadb-corporation.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Places\n\n⚠️⚠️⚠️ \u003cbr /\u003e\u003cbr /\u003e\n**[UNMAINTAINED]** \u003cbr /\u003e This repository has been split up (by back-end language), moved and is currently maintained at the following locations:\n* [Node.js (basic)](https://github.com/mariadb-developers/places-app-nodejs)\n* [Python (basic)](https://github.com/mariadb-developers/places-app-python)\n* [JDBC (Spring Data)](https://github.com/mariadb-developers/places-app-jdbc-spring)\n* [R2DBC (Spring Data)](https://github.com/mariadb-developers/places-app-r2dbc-spring)\n\u003cbr /\u003e\n⚠️⚠️⚠️ \n\u003cbr /\u003e\u003cbr /\u003e \n\n**Places** is a web application backed by the power of the power, performance, and simplicity of [MariaDB platform](https://mariadb.com/products/mariadb-platform/), allows you to record all of your favorite locations!\n\n\u003cp align=\"center\"\u003e\n    \u003ckbd\u003e\n        \u003cimg src=\"media/map.png\" /\u003e\n    \u003c/kbd\u003e\n\u003c/p\u003e\n\nThis README will walk you through the steps for getting the Places web application up and running using MariaDB. To ensure success, please follow the instructions in order.\n\n**Note:** The code provided within this repository is completely open source. Please feel free to use it as you see fit.\n\n# Table of Contents\n1. [Requirements](#requirements)\n2. [Getting started with MariaDB and JSON](#introduction)\n3. [Getting started with the app](#getting-started)\n    1. [Get the code](#code)\n    2. [Create the schema](#schema)\n    3. [Anatomy of the app](#app)\n    4. [Build and run the app](#build-run)\n4. [JSON Data Models](#data-models)\n5. [Support and Contribution](#support-contribution)\n6. [License](#license)\n\n## Requirements \u003ca name=\"requirements\"\u003e\u003c/a\u003e\n\nThis sample application, no matter which API project you target, will requires the following to be installed/enabled on your machine:\n\n* [MariaDB Client](https://mariadb.com/products/skysql/docs/clients/), used to connect to MariaDB instances.\n\n## Getting started with MariaDB and JSON \u003ca name=\"introduction\"\u003e\u003c/a\u003e\n\nSet up a MariaDB database, loaded with the data this sample needs, using the [MariaDB JSON Quickstart](https://github.com/mariadb-developers/mariadb-json-quickstart), before continuing to the next step.\n\n## Getting started with the app \u003ca name=\"getting-started\"\u003e\u003c/a\u003e\n\nIn order to run the Places application you will need to have a MariaDB instance to connect to. For more information please check out \"[Get Started with MariaDB](https://mariadb.com/get-started-with-mariadb/)\".\n\n### Get the code \u003ca name=\"code\"\u003e\u003c/a\u003e\n\nDownload this code directly or use [git](git-scm.org) (through CLI or a client) to retrieve the code using `git clone`:\n\n```\n$ git clone https://github.com/mariadb-corporation/dev-example-places.git\n```\n\n### Create the schema \u003ca name=\"schema\"\u003e\u003c/a\u003e\n\n[Connect to the database](https://mariadb.com/kb/en/connecting-to-mariadb/) using CLI or a client and execute the following:\n\n```sql\nCREATE TABLE `locations` (\n  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,\n  `name` varchar(100) NOT NULL DEFAULT '',\n  `description` varchar(500) DEFAULT '',\n  `type` char(1) NOT NULL DEFAULT '',\n  `latitude` decimal(9,6) NOT NULL,\n  `longitude` decimal(9,6) NOT NULL,\n  `attr` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`attr`)),\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n```\n\n### Anatomy of the app \u003ca name=\"app\"\u003e\u003c/a\u003e\n\nThis application is made of two parts:\n\n* Client\n    - communicates with the API.\n    - is a React.js project located in the [client](client) folder.\n* API\n    - uses a MariaDB Connector to connect to MariaDB.\n    - contains multiple projects, located in the [api](api) folder.\n        - [Node.js](api/nodejs)\n        - [Python](api/python)\n\nSee the README's in [client](client/README.md) and [api](api/README.md) for more information on how to get started!\n\n### Build and run the app \u003ca name=\"build-run\"\u003e\u003c/a\u003e\n\n   1. Nagivate to the [client](client) folder and execute the following CLI command before proceeding:\n\n      ```\n      $ npm install\n      ```\n\n   2. Configure the MariaDB connection by an [environmental](https://www.npmjs.com/package/dotenv) (called `.env`) file within the `client` folder.\n\n      ```\n      $ touch .env\n      ```\n\n      Then add the key `REACT_APP_GOOGLE_API_KEY` and a [Google Maps API Key](https://developers.google.com/maps/documentation/javascript/get-api-key).\n\n      ```\n      REACT_APP_GOOGLE_API_KEY=\u003cgoogle_api_key_here\u003e\n      ```\n\n      **Note:** The `REACT_APP_GOOGLE_API_KEY` environmental variable is used [here](client/src/components/MapContainer.js#L250).\n\n   3. Pick an [API](api) project and follow the instructions of the README to build and run the API project.\n\n   4. Navigate to the [client](client) folder and execute the following CLI command to start the React.js application.\n\n      ```bash \n      $ npm start\n      ``` \n\n   5. Open a browser window and navigate to http://localhost:3000.\n\n## JSON Data Models \u003ca name=\"data-models\"\u003e\u003c/a\u003e\n\nBelow are samples of the data model per Location Type. \n\n**Attraction**\n```json\n{\n   \"category\":\"Landmark\",\n   \"lastVisitDate\":\"11/5/2019\"\n}\n```\n\n**Location**\n```json\n{\n   \"details\":{\n      \"foodType\":\"Pizza\",\n      \"menu\":\"www.giodanos.com/menu\"\n   },\n   \"favorites\":[\n      {\n         \"description\":\"Classic Chicago\",\n         \"price\":24.99\n      },\n      {\n         \"description\":\"Salad\",\n         \"price\":9.99\n      }\n   ]\n}\n```\n\n**Sports Venue**\n```json\n{\n   \"details\":{\n      \"yearOpened\":1994,\n      \"capacity\":23500\n   },\n   \"events\":[\n      {\n         \"date\":\"10/18/2019\",\n         \"description\":\"Bulls vs Celtics\"\n      },\n      {\n         \"date\":\"10/21/2019\",\n         \"description\":\"Bulls vs Lakers\"\n      },\n      {\n         \"date\":\"11/5/2019\",\n         \"description\":\"Bulls vs Bucks\"\n      },\n      {\n         \"date\":\"11/5/2019\",\n         \"description\":\"Blackhawks vs Blues\"\n      }\n   ]\n}\n```\n\n## Support and Contribution \u003ca name=\"support-contribution\"\u003e\u003c/a\u003e\n\nPlease feel free to submit PR's, issues or requests to this project project or projects within the [official MariaDB Corporation GitHub organization](https://github.com/mariadb-corporation).\n\nIf you have any other questions, comments, or looking for more information on MariaDB please check out:\n\n* [MariaDB Developer Hub](https://mariadb.com/developers)\n* [MariaDB Community Slack](https://r.mariadb.com/join-community-slack)\n\nOr reach out to us diretly via:\n\n* [developers@mariadb.com](mailto:developers@mariadb.com)\n* [MariaDB Twitter](https://twitter.com/mariadb)\n\n## License \u003ca name=\"license\"\u003e\u003c/a\u003e\n[![License](https://img.shields.io/badge/License-MIT-blue.svg?style=plastic)](https://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmariadb-corporation%2Fdev-example-places","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmariadb-corporation%2Fdev-example-places","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmariadb-corporation%2Fdev-example-places/lists"}