An interactive map to discover extinct animals, their habitats, and AI-powered insights.
Built with Svelte & Go.
- Interactive World Map: Explore extinct animal habitats via Leaflet.js.
- Detailed Animal Info: Click polygons for images, reasons for extinction, last seen dates, physical stats, and diet.
- AI-Powered Q&A: Ask questions about selected animals and get answers from an integrated AI.
- Responsive Design: Works seamlessly on both desktop and mobile devices.
- Frontend: Svelte, Leaflet.js, Tailwind CSS
- Backend: Go
- Database: MongoDB
- AI: Google Gemini API
- Node.js and npm
- Go
- MongoDB (instance accessible)
- Google Gemini API Key
-
Clone the Repository:
git clone https://github.com/0xSKAMI/extinctatlas.git cd extinctatlas -
Backend (Go Server) Setup:
- Navigate to the
serverdirectory:cd server - Create a
.envfile in theserverdirectory with the following content:# Your Google Gemini API Key KEY="your_gemini_api_key" # Your full MongoDB connection string MONGO_URI="your_mongodb_connection_string"
PASSWORD="password for mongodb"
# Port for the Go backend server (e.g., 8080) PORT="8080" ``` > **Note**: It's common practice to use a full `MONGO_URI` connection string for flexibility. But this code is using 2 strings, password and link so if you want to use full "MONGO_URI" modify code accordingly- Ensure Go dependencies are installed:
go mod tidy
- Run the Go server:
The backend should now be running (e.g., on
go run main.go
http://localhost:8080).
- Navigate to the
-
Frontend (Svelte Client) Setup:
-
Navigate to the
clientdirectory (from the project root):cd ../client -
Install dependencies:
npm install
-
Create a
.envfile in theclientdirectory with the following content:# The address where your Go backend is running PUBLIC_ADDRESS="http://localhost:8080"
-
IMPORTANT for Local Development: Your Svelte code may be configured to fetch data from the production URL. For local development, you must update the
fetchURLs in your Svelte components to point to your local Go server.Look for URLs like
https://extinctatlas.duckdns.org/...and change them tohttp://localhost:PORT/...(e.g.,http://localhost:8080/...). -
Start the Svelte development server:
npm run dev
-
-
Access the Application:
- Open your browser to the URL provided by the Svelte development server (usually
http://localhost:5173).
- Open your browser to the URL provided by the Svelte development server (usually
- Hover over map regions to see animal names and images.
- Click a region to open the information panel with details.
- Use the "Ask AI" input in the panel to ask questions about the selected animal.
- Click "close" in the panel to return to the map.
Contributions are welcome! If you have suggestions or want to add a feature, please follow these steps:
- Fork the repository.
- Create your feature branch (
git checkout -b feature/AmazingFeature). - Commit your changes (
git commit -m 'Add some AmazingFeature'). - Push to the branch (
git push origin feature/AmazingFeature). - Open a Pull Request.
Please open an issue to discuss major changes before starting work.
Distributed under the Apache License, Version 2.0. See LICENSE file for more information.
You can view the full license text online at: http://www.apache.org/licenses/LICENSE-2.0
