The Backend is a fundamental component of the AntiSMI project. It operates asynchronously using the FastAPI framework. This API retrieves various views of news articles stored in the project databases. The backend gets these views to the frontend of applications developed within the project, including Web-App, AntiSMI-bot and Timemachine-bot.
- Clone the repository
git clone https://github.com/data-silence/antiSMI-backend
- Copy
.env-non-dev
into the root project directory. Create directorymodels
and copy the categorisation model filecat_model.ftz
into it - Make sure that docker is installed on the server. Build the image from the destination directory using the command
docker build -t -backend
- Start the container using
docker run -d --rm --name backend -p 8000:8000 backend
- Your API server will start on port 8000
Important: you will not be able to deploy the API without access to step 2 and a specially prepared database.
- Framework: FastAPI
- Language: python, sqlalchemy
- Databases: postgreSQL, pgvector
- Validation: pydantic
- Server: gunicorn
- make registration and authorisation for limited access to API