Standard React FastAPI Environment

License OS Python

CI Python Lint pages-build-deployment CodeQL Advanced

Python Pytest FastAPI React Native TypeScript Jest Expo

🇺🇸 English | 🇮🇳 हिंदी | 🇯🇵 日本語 | 🇨🇳 简体中文 | 🇪🇸 Español | 🇧🇷 Português (Brasil) | 🇰🇷 한국어 | 🇩🇪 Deutsch | 🇫🇷 Français

"web_ui"

使用以下技术构建的 全栈开发环境


Features

  • 基于 Expo 的 跨平台 frontend
    • 可作为 web app 运行,也可通过 Expo Go 或 standalone builds 在 Android/iOS devices 上运行
  • CRUD operations : 创建、读取、更新、删除 records
  • Auth operations : Signup、Signin、Signout
  • 带 automatic docs 的 FastAPI backend
    • 提供 Swagger UI (/docs) 的 REST API

🚀 Getting Started

1. Prerequisites

2. Build 并 start 所有 services:

# set environment variables:
export REACT_NATIVE_PACKAGER_HOSTNAME=${YOUR_HOST}

# Build the image
docker compose build

# Run the container
docker compose up

3. Test:

# Backend pytest
docker compose \
  -f docker-compose.test.yml run \
  --rm \
  --entrypoint /bin/sh backend_test \
  -lc ' pytest -q '

# Backend Lint
docker compose \
  -f docker-compose.test.yml run \
  --rm \
  --entrypoint /bin/sh backend_test \
  -lc 'ruff check /app /tests'

# Frontend Test
docker compose \
  -f docker-compose.test.yml run \
  --rm frontend_test

4. 访问 services:

  • Backend API: http://localhost:8000/docs "backend"

  • Frontend UI (WEB): http://localhost:8081
  • Frontend UI (mobile): exp://${YOUR_HOST}:8081: 使用 Expo 提供的 QR 访问。 "expo"

License

  • Apache License 2.0