NizhneudinskMap
README.md
Map of Places in Nizhneudinsk
A web application for displaying locations on a map of Nizhneudinsk with cards, categories, and secure addition of new points.
What's Been Implemented
- Home page: the map and a list of places are displayed first.
- Map powered by Leaflet using OpenStreetMap.
- Hovering over a marker displays a mini-card (name + category), without an address.
- The dialog for adding a location opens only after clicking on the map.
- To add a point, you must enable edit mode and enter the password once.
- Categories and pin colors:
- select an existing category;
- create a new category with a color;
- the category color determines the pin color;
- Categories are saved in
data/categories.json.
- Photo: upload a file up to 1 MB or a link.
- The address is filled in automatically based on the coordinates.
Quick Start
- Set up dependencies:
npm install
- Start the server:
npm start
- Open the website:
http://localhost:3000
Edit mode password
Default password: nizhneudinsk
Set your password via an environment variable:
ADD_PLACE_PASSWORD="ваш_сложный_пароль" npm start
Data storage
- Points:
data/places.geojson. - Categories:
data/categories.json. - Uploaded images:
uploads/.
API
GET /api/places— a list of places.GET /api/places/:id— a single location.GET /api/categories— list of categories.POST /api/auth/login— Enter edit mode (password verification).POST /api/places— Create a location.
Preparing for Deployment (Nginx + HTTPS)
Ready-to-use materials:
- Example Nginx configuration:
deploy/nginx-example.conf - Step-by-step instructions:
deploy/DEPLOY.md - Example environment variables:
.env.example
In short:
- Deploy the application on the server and run it on
PORT=3000. - In
deploy/nginx-example.confReplace the domain inserver_name. - Configure Nginx and restart it.
- Issue the certificate:
sudo certbot --nginx -d map.example.ru -d www.map.example.ru
Specify server_name is where your domain is specified.
Releases
No releases yet.
Open issues
No open issues 🎉