LDS Stake Portal

Quickstart

Get the LDS Stake Portal running locally in under 10 minutes

This guide gets you from zero to a running local instance. For production deployment, see Docker Compose or Manual deployment.

Prerequisites

  • Node.js 18 or later
  • Python 3.11 or later
  • uv (Python package manager)
  • Git

1. Clone the repository

git clone https://github.com/rc27122/LDS_Stake_Website-Template-2.git
cd LDS_Stake_Website-Template-2

2. Set up the backend

cd backend
uv sync

Create a .env file:

cat > .env << 'EOF'
DEV=true
PORT=8000
DB_ENGINE=sqlite
DATABASE_PATH=./database.db
INITIAL_ADMIN_PASSWORD=admin123
JWT_SECRET_KEY=change-me-to-a-random-secret
SSL_ENABLED=false
SP_APPROVAL_THRESHOLD=2
HC_APPROVAL_THRESHOLD=3
EOF

Start the backend (first run seeds the admin account):

uv run python main.py

On first launch, the backend creates the [email protected] account with your INITIAL_ADMIN_PASSWORD and loads ward data from wards.csv. You will be prompted to change the password on first login.

3. Set up the frontend

Open a new terminal:

cd frontend
npm install
npm run dev

4. Open the portal

Navigate to http://localhost:3100 in your browser.

Log in with:

You will be redirected to change your password before accessing the portal.

Next steps

On this page