A simple, secure web-based notes app built using Flask, MySQL, Flask-Login, and SQLAlchemy.
website/
├── static/
│ └── index.js # JavaScript (optional UI enhancements)
│
├── templates/
│ ├── base.html # Common layout template
│ ├── home.html # Notes dashboard
│ ├── login.html # Login page
│ └── signup.html # Signup page
│
├── init.py # App factory and configuration
├── auth.py # Auth routes (login/register)
├── views.py # Core app routes (home, notes)
├── models.py # SQLAlchemy models
├── requirements.txt # Python dependencies
└── README.md # You're here!
- User registration & login with session management
- Add and delete personal notes
- MySQL database integration
- Responsive templates with Flask and Jinja2
git clone https://github.com/yourusername/flask-notes-app.git
cd flask-notes-app/website
- Set Up Virtual Environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
- Install Dependencies
pip install -r requirements.txt
- Set Up Your MySQL Database Start MySQL server
Create a database:
sql
CREATE DATABASE notes;
Make sure your credentials match your MySQL setup.
🚀 Running the App Locally From the website/ folder:
python -m flask run
Then, visit: http://127.0.0.1:5000/
On the first run, it will create all necessary database tables automatically.
📦 requirements.txt (Sample)
Flask
Flask-Login
Flask-SQLAlchemy
Snippets:
User Login
User Registration
Add Notes
Delete Notes