Landing page with login for SaaS
import logging
from flask import Flask, url_for, request, session
from gunicorn.app.base import BaseApplication
from routes import routes as routes_blueprint
from authentication import auth, auth_required
from models import db, User
from abilities import apply_sqlite_migrations
# Setup logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
def create_app():
app = Flask(__name__, static_folder='static')
app.secret_key = 'supersecretkey'
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///database.sqlite'
db.init_app(app)
with app.app_context():
apply_sqlite_migrations(db.engine, db.Model, 'migrations')
app.register_blueprint(routes_blueprint)
app.register_blueprint(auth)
Created: | Last Updated:
Using the Landing Page with Login Template
This template provides a starting point for building a SaaS application with both public landing pages and authenticated internal pages. It includes user authentication, profile management, and a customizable landing page.
Getting Started
- Click "Start with this Template" to load the template into your Lazy Builder interface
Testing the Application
- Click the "Test" button in the Lazy Builder
- Lazy will deploy your application and provide you with a URL to access it
Using the Application
The template provides two main sections:
-
Public Landing Page
- Accessible to all visitors
- Features a hero section, navigation menu, and call-to-action buttons
- Customizable sections for features, testimonials, and pricing
-
Authenticated Profile Area
- Protected behind authentication
- Includes user profile management
- Sidebar navigation with logout functionality
To customize the application for your needs:
- Update the landing page content in
home.html
to reflect your SaaS offering - Modify the navigation items in
navbar.html
to match your sections - Add your logo by placing a
logo.png
file in the static directory - Customize the profile page content in
profile.html
based on your application's requirements - Update the app title in
app_init.py
to match your project name
The template uses DaisyUI and Tailwind CSS for styling, making it easy to modify the appearance using utility classes.
Authentication Flow
The application handles user authentication automatically through the Lazy platform. When users click "Get Started" or try to access protected routes:
- They will be prompted to authenticate
- Upon successful login, their profile information is stored
- Profile pictures and email addresses are automatically managed
- Session management is handled securely
The template is now ready to be customized for your specific SaaS application needs.
Template Benefits
- Rapid SaaS Platform Launch
- Provides a complete foundation for launching a SaaS product quickly
- Includes both public-facing marketing pages and secure authenticated areas
-
Reduces time-to-market by eliminating basic infrastructure setup
-
Professional User Authentication System
- Built-in secure login and user management functionality
- Profile picture and email handling capabilities
-
Session management and protected routes for secure access control
-
Responsive Marketing Presence
- Pre-built landing page with hero section and call-to-action elements
- Mobile-friendly navigation with hamburger menu
-
Customizable marketing sections for features, testimonials, and pricing
-
Scalable Architecture
- Configured with Gunicorn for production-grade performance
- Database migration support for future platform growth
-
Multi-threaded worker configuration for handling concurrent users
-
Modern UI/UX Framework
- Built with DaisyUI and Tailwind CSS for contemporary design
- Consistent styling across all components
- Easy customization through CSS variables and theme support
Technologies






