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.
- 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
- 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
clone repo
git clone https://github.com/YarBurArt/insightful_guardian.gitcd insightful_guardianinstall poetry for py3 dependencies
pip install poetry install python dependencies
poetry install mongodb is configured for local connection, if sqlite or postgres then setup env variables in backend for DB connection like
DB1_NAME=web_db
DB1_USER=web_service
DB1_PORT=1234
DB1_PASS=password
DB1_HOST=ip
DB1_PATH=db.sqlite # optional
DB_ENGINE=postgresql # or sqliterun backend through uvicorn in poetry shell
poetry shell py backend/main.pycd frontendinstall react/js dependencies
npm installcompile styles from sass to css
npm run compile:sassrun react front (as a separate server)
npm startClosing 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