# event-reminder **Repository Path**: janl/event-reminder ## Basic Information - **Project Name**: event-reminder - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-01-12 - **Last Updated**: 2026-02-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Event Reminder [![Python 3.7.7](https://img.shields.io/badge/python-3.8.5-blue.svg)](https://www.python.org/downloads/release/python-377/) [![Flask 1.1.1](https://img.shields.io/badge/Flask-1.1.2-blue.svg)](https://flask.palletsprojects.com/en/1.1.x/) [![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://lbesson.mit-license.org/) >The **Event Reminder** is a simple web application based on **[Flask](https://flask.palletsprojects.com/en/1.1.x/)** framework, **[Bootstrap](https://getbootstrap.com/)** UI framework and **[FullCalendar](https://fullcalendar.io/)** full-sized JavaScript calendar. The main purpose of the **Event Reminder** application is to send notifications about upcoming events to selected users. The application allows a standard user to enter event data, process it and display with the **FullCalendar** API. Moreover, the application has a built-in admin panel for the management of users, events, notification service, display app related logs and basic system info on app dashboard partly based on **[Chart.js](https://www.chartjs.org/)**. ## Getting Started Below instructions will get you a copy of the project up and running on your local machine for development and testing purposes. ### Requirements Project is created with the following Python third party packages: * [Flask](https://flask.palletsprojects.com/en/1.1.x/) * [Flask-SQLalchemy](https://flask-sqlalchemy.palletsprojects.com/en/2.x/) * [Flask-WTF](https://flask-wtf.readthedocs.io/en/stable/) * [Flask-Login](https://flask-login.readthedocs.io/en/latest/) * [Flask-Caching](https://flask-caching.readthedocs.io/en/latest/) * [Flask-Session](https://flask-session.readthedocs.io/en/latest/) * [Requests](https://requests.readthedocs.io/en/master/) * [python-dotenv](https://pypi.org/project/python-dotenv/) * [psycopg2-binary](https://pypi.org/project/psycopg2-binary/) ## Installation with virtualenv tool The application can be build locally with `virtualenv` tool. Run following commands in order to create virtual environment and install the required packages. ```bash $ virtualenv venv $ source venv/bin/activate (venv) $ pip install -r requirements.txt ``` ### Environment variables The **Event Reminder** application depends on some specific environment variables. To run application successfully the environment variables should be stored in `.env` file in the root application directory (`event-reminder` dir). Replace the values in `.env-example` with your own values and rename this file to `.env` ``` # '.env' file example: SECRET_KEY=use-some-random-key APPLICATION_MODE='development' # for development will use SQLite db # APPLICATION_MODE='production' # for production will use PostgreSQL db DEV_DATABASE_URL=sqlite:///app.db # example for SQLite PROD_DATABASE_URL=postgresql://reminderuser:password@db:5432/reminderdb # example for PostgreSQL MAIL_SERVER=smtp.example.com MAIL_PORT=587 MAIL_USERNAME=your.email@example.com # account which will be used for SMTP email service MAIL_PASSWORD=yourpassword # password for above account CHECK_EMAIL_DOMAIN='False' # if 'True' validate whether email domain/MX record exist SESSION_REDIS=redis://localhost:6379/2 # session-server CACHE_REDIS=redis://localhost:6379/3 # caching-server ``` The `.env` file will be imported by application on startup. ### Redis server Redis server is required to start application. Redis is used as a session server (server-side). The fastest and easiest way to start Redis is to run it in Docker container. ```bash $ docker run --name redis-event -d -p 6379:6379 redis ``` ### Running the app Before running the **Event Reminder** app you can use script `init_db.py` to initialize database and add some dummy data that can be used later in the processing. ```bash # Below script will create default admin username 'admin' with password 'admin' (venv) $ python init_db.py # You can create a different user instead of the default one using proper options. Below example for username 'bob' with password 'LikePancakes123#'. (venv) $ python init_db.py -u bob -p LikePancakes123# # For more info please use: (venv) $ python init_db.py --help ``` After adding dummy data, you can start the application. First of all set the `FLASK_APP` environment variable to point `run.py` script and then invoke `flask run` command. ```bash # On the first terminal run: (venv) $ cd reminder/ (venv) $ export FLASK_APP=run.py # in MS Windows OS run 'set FLASK_APP=run.py' (venv) $ flask run ``` **Note:** The notification service has been removed. Devices should poll for events via API. ## Installation with Docker-Compose tool The application can be also build and run locally with Docker-Compose tool. Docker-Compose allows you to create working out-of-the-box example of **Event Reminder** application with Gunicorn, Redis and PostgreSQL with some dummy data on board. ### Running the app To build and run app with Docker-Compose - clone the repo and follow the quick-start instructions below. In order to correctly start the application, you must run the following commands in the project root directory (`event-reminder`). 1. Before running `docker-compose` command you should create `.env-web` and `.env-db` files (ENVs for Flask app and PostgreSQL). The best solution is to copy the existing example files and edit the necessary data. ```bash # Create docker .env files using examples from repository $ cp docker/web/.env-web-example docker/web/.env-web $ cp docker/db/.env-db-example docker/db/.env-db $ cp docker/worker/.env-worker-example docker/worker/.env-worker ``` 2. Build and start containers using the commands shown below: ```bash # To build containers specified in docker-compose.yml file $ docker-compose build # To start containers (add -d to run them in the background) $ docker-compose up -d # To verify status of the application: $ docker-compose ps ``` 3. Open `http://localhost:8080` in your browser to see the application running. Login with default credentials: - admin user: `admin` - default pass: `admin` 4. To stop all app services, run: ```bash $ docker-compose stop ``` 5. To bring everything down and remove the containers, run: ```bash docker-compose down # To delete container volumes as well, use -v or --volumes flag. docker-compose down --volumes ``` 6. TODO: add some models to the database 在models.py中添加几个模型,1, 红外设备类型模型,字段包括id, name, image, note几个字段。2, 红个设备品牌模型,字段包括id, name, image, note几个字段,3,红外设备模型,字段包括id, 红外设备类型id, 红外设备品牌id,name,设备型号(可以为空),image, note几个字段,4,红外设备操作模型,字段包括id,红外设备id,操作名称,地址码,指令码,note几个字段。5,我的红外设备操作模型,字段包括id, user.id, 红外设备id, 设备名称, 设备key, 操作名称,操作Key,操作数据,note等字段。