A modern, cross-platform desktop application for managing office supplies and inventory, built with Next.js, Tauri, and SQLite.
- User Management: Secure authentication and role-based access control (Admin, Staff, Viewer)
- Inventory Management: Track supplies, quantities, and locations with intelligent stock status calculation
- Stock Movement: Monitor stock in/out with detailed history and user attribution
- Advanced Reporting: Generate low-stock alerts and movement reports with modern PDF exports
- Data Visualization: Interactive charts and graphs for stock movement analysis
- Email Notifications: Password reset functionality with SMTP support
- Cross-Platform: Works on Windows, macOS, and Linux
- Offline-First: Local SQLite database for reliable operation
- Modern UI: Beautiful, responsive interface built with Tailwind CSS and shadcn/ui
- Node.js 18+ and npm
- Rust 1.77+ and Cargo
- Git
# Install Node.js from https://nodejs.org/
# Install Rust
winget install Rust.Rust
# or
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh# Install Node.js
brew install node
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh# Install Node.js
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh-
Clone the repository
git clone <repository-url> cd ossms
-
Install dependencies
npm install
-
Build the application
npm run tauri:build:clean
npm run tauri dev# Using the production build script (Recommended)
.\build-production.ps1
# Or manually
npm run build
cd src-tauri
cargo build --release# Windows
.\build.ps1
# Unix/Linux/macOS
./build.sh| Script | Description | Use Case |
|---|---|---|
npm run dev |
Development server | Local development |
npm run tauri dev |
Tauri development | Desktop app development |
npm run build |
Next.js build | Frontend only |
npm run tauri:build |
Tauri build | Production build |
npm run tauri:build:clean |
Clean Tauri build | Remove build artifacts |
npm run tauri:build:fresh |
Fresh Tauri build | Complete rebuild |
.\build-production.ps1 |
Production build script | Automated production build |
ossms/
βββ app/ # Next.js app directory
β βββ (dashboard)/ # Dashboard routes
β β βββ dashboard/ # Main dashboard
β β βββ inventory/ # Inventory management
β β βββ item-history/ # Stock movement history
β β βββ reports/ # Reporting system
β β βββ users/ # User management
β βββ globals.css # Global styles
β βββ layout.tsx # Root layout
βββ components/ # React components
β βββ ui/ # UI components (shadcn/ui)
β βββ services/ # API services
βββ lib/ # Utility functions
β βββ utils.ts # Stock status calculation
β βββ permissions.ts # Role-based access control
β βββ actions.ts # API actions
βββ src-tauri/ # Rust backend
β βββ src/ # Rust source code
β βββ Cargo.toml # Rust dependencies
β βββ tauri.conf.json # Tauri configuration
βββ public/ # Static assets
βββ hooks/ # Custom React hooks
Create a .env.local file for local development:
NEXT_PUBLIC_APP_NAME=OSSMS
NEXT_PUBLIC_APP_VERSION=1.0.0For password reset functionality, update the hardcoded credentials in src-tauri/src/main.rs:
// Hardcoded email configuration
const SMTP_EMAIL: &str = "your-email@gmail.com"; // Replace with your email
const SMTP_PASSWORD: &str = "your-app-password"; // Replace with your app passwordNote: For Gmail, you need to:
- Enable 2-Factor Authentication
- Generate an App Password (16 characters, no spaces)
- Replace the values in the code with your actual credentials
The application uses SQLite for data storage. The database is automatically created at:
- Windows:
%LOCALAPPDATA%\.ossms\ossms.db - macOS:
~/Library/Application Support/.ossms/ossms.db - Linux:
~/.local/share/.ossms/ossms.db
- Frontend: TypeScript, ESLint, Prettier
- Backend: Rust with clippy
- Styling: Tailwind CSS with shadcn/ui components
# Run linting
npm run lint
# Type checking
npx tsc --noEmitThe database schema is defined in src-tauri/src/database.rs. Sample data is automatically seeded on first run.
# Automated production build
.\build-production.ps1
# Or manual build
npm run build
cd src-tauri
cargo build --releaseThe executable will be created in src-tauri/target/release/:
- Windows:
app.exe - macOS:
app.app - Linux:
app
- Windows: Use the
.exefile directly - macOS: Create a
.dmgfrom the.appbundle - Linux: Package as
.deb,.rpm, or.AppImage
- Memory Issues: Use
npm run build:high-memory - Rust Issues: Run
rustup updateandcargo clean - Node Issues: Clear cache with
npm run build:clean
# Reset database (WARNING: This will delete all data)
# Windows
Remove-Item "$env:LOCALAPPDATA\.ossms\ossms.db"
# Unix/Linux/macOS
rm ~/.local/share/.ossms/ossms.db- "Failed to parse Cargo.toml": Check for duplicate sections
- "Invalid next.config.mjs": Remove deprecated options
- "jobs may not be 0": Fix
.cargo/config.tomlsettings - "linking with rust-lld failed": Ensure Tauri CLI is installed
POST /api/login- User authenticationPOST /api/forgot-password- Request password resetPOST /api/reset-password- Reset password with tokenGET /api/users- Get all usersPOST /api/users- Create new user
GET /api/supplies- Get all suppliesPOST /api/supplies- Create new supplyPUT /api/supplies/:id- Update supplyDELETE /api/supplies/:id- Delete supply
GET /api/history- Get supply historyDELETE /api/history/:id- Delete history record
GET /api/reports/low-stock- Get low stock reportGET /api/reports/stock-movement- Get stock movement report
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
See CONTRIBUTING.md for detailed guidelines.
This project is licensed under the MIT License - see the LICENSE file for details.
This software includes logos from the University of Santo Tomas and the College of Information and Computing Sciences. These logos are used for educational purposes only and are not part of the MIT license. See LOGO_LICENSE.md for detailed usage guidelines and restrictions.
- Issues: GitHub Issues (Coming Soon)
- Documentation: Wiki (Coming Soon)
- Discussions: GitHub Discussions (Coming Soon)
- In-App Support: Use the Support page within the application
- Email Support: Contact your system administrator
- Local Documentation: See DOCUMENTATION.md for detailed guides
- Data Backup: See BACKUP_GUIDE.md for backup and recovery procedures
- Troubleshooting: Check the Troubleshooting section above
- Multi-language support
- Advanced reporting with charts
- Barcode scanning
- Cloud synchronization
- Mobile app
- API for external integrations
- Configurable stock status thresholds
- Advanced alerts and notifications
OSSMS - Making office supply management simple and efficient.