by moonboy

Internal tool (web app) with Google sign in and team management

Test this app for free
25
import logging
from gunicorn.app.base import BaseApplication
from app_init import create_initialized_flask_app

# Flask app creation should be done by create_initialized_flask_app to avoid circular dependency problems.
app = create_initialized_flask_app()

# Setup logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

class StandaloneApplication(BaseApplication):
    def __init__(self, app, options=None):
        self.application = app
        self.options = options or {}
        super().__init__()

    def load_config(self):
        # Apply configuration to Gunicorn
        for key, value in self.options.items():
            if key in self.cfg.settings and value is not None:
                self.cfg.set(key.lower(), value)

    def load(self):
Get full code

Frequently Asked Questions

What are some business applications for this Flask-based internal tool template?

This Flask-based internal tool template is versatile and can be applied to various business scenarios. Some potential applications include:

  • Employee dashboards for HR management
  • Sales team performance tracking tools
  • Project management and task allocation systems
  • Internal customer support ticketing systems
  • Company-wide analytics and reporting platforms

The template's Google sign-in and team management features make it particularly suitable for organizations that want to restrict access to sensitive internal data while providing a user-friendly interface.

How does the team management feature benefit companies using this internal tool template?

The team management feature in this Flask-based internal tool template offers several benefits:

  • Controlled access: Only authorized employees can access the tool
  • Easy onboarding: New team members can be quickly added to the allow list
  • Flexible permissions: Admins can manage access by individual email or domain
  • Security: Unauthorized users are automatically rejected
  • Scalability: As the company grows, the tool can accommodate more users without compromising security

These features ensure that sensitive company information remains protected while still being accessible to the right people.

Can you provide an example of how to add a new route to the Flask app in this template?

Certainly! To add a new route to the Flask app in this internal tool template, you would modify the routes.py file. Here's an example of how to add a new route for a reports page:

python @app.route("/reports") def reports_route(): # Add any necessary logic here return render_template("reports.html", title="Reports")

You would also need to create a corresponding reports.html template in the templates folder and update the navigation in _navigation.html to include the new route.

How can businesses customize the look and feel of this Flask-based internal tool template?

Businesses can easily customize the look and feel of this internal tool template by:

  • Modifying the CSS in styles.css to match company branding
  • Updating the logo by replacing company_logo.png in the static folder
  • Customizing the templates in the templates folder to add company-specific elements
  • Adjusting the color scheme in custom-modal.css for popups and modals
  • Modifying the base.html template to include additional scripts or stylesheets

These customizations allow businesses to create a cohesive brand experience across their internal tools.

How would you add a new model to the database in this Flask internal tool template?

To add a new model to the database in this Flask internal tool template, you would update the models.py file. Here's an example of how to add a new Report model:

```python class Report(db.Model): id = db.Column(db.Integer, primary_key=True) title = db.Column(db.String(120), nullable=False) content = db.Column(db.Text, nullable=False) created_at = db.Column(db.DateTime, default=datetime.utcnow) author_id = db.Column(db.Integer, db.ForeignKey('allow_list.id'), nullable=False)

   author = db.relationship('AllowList', backref=db.backref('reports', lazy=True))

```

After adding the model, you would need to create a new migration file in the migrations folder to add the corresponding table to the database. This ensures that the database schema stays in sync with your application models.

Created: | Last Updated:

This is a great starting point to build a beatiful internal app. He template has has login with Google and magic link and team management features along with a nice look. The team management features are designed for internal tools so if a user is not on the allow list they will be rejected to enter the tool. Use this for cases where the final app will be used by a single internal team.

Here's a step-by-step guide for using the Flask-based Internal Tool Template with Google Sign-In and Team Management:

Introduction

This template provides a reusable internal tool built with Flask, featuring Google Sign-In and team management capabilities. It's designed for creating internal applications where access is restricted to specific users or email domains.

Getting Started

To begin using this template:

  1. Click "Start with this Template" in the Lazy Builder interface.

Test the Application

After starting with the template:

  1. Click the "Test" button in the Lazy Builder interface.
  2. Wait for the application to deploy and start.

Using the Application

Once the application is running:

  1. You'll receive a URL for your deployed application through the Lazy CLI.
  2. Open this URL in your web browser.

Configuring Team Access

The application allows you to manage team access through the admin dashboard:

  1. Log in using your Google account.
  2. If you're the first user, you'll automatically be added as an admin.
  3. Navigate to the "Company Admins" page from the sidebar.

Managing Allowed Users

To add individual users:

  1. Click "Add New Admin" on the Company Admins page.
  2. Enter the user's email address.
  3. Click "Add Admin" to save.

Managing Allowed Domains

To allow entire email domains:

  1. Click "Add New Email Ending" on the Company Admins page.
  2. Enter the email domain (e.g., "example.com").
  3. Click "Allow Domain" to save.

Blocking Users

To block specific users:

  1. Find the user in the Company Admins list.
  2. Click the "Block" button next to their email.

Unblocking Users

To unblock users:

  1. Locate the blocked user in the Company Admins list.
  2. Click the "Unblock" button next to their email.

Customizing the Application

You can customize the application by modifying the following files:

  • templates/home.html: Edit the content of the home page.
  • templates/partials/_navigation.html: Add or remove navigation items.
  • routes.py: Add new routes or modify existing ones.
  • static/css/styles.css: Customize the application's appearance.

Integrating with Other Services

This template is designed as a standalone internal tool. However, if you need to integrate it with other services, you can extend the routes.py file to add new API endpoints or functionality as required.

Remember to thoroughly test any changes or integrations to ensure they work correctly within your organization's infrastructure.



Template Benefits

  1. Rapid Internal Tool Development: This template provides a ready-to-use foundation for building internal web applications, significantly reducing development time and effort for creating company-specific tools.

  2. Secure Access Control: With built-in Google Sign-In and team management features, the template ensures that only authorized personnel can access the internal tool, enhancing security and data protection.

  3. Flexible User Management: The allow list, block list, and domain-based access features offer granular control over user access, making it easy to manage team members' permissions as the organization evolves.

  4. Professional UI/UX: The template includes a polished, responsive design with a sidebar navigation and custom styling, providing a professional look and feel right out of the box.

  5. Scalable Architecture: Built on Flask with SQLite database and Gunicorn server, the template offers a solid foundation that can be easily scaled and extended to accommodate growing business needs and additional features.

Technologies

Streamline CSS Development with Lazy AI: Automate Styling, Optimize Workflows and More Streamline CSS Development with Lazy AI: Automate Styling, Optimize Workflows and More
Optimize Your Django Web Development with CMS and Web App Optimize Your Django Web Development with CMS and Web App
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
Enhance HTML Development with Lazy AI: Automate Templates, Optimize Workflows and More Enhance HTML Development with Lazy AI: Automate Templates, Optimize Workflows and More
Optimize Google Sheets with Lazy AI: Automate Data Analysis, Reporting and More Optimize Google Sheets with Lazy AI: Automate Data Analysis, Reporting and More

Similar templates

We found some blogs you might like...