Web app with landing page and log in

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.

Web App Template with Landing Page and Login

This template provides a starting point for building a web application with both public-facing pages and authenticated sections. It includes a landing page for public access and a protected home page that requires authentication.

Getting Started

  • Click "Start with this Template" to begin using this template in the Lazy Builder

Testing the App

  • Click the "Test" button in the Lazy Builder
  • Once deployed, you'll receive a server link to access your web application

Using the App

The template provides two main sections:

  • A public landing page accessible to all visitors
  • A protected home page that requires authentication

The landing page includes: * Navigation header with logo * Hero section with a "Get Started" button * Mobile-responsive design

The authenticated section includes: * Sidebar navigation with user profile * Logout functionality * Protected routes that require login

To customize the app:

  • Update the app title in app_init.py by changing the APP_TITLE value
  • Modify the theme by changing the THEME value in app_init.py to any DaisyUI theme
  • Add your own logo by placing a logo.png file in the static folder
  • Build out the content of home.html based on your app's specific needs

The template uses Google authentication by default and will automatically create user profiles in the database when users log in.

Next Steps

To build your application: * Add your specific content and functionality to the home.html template * Customize the landing page content in landing.html * Add additional routes in routes.py as needed * Extend the User model in models.py with any additional fields your app requires

The template provides a solid foundation for building a web application with both public and authenticated sections, suitable for SaaS applications or any service requiring user authentication.



Template Benefits

  1. Rapid SaaS Platform Development
  2. Perfect foundation for building subscription-based web applications
  3. Includes essential authentication and user management features
  4. Reduces time-to-market for new SaaS products

  5. Professional Customer-Facing Portal

  6. Clean, modern landing page design for attracting potential customers
  7. Seamless transition between public and private areas
  8. Professional user interface with responsive design

  9. Secure User Management System

  10. Built-in authentication and session management
  11. Database structure for user profiles and credentials
  12. Protected routes for sensitive content

  13. Scalable Architecture

  14. Configured with Gunicorn for production-grade deployment
  15. Multi-worker setup for handling concurrent users
  16. Organized codebase structure for easy maintenance and scaling

  17. Customizable Branding Integration

  18. Dynamic theme support through DaisyUI
  19. Easy logo and brand color customization
  20. Consistent styling across public and private pages

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...