ManSangSin / Rhythm-Code

https://starter-kit-al84.onrender.com/
ISC License
3 stars 7 forks source link

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

Rhythm Code

A Joint project with Deirdre Malloy to showcase the origins of rhythms and the African Atlantic Diaspora
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

Product Name Screen Shot We are building a unique and interactive multimedia map website that serves as a visual representation of the diverse and complex rhythms originating from various geographical locations. This innovative website aims to cater to both curious listeners and experienced rhythm enthusiasts by providing a user-friendly platform to explore, interact with, and learn about the various rhythms from around the world.

To ensure the website's technical functionality, we will employ the following technologies:

Frontend: React for building a dynamic and responsive user interface. Backend: Node.js and Express for implementing a robust and efficient server-side framework. Database: PostgreSQL for securely storing and managing the website's data. Hosting: Render for seamlessly deploying and hosting the website on the cloud.

By leveraging these cutting-edge technologies, the Our Rhythms team will be able to create a captivating and engaging online experience that caters to the specific needs and interests of rhythm aficionados worldwide. Users will be able to interact with the website in a variety of ways, such as:

Exploring an interactive multimedia map that visualizes the origins of different rhythms. Clicking on markers/pins on the map to view a list of related rhythms. Clicking on individual rhythms to access a modal that displays relevant media content and additional information. With a responsive design that works seamlessly on both mobile and desktop layouts, the Our Rhythms website will cater to a diverse audience and ensure an optimal user experience, regardless of the device or platform being used.

By harnessing the power of the internet and the wealth of knowledge available online, the Our Rhythms team aims to create a truly revolutionary website that serves as a dynamic and comprehensive platform for exploring, learning about, and appreciating the diverse and fascinating world of rhythms

(back to top)

Built With

(back to top)

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

The following list of things are required to use the software:

Installation

  1. Clone the repo
    git clone https://github.com/ManSangSin/Rhythm-Code.git
  2. Install NPM packages
    npm install
  3. Create .env at the root of repo
  4. Enter database url in .env
DB_URL = "postgres://postgres:opensesame@localhost:5432/cyf"
  1. You are ready to run the project locally

Running the project locally

To Start:

  1. Start Docker Desktop (or Docker Engine)
  2. Run npm startup script
   npm run dev
  1. Open your browser and go to localhost
  http://localhost:3000/

To Stop:

  1. Send SIGINT signal
  ctrl + c
  1. Run npm shutdown script for Docker (Docker needs to be stopped seperately)
  npm run docker:stop

(back to top)

Usage

The seed file, "build-rhythms.sql", will contain the data necessary to populate the PostgreSQL database with information on each rhythm code. The data will be stored in a table named "rhythms" with columns for id, title, url, and location.

To deploy the local SQL database, we will use a standalone Docker container. Docker Desktop will be required to run the Docker container.

To add a new marker location to the map, the x and y data for the desired location must be obtained. This data is relative to the SVG map plane and will be used to plot the new marker.

The process of finding the id of a specific dot on the map will involve inspecting the website's source code using the browser's developer tools. The id is then used to populate the "map_id" field in the rhythm_codes table. The following set of instructions will walk you through the process.

Adding a new marker location to the map:

  1. The markers are plotted inside a svg therefore the x and y data required to plot the markers needs to be relative to the svg map plane
  2. Each dot on the map is an individual element and holds its own x and y data which is relative to the map (and also holds other data such as id)
  3. We will use this data to plot the new marker
  4. A query selector is used with the id to get the data of the specific dot we want our marker to be placed on, which is then parsed using a regex to retrieve the relevent data (x and y)
  5. This is already setup provided a map_id (id of the dot) is stated.

Finding id of specific dot:

  1. Open the website homepage and use inspect on your chosen browser
  2. Use the select element tool and click over the map area
  3. A transparent overlay will be selected called "foreignObject" (the layer which the markers are placed on)
  4. This needs to be removed so that the dots under the transparent layer can be selected
  5. To remove the layer, right clicking on the elements panel and select "delete element"
  6. This is not permenant and the overlay will be reloaded when the page is refreshed
  7. Use the select element tool again and now select the dot which you wish to place the new marker on
  8. This will show the dot details including the id

Adding id to database:

  1. The id is used inside the rhythm_codes table
  2. when adding a new row of data, map_id will be set to the id of the dot we want

(back to top)

Roadmap

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

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

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  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

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Project Link: https://github.com/ManSangSin/Rhythm-Code

(back to top)

Acknowledgments

(back to top)