The Atenean Freedom Map is an interactive web application that allows users to explore a map, add pins with messages, and view or moderate user-submitted content.
🗺️ Try it out here: Atenean Freedom Map 🗺️
- Frontend: HTML, CSS, JavaScript, D3.js
- Backend: Node.js, Express.js
- Database: MongoDB
- Interactive Map: Users can pan and zoom the map to explore different areas.
- Add Pins: Users can add pins to the map with custom messages.
- Speech Bubbles: Hovering over a pin displays its message in a speech bubble.
- Moderation: Admins can review, approve, or delete user-submitted pins.
- Responsive Design: The application is designed for both desktop and mobile devices.
-
Install Node.js on your local machine.
-
Clone the repository:
git clone https://github.com/UXSoc/admu-freedom-map
-
Install dependencies:
npm install
-
Create a
.env
file by duplicatingenv.template
. Edit the.env
file according to your MongoDB credentials:MONGODB_USER=<your-mongodb-username> MONGODB_PASS=<your-mongodb-password>
-
Start the server locally:
npm start
-
Open your browser and navigate to
http://localhost:3000
.
Moderators can access the admin page by adding /admin
to the website's url. Then, a login view will be prompted, where a username and password is needed to access the admin view.
Moderators can:
- Accept or Reject posted pin messages.
- Delete already-posted pins.
Ask UX Society's Engineering Department for the admin user credentials to access the admin view.
The current implementation of the user authentication system for the admin page uses bcrypt, a library that helps in hashing passwords. This means that the MongoDB database contains only hashed passwords of the admin users.
Only follow the steps below if the current project members wish to add more admin users. Ask the past project members if the existing admin user credentials is forgotten.
To add a new admin user:
-
Have access to the MongoDB connection string. Ask past developers for this.
-
Connect to the MongoDB database (commonly through MongoDB Compass).
-
Add a new document under the admins collection, under test database.
3.1. Copy the format of the existing document.
-
You shall be seeing that the existing password for the existing admin credential is hashed. To hash your preferred password, use this website. Use 12 rounds of hashing.
-
After adding a new document, you can now login to ther admin page with your new admin credentials.