Skip to content

Latest commit

 

History

History
74 lines (69 loc) · 2.44 KB

README.md

File metadata and controls

74 lines (69 loc) · 2.44 KB

Insightful guardian

This is a repository created for learning goals, I'm actually trying to create an analog of telegra.ph, but with a different content moderation and search. I see the problem and try to fix it, but there is no docker image or anything else that can be deployed on a production server. Where I know how to do more efficiently I write, otherwise I ask generative AI. There's fullstack development on FastAPI, React, MongoDB.

docs/architecture.md

docs/contribution.md

Requirements

Backend

  • what = "version" -- why
  • poetry ---- to install all
  • python = "^3.10" -------- minimal python version
  • fastapi = "^0.111.0" ---------- async API backend
  • fastapi-cors = "^0.0.6" ---------- http operations
  • motor = "^3.4.0" ---------------- async mongodb
  • faker = "^25.2.0" ------------- generate test data
  • nltk = "^3.8.1" ------------ data for moderations
  • pandas = "^2.2.2" - load and process signatures
  • better-profanity = "^0.7.0" --- moderate by lib

Frontend

  • npm ---- to install all
  • "axios": "^1.6.8", ------------ aio http requests
  • "react": "^18.3.1", -------- base front framework
  • "react-dom": "^18.3.1", ---------- render DOM api
  • "react-router-dom": "^6.23.1", -- front endpoints
  • "react-scripts": "^5.0.1", -------- project tools
  • "snyk": "^1.1291.0" ---------- test security code

Install and use

Backend

clone repo

git clone https://github.com/YarBurArt/insightful_guardian.git
cd insightful_guardian

install poetry for py3 dependencies

pip install poetry 

install python dependencies

poetry install  

run backend through uvicorn in poetry shell

poetry shell 
py backend/main.py

Frontend

cd frontend

install react/js dependencies

npm install

compile styles from sass to css

npm run compile:sass

run react front (as a separate server)

npm start

Closing is better to start with the frontend, then the backend, then the environments. I write tasks directly in the code via TODO: for convenience and clarity. Just relax, I know it's not the best code, but it works well enough