A simple note-taking application with Flask, SQLAlchemy, and SQLite.
- Notes Management: Create, read, update, and delete notes
- Categories: Organize notes with colored categories
- Attachments: Upload images, documents, and files to notes
- Likes: Like your favorite notes
- Multiple Views: Table view and Google Keep-style card view
- Responsive Design: Works on mobile and desktop
- Clone the repository (or download the files):
cd flask_notes_app- Create a virtual environment (recommended):
python3 -m venv venv- Activate the virtual environment:
-
Linux/macOS:
source venv/bin/activate -
Windows:
venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txtOR use the setup script (recommended):
./setup_and_run.shThis script will automatically:
- Create the virtual environment if it doesn't exist
- Activate it
- Install all dependencies
- Create necessary directories
- Run the application
- Run the application:
python app.pyThe application will be available at http://localhost:5000
- Click "New Note" in the navigation bar
- Fill in title, content, and select a category
- Optionally upload attachments (images, documents, etc.)
- Click "Save Note"
- Go to "Categories" in the navigation
- Create new categories with custom colors
- Edit or delete existing categories (can't delete categories with notes)
- Table View: Traditional table layout with all note details
- Keep View: Card-based layout similar to Google Keep
- Upload multiple files per note
- Supported formats: PNG, JPG, JPEG, GIF, PDF, TXT, DOC, DOCX
- View and download attachments from note details
- Delete individual attachments
Edit the .env file to customize:
SECRET_KEY: Change this for productionDATABASE_URL: SQLite database locationUPLOAD_FOLDER: Where to store uploaded files
The application uses SQLite by default. There are a few safe ways to prepare a database for local development or for including a "schema-only" DB in the repository:
- Create an application database (local, with tables):
# Running the app will create `notes.db` in the project root if it doesn't exist
python app.py- Create a repository-friendly empty database that contains only the schema (recommended if you want to commit a DB file):
# This project includes a helper script that creates `empty_notes.db` (schema only)
python3 create_empty_db.py- Use Flask-Migrate (recommended for schema evolution):
export FLASK_APP=manage.py
flask db upgradeNotes and security:
notes.db(the full local DB) is listed in.gitignoreand should not be committed if it contains real user data (emails, password hashes, uploads).- If you need to share a DB file in the repo, prefer
empty_notes.db(schema only) or a sanitized example database (remove or anonymizeuser.emailanduser.password_hash). - To generate a sanitized copy manually:
# create a copy
cp notes.db notes_sanitized.db
# remove sensitive columns (example using sqlite3 CLI)
sqlite3 notes_sanitized.db "UPDATE user SET email=NULL, password_hash=NULL; VACUUM;"If you want, this repository already contains create_empty_db.py which creates empty_notes.db with the current schema and no user data.
MIT License - Free to use and modify.
- User authentication
- Search functionality
- Note sharing
- Export/import notes
- Dark mode


