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
