This project is a Task Notification and Management System built using Flask, Flask-SQLAlchemy, and Flask-APScheduler. It allows users to manage tasks, send notifications for upcoming tasks via email, and visualize schedules effectively.
- Task Management: Create, update, and delete tasks.
- Email Notifications: Automatically sends email reminders for upcoming tasks.
- Scheduling: Uses APScheduler to schedule and manage periodic tasks.
- Role-Based Access: Login system with different user roles (e.g., admin, user).
- Task Visualization: View and filter tasks in a calendar or list format.
- Customizable Configurations: Easily configure notification times and email settings.
- Backend: Flask
- Database: Flask-SQLAlchemy (SQLite)
- Scheduler: Flask-APScheduler
- Email Service: Flask-Mail
- Frontend: HTML, CSS, JavaScript (with Flask templates)
-
Clone the repository:
git clone https://github.com/yassinezorgui/Interstrap-Security-Project.git cd Interstrap-Security-Project -
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Configure the environment variables in at
notification.pyfile:def setup_mail(app): app.config['MAIL_SERVER'] = 'smtp.gmail.com' app.config['MAIL_PORT'] = 587 app.config['MAIL_USE_TLS'] = True app.config['MAIL_USERNAME'] = 'your-email@gmail.com' app.config['MAIL_PASSWORD'] = 'your-email-password' mail.init_app(app) -
Initialize the database:
flask db init flask db migrate flask db upgrade
-
Run the application:
flask run
The system sends email notifications for tasks that are due within the next 7 days. Notifications are handled using Flask-APScheduler.
Navigate to /tasks to create or manage tasks. Each task includes a title, description, and due date.
Tasks can be viewed in a calendar format. Filters are available to sort tasks by date, voley or priority.
-
Working Outside Application Context: Ensure the correct usage of
app.app_context()when accessing Flask-specific functionality. -
Circular Import: Avoid importing
appin modules whereappis already initializing. -
Scheduler Already Running: Check for duplicate
scheduler.start()calls and usescheduler.runningto verify the scheduler state.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch for your feature.
- Submit a pull request with a detailed explanation of your changes.
This project is licensed under the MIT License. See the LICENSE file for details.
For questions or support, please contact Mohamed Yassine Zorgui at [zorguimohamedyassine@gmail.com].