/test

Primary LanguagePythonMIT LicenseMIT

Template full stack application

Build Status

Description

Web-app on JS with Python JSON-RPC API

Form Side Stack Language Path
API Back-end FastAPI Python api/
Web app Front-end React JavaScript web/
Telegram bot Back-end AIOGram Python tg/
iOS Front-end React Native JavaScript planned
Android Front-end React Native JavaScript planned

Stack

Side Logo Technology Version
DevOps Docker Docker 20.10.8
NGINX NGINX 1.19.6
Let's Encrypt Let's Encrypt
Back-end Python Python 3.9.1
FastAPI FastAPI 0.63.0
MongoDB MongoDB 4.4.2
Socket.IO Socket.IO
Front-end JavaScript node 15.5.1
ReactJS ReactJS 16.14.0
Redux Redux 4.0.5
Bootstrap Bootstrap 4.1.3
CKEditor CKEditor 5

Install & Use with Docker

Development

  1. Customize file docker/.env & Makefile

  2. Run

make run
  1. Open

Go to http://localhost/

Production (dedicated server)

  1. Customize file docker/.env & Makefile

  2. Create encryption keys

cd docker/
chmod 777 cert.sh
./cert.sh
  1. Run Docker Compose
docker-compose -f docker-compose.alone.yml -p web up --build

(your project name instead of web)

  1. Open

Go to https://web.kosyachniy.com/ (your link)

Production (with multiple projects)

  1. Customize files docker/.env & Makefile

  2. Run Docker Compose

cd docker/
docker-compose -f docker-compose.prod.yml -p web up --build

(your project name instead of web)

  1. Set up NGINX using docker/server/nginx.server.conf (if not done)

More: SERVER.md

  1. Open

Go to https://web.kosyachniy.com/ (your link)

Install & Use without Docker

Back-end

  1. Change folder
cd api/
  1. Customize file sets.json

  2. Virtual environment

python3 -m venv env
env/bin/pip install -r requirements.txt
  1. Run
env/bin/uvicorn app:app --host 0.0.0.0 --port 5000 --proxy-headers --reload

Front-end

  1. Change folder
cd web/
  1. Customize file src/sets.json

  2. Virtual environment

npm install
  1. Run

Development

npm start

Production

npm run build
serve -s build -p 3000