All Projects → ais-one → favv

ais-one / favv

Licence: MIT license
Fullstack Web Application Framework With FastAPI + Vite + VueJS. Streamlit for rapid development.

Programming Languages

python
139335 projects - #7 most used programming language
javascript
184084 projects - #8 most used programming language
HTML
75241 projects
shell
77523 projects
Vue
7211 projects
Mako
254 projects
CSS
56736 projects

Projects that are alternatives of or similar to favv

cloudrun-fastapi
FastAPI on Google Cloud Run
Stars: ✭ 112 (+558.82%)
Mutual labels:  sqlalchemy, fastapi
fastrates
💵 Free & open source API service for current and historical foreign exchange rates.
Stars: ✭ 26 (+52.94%)
Mutual labels:  sqlalchemy, fastapi
FastAPI-Full-Stack-Samples
The API Application Development using Python FastAPI, including interactive API documentation
Stars: ✭ 61 (+258.82%)
Mutual labels:  sqlalchemy, fastapi
ChefAPI
API using FastAPI and PostgreSQL for sharing or keeping track of awesome food recipes Based on Oauth2 and JWT 💎
Stars: ✭ 16 (-5.88%)
Mutual labels:  sqlalchemy, fastapi
FRDP
Boilerplate code for quick docker implementation of REST API with JWT Authentication using FastAPI, PostgreSQL and PgAdmin ⭐
Stars: ✭ 55 (+223.53%)
Mutual labels:  sqlalchemy, fastapi
tifa
Yet another opinionated fastapi-start-kit with best practice
Stars: ✭ 82 (+382.35%)
Mutual labels:  sqlalchemy, fastapi
fastapi-starter
A FastAPI based low code starter: Async SQLAlchemy, Postgres, React-Admin, pytest and cypress
Stars: ✭ 97 (+470.59%)
Mutual labels:  sqlalchemy, fastapi
Bank-Note-Authentication
💸 Authenticate Bank Notes on the basis of Genuity and Forged using Sklearn and deployed on Heroku and FastAPI Server 💳 💲
Stars: ✭ 17 (+0%)
Mutual labels:  fastapi, streamlit
fastapi-debug-toolbar
A debug toolbar for FastAPI.
Stars: ✭ 90 (+429.41%)
Mutual labels:  sqlalchemy, fastapi
fastapi-sqlalchemy-1.4-async
https://rogulski.it/blog/sqlalchemy-14-async-orm-with-fastapi/
Stars: ✭ 17 (+0%)
Mutual labels:  sqlalchemy, fastapi
fastapi-saas-base
Fast API SAAS Base App
Stars: ✭ 47 (+176.47%)
Mutual labels:  sqlalchemy, fastapi
Text-Summarization
Abstractive and Extractive Text summarization using Transformers.
Stars: ✭ 38 (+123.53%)
Mutual labels:  fastapi, streamlit
react-antd-low-code
简易版 react 低代码平台
Stars: ✭ 45 (+164.71%)
Mutual labels:  antd, vite
Apollo
A basic Application with multiple functionalities built with FastAPI aim to help Users Buy New Items Provided using PaypalAPI 🚀
Stars: ✭ 22 (+29.41%)
Mutual labels:  sqlalchemy, fastapi
react-vite-admin
This Starter utilizes React, Recoil, React Query, React Hooks, Typescript, Axios And Vite. 全新技术栈的后台管理系统
Stars: ✭ 90 (+429.41%)
Mutual labels:  antd, vite
fast-api-sqlalchemy-template
Dockerized web application on FastAPI, sqlalchemy1.4, PostgreSQL
Stars: ✭ 25 (+47.06%)
Mutual labels:  sqlalchemy, fastapi
fastapi-boilerplate
FastAPI boilerplate for real world production
Stars: ✭ 145 (+752.94%)
Mutual labels:  sqlalchemy, fastapi
promotion-web
基于React: v18.x.x/Webpack: v5.x.x/React Router v6.x.x/ Antd: v5..x.x/Fetch Api/ Typescript: v4.x.x 等最新版本进行构建...
Stars: ✭ 374 (+2100%)
Mutual labels:  antd, vite
CourseCake
By serving course 📚 data that is more "edible" 🍰 for developers, we hope CourseCake offers a smooth approach to build useful tools for students.
Stars: ✭ 21 (+23.53%)
Mutual labels:  sqlalchemy, fastapi
antd-editable
A React component inherited from antd that can edit the table of a cell
Stars: ✭ 29 (+70.59%)
Mutual labels:  antd

About FAVV (FastAPI+ViteVue)

FastAPI Python backend (BE) and Vite + VueJS + Ant Design frontend (FE) template... for your API and Web application needs.

The difference between this project and https://github.com/ais-one/cookbook is described here

Also includes some samples in streamlit

Considerations

