Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ElthonJohan/Sistema-MRP/llms.txt

Use this file to discover all available pages before exploring further.

This quickstart walks you through cloning the repository, installing dependencies, configuring your database connection, and running Sistema MRP for the first time. By the end you will have the application running at http://localhost:8501 and be ready to log in.
1

Clone the repository and create a virtual environment

Clone the repository and set up an isolated Python environment:
git clone https://github.com/ElthonJohan/Sistema-MRP.git
cd Sistema-MRP
python -m venv venv
Then activate the virtual environment:
venv\Scripts\activate
2

Install dependencies

Install all required packages from requirements.txt:
pip install -r requirements.txt
Key packages installed include streamlit, sqlalchemy, psycopg2-binary, bcrypt, fpdf2, plotly, and python-dotenv.
3

Configure the database URL

Create a .env file in the project root and set the DATABASE_URL variable. Choose the variant that matches your environment:
.env
DATABASE_URL=sqlite:///./mrp.db
SQLite requires no additional setup — the database file is created automatically when you run init_db.py.
4

Initialize the database

Run the initialization script once before starting the app:
python init_db.py
This script does three things in order:
  1. Creates all tables — calls Base.metadata.create_all, creating any tables that do not yet exist.
  2. Runs migrations — executes run_migrations(), which applies additive ALTER TABLE statements (safe to re-run on existing databases).
  3. Seeds the superadmin account — creates the superadmin user with the default password if it does not already exist.
5

Run the application

Start the Streamlit development server:
streamlit run app.py
The app opens at http://localhost:8501.
app.py is a legacy shell — it renders a brief hero page and immediately redirects users to pages/login.py, which is the real entry point. You will land on the login screen automatically.
6

Log in

On the login screen you have two options:
  • Superadmin access — log in with username superadmin and password Admin123! to reach the admin panel (pages/admin.py), where you can manage client accounts and view access logs.
  • Client access — register a new client account from the login page to access the operational dashboard (pages/dashboard.py).
Change the default superadmin password immediately after your first login. The default credentials (superadmin / Admin123!) are seeded automatically and are publicly known.

Build docs developers (and LLMs) love