Starting the Application
Start the Flask development server
http://localhost:7001 with debug mode enabled.The command sets the following environment variables:FLASK_APP=application.py- Specifies the Flask application entry pointFLASK_DEBUG=1- Enables debug mode with auto-reloading and detailed error pages
Development Workflow
Auto-rebuilding Frontend Assets
During development, you’ll likely make changes to JavaScript, SCSS, or other frontend assets. To automatically recompile these on changes:Start the asset watcher
In the new terminal, run:This will monitor your frontend files and rebuild them automatically when changes are detected.
If you’re using notifications-local Docker setup, restart the container instead:
Running with Docker
You can also run the application using Docker:Testing
Running Tests Locally
Running Tests with Docker
Linting Only
To run just the linting checks without tests:- Check code with
ruff check . - Check formatting with
ruff format --check .
Frontend Linting
To lint SCSS files:Common Development Tasks
Building Frontend Assets Manually
If you need to rebuild frontend assets without watching:Running npm Audit
To check for security vulnerabilities in Node.js dependencies:better-npm-audit to check production dependencies for high-severity issues.
Viewing Available Make Commands
To see all available make commands:Environment Variables
The application uses several environment variables that can be configured:FLASK_APP- Flask application entry point (default:application.py)FLASK_DEBUG- Enable debug mode (set to1for development)- Additional configuration may be required for AWS credentials, Sentry DSN, etc.
Troubleshooting
Port 7001 already in use
If port 7001 is already occupied:Frontend assets not loading
If static assets aren’t loading correctly:-
Rebuild the frontend:
- Clear browser cache and hard reload (Cmd+Shift+R or Ctrl+Shift+R)
-
Check that files exist in the static directory:
Changes not reflected in the browser
- Ensure Flask debug mode is enabled (it should auto-reload)
- Check the terminal for any errors
- For frontend changes, ensure
npm run watchis running - Restart the Flask server after frontend asset changes
Tests failing
If tests fail unexpectedly:Pre-commit hooks blocking commits
If pre-commit hooks are preventing you from committing:Next Steps
- Review the Document Download API documentation to understand the backend
- Check out the notifications-local repository for running the full Notify stack locally
- Read about updating dependencies in the Notify manuals