Sometimes, You Don't
Need Flask Either
The simplest stack is no stack. If your site has no database and no user accounts, a plain HTML file is the right answer.
Ask yourself one question before writing a single line of backend code.
Does your site need any of the following?
- A database (storing user data, posts, orders…)
- User accounts and authentication
- Server-side logic (processing payments, sending emails from a form, generating content dynamically)
- A private API
If your answer is no to all of the above:
Stop. You don't need Flask. You don't need any backend. Ship a static site.
If your answer is yes to any of the above: Flask is your answer →
The Static Stack
Three files. Zero dependencies. Instant deploy.
your-project/
├── index.html ← Your page
├── styles.css ← Your styles
├── script.js ← Your interactivity (optional)
└── images/ ← Your assets
index.html
Your content. Sections, headings, images, links. Written in plain HTML — readable by any browser, any person, any AI, instantly.
styles.css
Your design. Or skip it and use Tailwind CDN with one script tag — no npm, no build step, no node_modules.
script.js
Vanilla JS for interactions — mobile menu, smooth scroll, a contact form that triggers an n8n workflow. Entirely optional.
The full "Hello World" static site:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Site</title>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="bg-white font-sans">
<h1 class="text-4xl font-bold text-center mt-20">Hello World</h1>
</body>
</html>
That's it. This renders in any browser. No compilation. No dependencies. Lighthouse score: 100.
Deploy on Netlify via GitHub
Free. Fast. Automatic. Three steps, never touch a server again.
Push to GitHub
Create a GitHub repo, drop in your files, git push. That's your source of truth.
Connect to Netlify
Log into Netlify, click "Add new site", pick your GitHub repo. No build command. Publish directory: / (root).
Live in 30 seconds
Your site is live on a Netlify URL with free HTTPS and global CDN. Every future git push redeploys automatically.
Free HTTPS
Let's Encrypt SSL, auto-renewed
Global CDN
Served from 100+ edge locations
Free Tier
100 GB/month bandwidth, unlimited sites
What Works Perfectly as Static
These sites have no business running a backend
Portfolio Site
Your name, your work, your contact. No logins, no database. One HTML file with Tailwind. Deployed in 10 minutes, loads in 80ms, Lighthouse 100.
Landing Page
Product launch, waitlist, one-pager. Point your form at an n8n webhook for the email capture — no backend required. n8n handles the submission, sends you a notification, done.
Documentation Site
API docs, product guides, internal wikis. Pure HTML pages, a sidebar nav in JS. Or use a static site generator like MkDocs — it outputs plain HTML.
Event / Info Page
Conference page, product release, restaurant menu, local business. Static HTML, updated by editing the file and pushing to GitHub.
The Tip: Forms without a backend
A contact form doesn't require a backend. Point your HTML form's action at an n8n webhook — n8n receives the submission and does whatever you want: send an email, write to a Google Sheet, post to Slack. Free to self-host, and you own the workflow. Netlify Forms is the zero-config alternative if you just want an email notification.
When to Graduate to Flask
The four signals that mean you need a real backend
You need to store data
Users create accounts, post content, or place orders. You need a database. The moment you need to persist data per user, you need a backend. Go Flask + PostgreSQL.
You need user authentication
Login, sessions, permissions, password reset. This is server-side logic. Don't try to fake auth in JavaScript — that's not secure. You need a backend.
You need server-side processing
Charging a credit card via Stripe, calling a paid API with a secret key, sending transactional emails, processing uploads — anything that requires secrets or heavy logic belongs on a server.
Your content changes dynamically
Product catalog that updates from inventory, user-generated content, a dashboard with real data. If pages need to reflect a changing database, you need a backend to render them.
Hit any of these? Flask + PostgreSQL + psycopg2 is the answer.
Simple, transparent, AI-friendly — and you'll understand every line.
Right Tool, Right Job
Static for simple sites. Flask when you need a backend. The goal is always the same: the least complexity that solves the problem.