A simple, modern web-based notes taking application built with Python Flask and SQLite database. This project demonstrates UI design and database integration without requiring any subscription services.
- ✨ Modern UI: Beautiful, responsive design with gradient backgrounds and smooth animations
- 📝 CRUD Operations: Create, Read, Update, and Delete notes
- 💾 SQLite Database: Lightweight, file-based database (no subscription required)
- 🎨 Bootstrap Styling: Professional UI components with Font Awesome icons
- 📱 Responsive Design: Works on desktop, tablet, and mobile devices
- ⚡ Real-time Updates: Instant feedback with flash messages
- 🔍 Note Preview: Quick preview of note content on the main page
- Backend: Python Flask
- Database: SQLite (no subscription required)
- Frontend: HTML5, CSS3, Bootstrap 5
- Icons: Font Awesome 6
- ORM: Flask-SQLAlchemy
- Python 3.7 or higher
- pip (Python package installer)
Download the project files to your local machine.
pip install -r requirements.txt
python app.py
Open your web browser and navigate to:
http://localhost:5000
notes-app/
├── app.py # Main Flask application
├── requirements.txt # Python dependencies
├── README.md # Project documentation
├── templates/ # HTML templates
│ ├── base.html # Base template with common layout
│ ├── index.html # Home page with notes list
│ ├── add_note.html # Add new note form
│ ├── edit_note.html # Edit existing note form
│ └── view_note.html # View individual note
└── notes.db # SQLite database (created automatically)
The application uses a simple SQLite database with one table:
id
(Integer, Primary Key)title
(String, 200 characters)content
(Text)created_at
(DateTime)updated_at
(DateTime)
- Click the "Add New Note" button
- Enter a title and content
- Click "Save Note"
- All notes are displayed on the home page
- Click "View" to see the full note content
- Notes are sorted by most recently updated
- Click "Edit" on any note
- Modify the title or content
- Click "Update Note"
- Click "Delete" on any note
- Confirm the deletion in the popup dialog
The application also provides REST API endpoints:
GET /api/notes
- Get all notes as JSONDELETE /api/notes/<id>
- Delete a note by ID
To use a different database, modify the SQLALCHEMY_DATABASE_URI
in app.py
:
# For PostgreSQL
app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://user:password@localhost/notes'
# For MySQL
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://user:password@localhost/notes'
The application uses custom CSS in the base.html
template. You can modify the styles to match your preferences.
- Change the
SECRET_KEY
in production - Consider using environment variables for sensitive configuration
- Add authentication if needed for multi-user scenarios
-
Port already in use: Change the port in
app.py
:app.run(debug=True, port=5001)
-
Database errors: Delete
notes.db
and restart the application to recreate the database -
Template not found: Ensure the
templates
folder is in the same directory asapp.py
- User authentication and authorization
- Note categories and tags
- Search functionality
- Note sharing
- Export to PDF/Word
- Rich text editor
- Note attachments
- Dark mode toggle
This project is open source and available under the MIT License.
Feel free to fork this project and submit pull requests for any improvements.