Skip to content

anttijankeri/Salt.map

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Salt.map

image image image image image image image image image image image image image image License

Description

Mapping app for all Salties' places of birth. Allows users to add themselves and their place of birth as a pin on a Google Map. It also shows all users who have added themselves either individually or all together on the map. This repo contains both the backend and frontend for the project.

Table of Contents

Installation

Install both the backend and frontend for running locally or deploying to github pages.

git clone https://github.com/anttijankeri/Salt.map.git
cd Salt.map
cd frontend && npm install
cd ../backend && npm install

Usage

Create .env files in both folders based on the .env.examples, but replace the values with your own variables.

To run locally:

Uncomment the VITE_REACT_APP_BACKEND=http://localhost:3000 env variable in frontend/.env and comment out the other one

Open 2 terminal windows in root

Window 1:
cd frontend && npm run dev

Window 2:
cd backend && npm run dev

To deploy frontend to github pages:

cd frontend && npm run deploy

API

The app's backend is deployed on Railway.app.

The exact URL is https://saltmap-production.up.railway.app/api

The backend has several open endpoints to access data:

GET /users
Returns a JSON list of all users
Each user contains the name and the user's hash string

GET /maps
Returns a JSON list of all pins and their attached users
Each pin contains a latitude and longitude attribute, and a color

GET /maps/:id
id is a hash string generated based on the user's name
Returns a JSON object containing the one user's pin and data

License

This project is licensed under the MIT License - see the LICENSE file for details.