INBOX/test.md
2026-08-07 15:50:54 +02:00

59 lines
No EOL
1.4 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Flask Login App Markdown Guide
> **Goal** Build a minimal Flask app that:
> 1. Uses **SQLite** for persistence.
> 2. Has a *login* page, an *index* page (requires auth), and a *logout* route.
> 3. Uses **FlaskLogin** and **Werkzeug** for password hashing.
> 4. Is ready for a CLIAI to read and walk you through the implementation.
---
## 1. Project Overview
- **What it does** Basic authentication + protected landing page.
- **Tech stack** Flask, FlaskLogin, Werkzeug, SQLite, Jinja2.
- **Why SQLite** Zeroconfig, filebased DB that ships with Python.
---
## 2. Prerequisites
- Python3.9+ installed.
- `pip` available.
- Optional: `virtualenv` or `venv` for isolation.
---
## 3. Directory Layout (suggested)
my_flask_app/
├── app/
│ ├── init.py
│ ├── models.py
│ ├── routes.py
│ ├── templates/
│ │ ├── base.html
│ │ ├── index.html
│ │ └── login.html
│ └── static/ # optional, for CSS/JS
├── migrations/ # if you later add FlaskMigrate
├── config.py # app config (secret key, DB URI, etc.)
├── run.py # entry point
├── requirements.txt
└── README.md
---
## 4. Setting Up the Environment
1. `python -m venv venv`
2. `source venv/bin/activate` (Linux/macOS) or `venv\Scripts\activate` (Windows).
3. Create `requirements.txt` with:
```text
Flask
Flask-Login
Werkzeug