PlantTracker is a Flask web application that allows you to manage your personal houseplant collection, keep a wishlist of plants you want, and log when each plant was watered.
A Flask application for keeping track of houseplants — the ones you already own and the ones you still want.
This project was created as a learning exercise to understand the fundamentals of building web applications with Flask. It covers the application factory pattern, blueprints, class-based views, working with a database through an ORM, schema migrations and user authentication.
Each plant belongs to a single user, so every view checks ownership before showing or modifying data. Plants are split into two lists by a single flag: the collection of plants already owned, and a wishlist of plants to buy later.
- Register, log in and log out, with passwords stored as hashes
- Add, view, edit and delete plants, with an optional photo upload
- Keep a separate wishlist for plants not yet owned
- Search the collection and the wishlist by common or Latin name
- Log watering dates for each plant and view the history
- Add plants in bulk and update them through JSON requests
- Unit tests written using
pytest
Project is created with:
- Python 3.12
- Flask
- Flask-SQLAlchemy
- Flask-Migrate
- Flask-Login
- Flask-Marshmallow
- SQLite
- pytest
To run this project, install it locally:
git clone https://github.com/MagdalenaLowczy/Project_PlantTracker.git
cd Project_PlantTracker
Create and activate a virtual environment:
python -m venv venv
venv\Scripts\activate
Install the dependencies and apply the database migrations:
pip install -r requirements.txt
flask --app run db upgrade
Tests are written using pytest. To run the tests:
pytest
Each test runs against a fresh in-memory SQLite database, so no test data is written to the real one. The tests verify the model relationships and password hashing, as well as registration, login, access control and the full create-read-update-delete flow for plants.
Start the application:
python run.py
The app will be available at http://127.0.0.1:5000. Register an account, log in, and start adding plants to your collection or wishlist.