# ✦ Noteflow — Django + MySQL Notes App
A full-featured notes-taking web application built to help you capture and organize your thoughts easily.
---
## 🛠️ Tech Stack
- **Frontend:** Plain HTML, CSS, Vanilla JavaScript
- **Backend:** Django (Python 3.10+)
- **Database:** MySQL 8.0+
---
## 🌟 Features
| Feature | Description |
|---|---|
| **🔐 User Authentication** | Secure register, login, and logout. Users can only see their own notes. |
| **📝 Create Notes** | Add a title, write your thoughts, pick a category, and pin it to the top. |
| **✏️ Edit Notes** | Change any note at any time. |
| **🗑️ Delete Notes** | Shows a warning screen first to stop accidental deletes. |
| **📌 Pin Notes (AJAX)** | Pin important notes to the top instantly without reloading the page. |
| **🏷️ Categories** | Organize notes by Personal, Work, Ideas, To-Do, or Other. |
| **🔍 Smart Search** | Fast search that waits until you stop typing and keeps your cursor in place. |
| **🔽 Filter** | Easily filter notes by picking a category from the dropdown menu. |
| **📊 Quick Stats** | See your total notes and pinned count right at the top. |
---
## 📁 Project Structure
```text
Noteflow/
├── .gitignore
├── requirements.txt
├── setup_mysql.sql
├── README.md
└── src/
├── manage.py
├── notes_project/
│ ├── settings.py
│ ├── urls.py
│ └── wsgi.py
└── notes_app/
├── models.py
├── views.py
├── forms.py
├── urls.py
└── templates/
└── notes_app/
├── base.html
├── login.html
├── register.html
├── home.html
├── note_form.html
├── note_detail.html
└── confirm_delete.html
Open your MySQL shell in your terminal:
mysql -u root -pThen run your SQL setup script to create the database:
mysql -u root -p < setup_mysql.sql# Go to the main project folder
cd Noteflow
# Create the virtual environment
python -m venv venv
# Activate it (Windows)
venv\Scripts\activate
# Activate it (macOS/Linux)
source venv/bin/activatepip install -r requirements.txtWindows tip: If
mysqlclientgives you an error, try runningpip install mysql-connector-pythonand change yoursettings.pydatabase ENGINE to'mysql.connector.django'.
Open src/notes_project/settings.py and put your MySQL details in the DATABASES section:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'notes_db',
'USER': 'root',
'PASSWORD': 'your_password',
'HOST': 'localhost',
'PORT': '3306',
}
}# Go inside the code folder
cd src
# Run the migrations
python manage.py makemigrations
python manage.py migratepython manage.py runserverOpen your web browser and visit: http://127.0.0.1:8000
Holds user accounts (id, username, email, password).
Holds your notes.
user_id: Links to the user who made the note.title,content,category,is_pinned: The details of the note.created_at,updated_at: The exact times the note was made and last changed.
If you put this app on the live internet:
- Change
DEBUG = TruetoDEBUG = Falsein yoursettings.pyfile. - Hide your
SECRET_KEYusing environment variables. - Put your real website name in
ALLOWED_HOSTS. - Run
python manage.py collectstaticto gather your CSS files.