The following are considerations for the project. The aim is to allow things to be built faster and reduce maintenence overhead.

  • code reusability
  • application segregation inject your own frontend and backend project
  • ease of template upgrade
  • ci/cd and container friendly
  • microservices friendly
  • up to date dependencies
  • reducing technical debt
  • scalability

Roadmap & Updates

See CHANGELOG.md

Development - Setup and Run

Backend

python: 3.8.5, pip: 20.1.1

cd fastapi

# create environment called dev
python -m venv dev # python3 -m venv /path/to/new/virtual/env

# copy .env.example to .env, adjust your own custom env settings here
cp ./app/.env.example ./app/.env # common environment
cp ./app/.env.local.example ./app/.env.local # for local machine deployment
cp ./app/.env.docker-compose.example ./app/.env.docker-compose # for docker compose deployment

# copy requirements.txt.example to copy requirements.txt (point to your own custom requirements.txt inside)
cp ./requirements.txt.example ./requirements.txt

activate env in windows

# cmd 
dev\Scripts\activate
dev\Scripts\deactivate

# powershell
dev\Scripts\Activate.ps1
deactivate

activate env in linux

source dev/bin/activate 

Installing / Upgrading python packages

For framework

run fastapi/install.sh

For your own applications

Manage packages using fastapi/app/<custom_app>/requirements.txt

Or run fastapi/app/<custom_app>/install.sh

Run App & Task Quque (requires redis)

cd app

# fastapi application
python main.py # OPTION 1 - running using python
uvicorn main:app --reload --host=0.0.0.0 --port=3000 --access-log --log-level=debug --header server:none # OPTION 2 - running uvicorn

# HTTPS
# if using SSL include the following to uvicorn, also set USE_HTTPS in environment file
# --ssl-keyfile <path> - SSL key file --ssl-certfile <path> - SSL certificate file

# huey task queue consumer 
huey_consumer custom_app.models.tasks.huey

Navigate to - http://127.0.0.1:3000/api-docs

Note: if you use https and self-signed cert you may need to allow on browser

HTTPS

Generate your private key and...

Create a self-signed cert, or get a signed cert

openssl req -x509 -newkey rsa:4096 -keyout local.key.pem -out local.cert.pem -days 365 -nodes -subj '/CN=127.0.0.1'

Production Run (Docker)

cd ../fastapi
docker build -t <your-image-name>:<tag> .
docker run -it <your-image-name>:<tag>

Frontend

refer to vitevue/README.md

Streamlit

See streamlit/README.md for more information


Customization

Structure - Files / Folders For Customisation Or Use

+ favv
  + fastapi/
  | + app/
  | | + .env: backend config
  | | + <your-custom-backend>_app/: folder with suffix "_app" are your custom backend code, models, uploads (your backend repo)
  | |   + .gitignore: for your repo
  | |   + base.py: this file name is required, and an FastApi ApiRouter of the name router_<your-custom-backend>_app is needed
  | |   + requirments.txt: your dependencies
  | |   + models/ 
  | |     * tasks.py: custom task queue file
  | |   + uploads/
  | + .env: environment state, custom app name and version
  | + .env.<your-environment>: environment specific info
  | + Dockerfile.example: DO NOT TOUCH THIS, use this as an example for your own Dockerfile
  | + install.sh: DO NOT TOUCH THIS 
  | + requirements.base.txt: DO NOT TOUCH THIS
  + streamlit/
  | + app/ : demo application
  | + component-template/ : streamlit custom components
  |   + streamlit-antv: using antv charts on streamlit
  |   + streamlit-vite: basic example of using vite to build streamlit-components
  |   + streamlit-xui: extended UI components for streamlit
  + vitevue/
    + README.md

NOTES

  • All folders and files prefixed with TBD can be ignored, they are not implemented and used for reference

Backend Customization Notes

Setting up your custom backend

# in favv/fastapi/app/
# note that project name must end with suffix "_app"
git clone <your backend project e.g. example_app>
  • use favv/fastapi/app/custom_app/ as reference on your custom backend
    • on working with your custom endpoints, using db, s3, file services
    • working with files in favv/fastapi/app/custom_app/uploads/ folder
    • running subprocess in favv/fastapi/app/custom_app/models/ folder
  • set the APP, to the folder name of your custom app in favv/fastapi/app/.env
    • specify the VERSION and the ENVIRONMENT state (local, docker-compose, production, etc...)
    • specify APP which is your custom application, UPLOAD_FOLDER and MODEL_FOLDER is directly inside your custom app folder
    • set uour environment specific information in favv/fastapi/app/.env.
  • application path is favv/fastapi/app/ as main.py is run from there (either using python or uvicorn)
  • test endpoints in favv/fastapi/app/api/routes/test.py will not be available in production environment
  • NOTE: update favv/fastapi/app/config.py when .env entries change
  • NOTE: any code outside favv/fastapi/app will not auto reload

Notes

  • use fastapi/install.sh to update python libraries
  • for favv/fastapi .env host is redis if using docker compose 127.0.0.1 otherwise
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].