Skip to content

Repository files navigation

Jail Procurement Management System

A desktop procurement and operations platform built for managing public procurement workflows in correctional facilities. The application combines secure user authentication, jail and organization records, tender lifecycle management, food supply tracking, and financial controls such as pay orders and performance securities.

This project is implemented as a Tauri desktop application with a React + TypeScript frontend and a Rust + PostgreSQL backend, providing a modern, secure, and local-first system for institutional procurement management.

Overview

The system is designed to support procurement processes commonly required by jail administration and public-sector operations, including:

  • Managing jail and organizational records
  • Creating and tracking procurement tenders
  • Managing participants, bids, and winner selection
  • Monitoring pay orders and performance security obligations
  • Maintaining product and unit catalogs for food and supply management
  • Creating and tracking purchase vouchers with associated items

Core Features

  • Secure authentication and session validation using JWT-based access flow
  • Jail registry management with create and list operations
  • Organization administration for suppliers and stakeholders
  • Tender creation, listing, and detailed bid review
  • Bid participant tracking and winner assignment
  • Pay order release workflow
  • Performance security tracking and release
  • Unit and product management for food and procurement items
  • Purchase voucher management with line items
  • Desktop-first experience with Tauri for cross-platform deployment

Technology Stack

Frontend

  • React 19
  • TypeScript
  • Vite
  • Tailwind CSS
  • TanStack Router
  • TanStack Query
  • shadcn/ui-inspired component library
  • Lucide icons

Desktop Runtime

  • Tauri 2

Backend

  • Rust
  • PostgreSQL
  • SQLx
  • JWT authentication
  • Argon2 password hashing
  • serde/serde_json for structured API payloads

Project Structure

.
├── LICENSE
├── README.md
├── package.json
├── bun.lock
├── components.json
├── index.html
├── public/
├── src/
│   ├── components/
│   ├── definitions/
│   ├── helpers/
│   ├── hooks/
│   ├── lib/
│   ├── routes/
│   ├── styles/
│   ├── utils/
│   ├── main.tsx
│   └── routeTree.gen.ts
├── src-tauri/
│   ├── Cargo.toml
│   ├── capabilities/
│   ├── icons/
│   ├── migrations/
│   ├── src/
│   ├── tauri.conf.json
│   └── build.rs
└── tsconfig*.json

Prerequisites

Before running the project locally, make sure you have installed:

  • Bun 1.x or newer
  • Node.js 18+ or newer (required as a runtime dependency for Bun-based tooling)
  • Rust toolchain (including Cargo)
  • PostgreSQL 14+ running locally
  • Tauri prerequisites for your platform

Getting Started

1. Install frontend dependencies

This project is configured and preferred for Bun. Use Bun for all local setup and development commands.

bun install

Do not use npm, yarn, or pnpm for project setup unless you are intentionally running a custom local workflow outside the recommended setup.

2. Configure PostgreSQL

The backend currently connects to a local PostgreSQL database using the following connection string in the application setup:

postgresql://postgres@localhost:5432/jail-procurement-new

Create the database if it does not already exist, or update the connection string in:

  • src-tauri/src/lib.rs

Then apply the migration files in src-tauri/migrations using your preferred migration workflow.

3. Run the application in development mode

bun run tauri dev

This starts the Tauri desktop app and launches the React frontend together with the Rust backend.

4. Production build

bun run tauri build

Available Functional Modules

Authentication

  • Register new users
  • Log in to the system
  • Validate stored auth tokens

Jail Management

  • Create new jail records
  • View and manage the list of jails

Organization Management

  • Create organizations
  • Filter and review organizational data

Tender Management

  • Create tenders
  • List tenders
  • View tender details with participant bids
  • Assign winner participants

Payment & Security Controls

  • Release pay orders
  • Add and release performance security records

Food & Inventory

  • Create units
  • Create products
  • Search and manage food-related items
  • Prepare voucher entries from product catalog data

Procurement Vouchers

  • Generate purchase vouchers with products and related metadata

Development Notes

The app follows a modular architecture:

  • src/ contains the React UI, route definitions, hooks, utilities, and design system components
  • src-tauri/src/commands/ exposes backend commands for each domain and workflow
  • src-tauri/src/services/ contains the business logic layer
  • src-tauri/src/domain/ defines request/response models and domain types
  • src-tauri/migrations/ contains the PostgreSQL schema evolution files

Developer Contact

For project-related questions, licensing inquiries, or support requests, contact:

Usage Permission and Contribution Notice

Permission is required before using this project in any capacity beyond personal evaluation or review.

Contributions are allowed, but all contributions should be discussed with the project maintainer before being submitted or merged.

License

This project is licensed under the Shourov Roy Source License v1.0. See the LICENSE file for details.

Notes

This repository is organized around a desktop-first procurement workflow and is ideal for internal institutional use where operational control, auditing, and structured procurement records are required.

About

Tauri, Rust, React, Vite 8, Tanstack Router, Query, Form, Postgres crossplatform GUI Public Jail Procurement Application

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages