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 server directory:
- Create a .env file in the server directory 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" # 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. If your code specifically requires a PASSWORD variable, adjust the .env and your Go code accordingly.
- Ensure Go dependencies are installed:
- Run the Go server: The backend should now be running (e.g., on http://localhost:8080).
-
Frontend (Svelte Client) Setup:
-
Navigate to the client directory (from the project root):
-
Install dependencies:
-
IMPORTANT for Local Development: Your Svelte code may be configured to fetch data from the production URL. For local development, you must update the fetch URLs in your Svelte components to point to your local Go server.
Look for URLs like https://extinctatlas.duckdns.org/... and change them to http://localhost:PORT/... (e.g., http://localhost:8080/...).
-
Start the Svelte development server:
-
-
Access the Application:
- Open your browser to the URL provided by the Svelte development server (usually http://localhost:5173).
- 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