diff --git a/.gitignore b/.gitignore index 97a32a8..ae5726d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ **/*.pyc tmp/**/* +.serena/cache/** diff --git a/.roo/mcp.json b/.roo/mcp.json index ae1e5f9..b0a5fb7 100644 --- a/.roo/mcp.json +++ b/.roo/mcp.json @@ -1,5 +1,9 @@ { "mcpServers": { + "serena": { + "command": "uvx", + "args": ["--from", "git+https://github.com/oraios/serena", "serena", "start-mcp-server", "--context", "ide-assistant", "--project", "/home/notid/dev/email-organizer"] + }, "context7": { "command": "npx", "args": [ diff --git a/.roo/rules/01-general.md b/.roo/rules/01-general.md index 620de8f..bfa45a6 100644 --- a/.roo/rules/01-general.md +++ b/.roo/rules/01-general.md @@ -15,6 +15,7 @@ Here are special rules you must follow: 13. Plans go into docs/plans/*.md. These may not be kept in sync, as they are just for brainstorming. 14. ****IMPORTANT**** Database migrations are automatically created via `flask db migrate -m 'message'`. **NEVER** create migrations by hand. You should never have to read the contents of migrations/ 15. In the technical documentation, code should be used sparingly. Also, when needed, focus on the APIs, and only use snippets. +16. If appropriate context has been given in the prompt for the task at hand, don't read the whole file. # Conventions diff --git a/.roomodes b/.roomodes new file mode 100644 index 0000000..03c56f3 --- /dev/null +++ b/.roomodes @@ -0,0 +1,44 @@ +customModes: + - slug: user-story-creator + name: 📝 User Story Creator + roleDefinition: | + You are an agile requirements specialist focused on creating clear, valuable user stories. Your expertise includes: + - Crafting well-structured user stories following the standard format + - Breaking down complex requirements into manageable stories + - Identifying acceptance criteria and edge cases + - Ensuring stories deliver business value + - Maintaining consistent story quality and granularity + whenToUse: | + Use this mode when you need to create user stories, break down requirements into manageable pieces, or define acceptance criteria for features. Perfect for product planning, sprint preparation, requirement gathering, or converting high-level features into actionable development tasks. + description: Create structured agile user stories + groups: + - read + - edit + - command + source: project + customInstructions: | + Expected User Story Format: + + Title: [Brief descriptive title] + + As a [specific user role/persona], + I want to [clear action/goal], + So that [tangible benefit/value]. + + Acceptance Criteria: + 1. [Criterion 1] + 2. [Criterion 2] + 3. [Criterion 3] + + Story Types to Consider: + - Functional Stories (user interactions and features) + - Non-functional Stories (performance, security, usability) + - Epic Breakdown Stories (smaller, manageable pieces) + - Technical Stories (architecture, infrastructure) + + Edge Cases and Considerations: + - Error scenarios + - Permission levels + - Data validation + - Performance requirements + - Security implications diff --git a/app/__init__.py b/app/__init__.py index fae8d2e..3853f63 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -11,10 +11,33 @@ login_manager.login_view = 'auth.login' login_manager.login_message = 'Please log in to access this page.' login_manager.login_message_category = 'warning' +from flask import Flask, request, make_response +from flask_sqlalchemy import SQLAlchemy +from flask_login import LoginManager +from config import config +from app.models import db, Base, User +from flask_migrate import Migrate + +# Initialize Flask-Login +login_manager = LoginManager() +login_manager.login_view = 'auth.login' +login_manager.login_message = 'Please log in to access this page.' +login_manager.login_message_category = 'warning' + + def create_app(config_name='default'): app = Flask(__name__, static_folder='static', static_url_path='/static') app.config.from_object(config[config_name]) + # Add middleware to simulate 500 errors + @app.before_request + def check_for_simulate_500(): + # Check if the X-Simulate-500 header is present + if request.headers.get('X-Simulate-500'): + response = make_response({'error': 'Simulated server error'}, 500) + response.headers['Content-Type'] = 'application/json' + return response + # Initialize extensions db.init_app(app) migrate = Migrate(app, db) diff --git a/app/templates/base.html b/app/templates/base.html index ec36c3b..c80308c 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -13,6 +13,37 @@ + {% block head %}{% endblock %} -
+ {% block header %}{% endblock %} {% block content %}{% endblock %} {% block modal %}{% endblock %} + + +