The project uses Streamlit to create the graphical interface in Python and integrates with a PostgreSQL database.
Follow these steps to set up and run the project on a Linux system:
- Python 3.x installed
- Docker installed
- Docker Compose installed
- run
python3 -m venv venv - run
source ./venv/bin/activate - run
pip install -r requirements.txt - run
docker-compose up -d - run
streamlit run src/App.py
The project follows the following folder structure:
- The
src/directory contains the project's source code, including subdirectories for the database, API functions, and Streamlit screens. - The
db/directory holds files related to the database, including theschema.sqlfile that defines the database structure. - The
api/directory contains API functions, each file corresponding to interactions with a specific database table. - The
_pages/directory hosts Streamlit screens, with each file representing a separate screen of the application. - The
App.pyfile in thesrc/directory serves as the main entry point that calls the Streamlit screens. - The
requirements.txtfile lists Python dependencies. - The
.envfile is used for configuring environment variables. - The
docker-compose.ymlfile is the Docker Compose configuration for setting up the PostgreSQL database.
This organized structure helps keep the project clean and facilitates maintenance and code expansion.
Notes:
- All screen, function and variable names must follow the snake_case pattern
- Page file names must start with a capital letter