Table of Contents
Mail Watch was built with the purpose to notify you in real-time when your mail arrive. Depending where you live your mail box may be located on different part of the house or in other cases even outside. Other times the mail might come at. In my personal case, my mailbox is located on the first floor, while the main living quarters are on the second and third floor. To stop the guessing game of when will the mail man arrives and to avoid investing in other platforms like Ring ^TM^ I created this device. Some other use cases for this project is notify the user when crucial time/tempurature sensitive packages arrives or in general help people with disabilities and their caretakers This backend project is only meant to be use in the local area network using a Raspberry Pi 3/4 as the web server. Key features
|
- FastAPI - FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.7+ based on standard Python type hints.
- Unicorn - FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.7+ based on standard Python type hints.
- PostgresSQL (SQLAlchemy)
- Pushover - push notifications
- TailwindCSS - used TailwindCSS CDN
- DaisyUI - TailwindCSS Componet Library
- Jinja2 - HTML templating Hardware Tech Stack
- Make sure to have Postgres installed and running in your local setup
alternative
- Use
test.db
as a mock database
- Use
- Set up an account with Pushover to get retrieve your API keys
Please follow these steps for a development setup:
-
Fork/Clone repository In the terminal:
-
virtualenv -p python3 env
-
source env/bin/activate
-
pip3 install -r requirements.txt
-
unicorn server:app --reload
Preview of file structure:
├── app
│ ├── server.py
│ ├── requirements.py
| ├── models.py
| ├── .env.sample
| ├── tests
| ├── routes
| ├── services
│ ├── configs # configurations
│ │ ├── __init__.py
│ │ ├── settings.py
│ │ └── database.py
│ └── templates # Jinja2 HTML templates
│ ├── index.html # API Dashboard page
│ └── admin.py
Use .env.sample
file
Variable Name | Value Type | Description |
---|---|---|
DATABASE_URL | string (url) | URL of local postgres database |
PUSHOVER_API_TOKEN | string | api token for Pushover |
PUSHOVER_USER_KEY | string | user key for Pushover |
In the Works | Down the Road |
---|---|
✔️ Save device data in csv file
|
|
Thanks in advance to anyone who contributes in growing this project in anyway