SmartMaatt / streamlit-fastapi-social-platform

Contains a social platform application with a frontend built using Streamlit and a backend using FastAPI, integrated with a Firebase database. The platform is designed to facilitate simple communication between the Streamlit system and the database through an API and to test the capabilities of Streamlit.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Streamlit FastAPI Social Platform

OverviewFeaturesInstallationUsageLicense

Overview

This repository contains a social platform application with a frontend built using Streamlit and a backend using FastAPI, integrated with a Firebase database. The platform is designed to facilitate simple communication between the Streamlit system and the database through an API and to test the capabilities of Streamlit, which is known for its somewhat limited features.

Features

  • Streamlit Frontend: A user-friendly interface for interacting with the platform.
  • FastAPI Backend: Robust API for efficient server-side processing.
  • Firebase Database Integration: Cloud-based database for secure and scalable data storage.

Installation

The entire setup is containerized using Docker Compose, ensuring easy and consistent deployment.

Prerequisites

  • Docker
  • Docker Compose

Setup Instructions

  1. FastAPI Container Setup:

    cd Fastapi
    docker build -t fastapi .
    docker run -d --name fastapi -p 8000:8000 fastapi
  2. Streamlit Container Setup:

    cd Streamlit
    docker build -t streamlit .
    docker run -d --name streamlit -p 8501:8501 streamlit
  3. Docker Compose:

    docker-compose build
    docker-compose up

Firebase Connection

To connect to Firebase:

  1. Create a config.py file in the main directory of the Streamlit app.
  2. Insert the firebaseConfig dictionary into config.py to establish a connection with the Firebase database.

Usage

The main frontend file (main.py in the Streamlit app directory) demonstrates the usage of various components such as authentication, database interactions, and UI elements.

Key Components:

  • Firebase Authentication: User authentication via Firebase.
  • Database Operations: CRUD operations with Firebase Realtime Database.
  • Custom Component Builder: A utility for incorporating custom styles and scripts.\

License

This project is licensed under the MIT License - see the LICENSE file for details.


© 2023 Mateusz Płonka (SmartMatt). All rights reserved.

PortfolioGitHubLinkedInYouTubeTikTok

About

Contains a social platform application with a frontend built using Streamlit and a backend using FastAPI, integrated with a Firebase database. The platform is designed to facilitate simple communication between the Streamlit system and the database through an API and to test the capabilities of Streamlit.

License:MIT License


Languages

Language:Python 88.1%Language:Groovy 6.2%Language:CSS 4.1%Language:Dockerfile 1.5%Language:JavaScript 0.1%