Landing page with login for SaaS

Test this app for free
52
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)
Get full code

Created: | Last Updated:

This is a good starting point for any app that requires both a landing page and a login and registration. Unlike the internal tool skeleton this one has no team features but it has a landing page so it has external public pages which means it's more suitable for application where there's an external and internal pages. So for a SaaS web app for example this makes more sense than for an internal tool.

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

  1. Rapid SaaS Platform Launch
  2. Provides a complete foundation for launching a SaaS product quickly
  3. Includes both public-facing marketing pages and secure authenticated areas
  4. Reduces time-to-market by eliminating basic infrastructure setup

  5. Professional User Authentication System

  6. Built-in secure login and user management functionality
  7. Profile picture and email handling capabilities
  8. Session management and protected routes for secure access control

  9. Responsive Marketing Presence

  10. Pre-built landing page with hero section and call-to-action elements
  11. Mobile-friendly navigation with hamburger menu
  12. Customizable marketing sections for features, testimonials, and pricing

  13. Scalable Architecture

  14. Configured with Gunicorn for production-grade performance
  15. Database migration support for future platform growth
  16. Multi-threaded worker configuration for handling concurrent users

  17. Modern UI/UX Framework

  18. Built with DaisyUI and Tailwind CSS for contemporary design
  19. Consistent styling across all components
  20. Easy customization through CSS variables and theme support

Technologies

Enhance HTML Development with Lazy AI: Automate Templates, Optimize Workflows and More Enhance HTML Development with Lazy AI: Automate Templates, Optimize Workflows and More
Python App Templates for Scraping, Machine Learning, Data Science and More Python App Templates for Scraping, Machine Learning, Data Science and More
Optimize Your Django Web Development with CMS and Web App Optimize Your Django Web Development with CMS and Web App
Optimize SQL Workflows with Lazy AI: Automate Queries, Reports, Database Management and More Optimize SQL Workflows with Lazy AI: Automate Queries, Reports, Database Management and More
Streamline CSS Development with Lazy AI: Automate Styling, Optimize Workflows and More Streamline CSS Development with Lazy AI: Automate Styling, Optimize Workflows and More
Streamline JavaScript Workflows with Lazy AI: Automate Development, Debugging, API Integration and More  Streamline JavaScript Workflows with Lazy AI: Automate Development, Debugging, API Integration and More
Flask Templates from Lazy AI – Boost Web App Development with Bootstrap, HTML, and Free Python Flask Flask Templates from Lazy AI – Boost Web App Development with Bootstrap, HTML, and Free Python Flask

Similar templates

We found some blogs you might like...