A Literary map of the world. Go to any marker (location) in the world and see which books are written about the place.
Follow these steps to set up LitMap locally:
-
Clone the Repository
git clone https://github.com/ram-n/LitMap.git cd LitMap -
Install Dependencies
- If using a
requirements.txt, run:pip install -r requirements.txt
- For frontend dependencies, ensure theyβre installed as needed.
- If using a
-
Run the Project Locally
- If youβre using Firebase Hosting or another server, follow those instructions here.
-
Open the App
- Open
index.htmlin your browser to start exploring the map and functionality.
- Open
LitMap/
β
βββ public/
β βββ index.html
β βββ styles/
β β βββ style.css
β βββ scripts/
β β βββ app.js
β β βββ firebase.js
β β βββ map.js
β βββ assets/
β
βββ firebase.json
βββ README.md
index.html: Your main HTML file that will load the map and interface for adding books. This is the root file that users will access.
-
styles/: CSS Files
-
scripts/:
- app.js: Central JavaScript file for app logic. This will include UI interactions (handling form submissions, connecting Google Maps and Firebase).
- firebase.js: Contains the Firebase configuration and initialization code. This is where you'll paste your Firebase config (from earlier).
- map.js: Handles Google Maps logic, such as loading the map, adding markers, and interacting with map elements.
-
assets/: Place any images or icons your app might need here (like a logo, custom markers, etc.).
Use this folder if you plan to use a build tool like Webpack or Parcel.
components/: If you start building more advanced UI features (like modals, book lists, etc.), you can organize reusable components here.
-
utils/: Helper functions, like those for formatting data or handling Firebase queries, can go here.
-
firebase.json & .firebaserc: Auto-generated files to initialize Firebase in your project. Also contain hosting configurations.
-
package.json: This file tracks project dependencies (like Firebase SDK, if you're using npm).
{
"location": {
"lat": 28.6139,
"lng": 77.2090,
"name": "New Delhi"
},
"books": [
{
"title": "Midnight's Children",
"author": "Salman Rushdie"
},
{
"title": "The White Tiger",
"author": "Aravind Adiga"
}
]
}