/mantis

READONLY COPY (https://gitlab.com/opendata-apps/mantis) | An interactive web application to track Mantis Religiosa sightings in Brandenburg.

Primary LanguagePythonOtherNOASSERTION

Header Banner

An interactive web application to track Mantis Religiosa sightings in Brandenburg, presented by the Naturkundemuseum Potsdam.

Mantis Tracker allows users to report Mantis Religiosa sightings and view them on an interactive map, along with insightful statistics and helpful FAQs.

🌟 Features

  • πŸ“š Learn about the Mantis Religiosa
  • 🎨 Beautiful UI
  • πŸ“ Report mantis sightings with an easy-to-use form
  • πŸ—ΊοΈ View all mantis sightings on an interactive map
  • πŸ“Š View insightful statistics and FAQs

πŸš€ Roadmap

Here are some of the features we plan to add in the future:

  • Gallery of photos of the Mantis Religiosa
  • Improved data visualization and analysis of the sighting data
  • More animations and UI improvements to make the app more engaging
  • Improved performance and code quality

Stay tuned for updates on these exciting new features!

πŸ› οΈ Technologies

HTML CSS Jinja2s Python Flask PostgreSQL Tailwind CSS JavaScript

πŸ’» Development Setup/Installation

Step 1: πŸ“ Clone the repository

git clone https://gitlab.com/opendata-apps/mantis.git
cd mantis

Step 2: 🌐 Create a virtual environment and activate it

python -m venv .venv (or another name with . like .mantis)
source .venv/bin/activate    # For Windows: .venv\Scripts\activate

Step 3: πŸ“¦ Install the dependencies

pip install -r requirements.txt

Step 4: πŸ—„οΈ Create a PostgreSQL database

Use the Program psql

psql -U postgres
CREATE DATABASE mantis_tracker;
CREATE USER mantis_user WITH PASSWORD 'mantis';
GRANT ALL PRIVILEGES ON DATABASE mantis_tracker TO mantis_user;
-- MacOS only:
GRANT usage, create ON SCHEMA public TO mantis_user;
\q

⚠️: Only if there are any Database changes:

flask db init
flask db migrate -m "your comment"

Step 5: πŸ—οΈ Create the database tables

flask db upgrade

Step 6: β˜• Fill the database tables

flask create-mview
flask insert-initial-data

Step 7: 🎨 Run the CSS watcher

npm --proxy <your-proxy> install tailwindcss
npx tailwindcss -i app/static/css/theme.css -o app/static/build/theme.css --watch

Step 8: πŸš€ Run the development server

python run.py

Step 9: 🏒 Run production server

gunicorn run:app    # For Windows: waitress-serve --listen=*:8000 run:app

Step 10: 🌐 Open http://localhost:5000 in your browser

Meldung id error fix

SELECT setval('[TableName]_id_seq', (SELECT MAX(id) FROM [TableName]))