160 lines
4.8 KiB
Markdown
160 lines
4.8 KiB
Markdown
# Romanoff Fire Alarm Management System
|
|
|
|
A web-based application for managing fire alarm installation projects. Track jobs, budgets, schedules, phases, and materials with an intuitive dashboard interface.
|
|
|
|
## Features
|
|
|
|
- **Dashboard** - Overview with charts showing job status, budgets, completion rates, and team assignments
|
|
- **Job Management** - Create, edit, and track fire alarm installation projects with comprehensive details
|
|
- **Schedule Tracking** - Manage project phases (rough-in, trim, commissioning, final, turnover)
|
|
- **Materials Inventory** - Track material procurement, ordering, receipt, and delivery
|
|
- **Data Import** - Import project data from Excel spreadsheets
|
|
- **REST API** - Full API for programmatic access to all data
|
|
|
|
## Tech Stack
|
|
|
|
- **Backend**: Python 3, Flask, SQLAlchemy
|
|
- **Database**: SQLite (default)
|
|
- **Frontend**: Bootstrap 5, Chart.js, Vanilla JavaScript
|
|
- **Data Processing**: Pandas, OpenPyXL
|
|
|
|
## Installation
|
|
|
|
### Prerequisites
|
|
|
|
- Python 3.8 or higher
|
|
- pip (Python package manager)
|
|
|
|
### Setup
|
|
|
|
1. Clone the repository:
|
|
```bash
|
|
git clone <repository-url>
|
|
cd romanoff
|
|
```
|
|
|
|
2. Create and activate a virtual environment:
|
|
```bash
|
|
python -m venv .venv
|
|
source .venv/bin/activate # On Windows: .venv\Scripts\activate
|
|
```
|
|
|
|
3. Install dependencies:
|
|
```bash
|
|
pip install -r requirements.txt
|
|
```
|
|
|
|
4. Run the application:
|
|
```bash
|
|
python run.py
|
|
```
|
|
|
|
5. Open your browser and navigate to `http://localhost:5000`
|
|
|
|
## Configuration
|
|
|
|
The application can be configured using environment variables:
|
|
|
|
| Variable | Description | Default |
|
|
|----------|-------------|---------|
|
|
| `SECRET_KEY` | Flask secret key for sessions | `dev-secret-key-change-in-production` |
|
|
| `DATABASE_URL` | Database connection string | `sqlite:///romanoff.db` |
|
|
|
|
## Usage
|
|
|
|
### Dashboard
|
|
|
|
The main dashboard provides an at-a-glance view of all projects:
|
|
- Summary cards showing total jobs, budget, average completion, and estimates
|
|
- Charts for job status distribution, budget by vendor, and completion progress
|
|
- Recent jobs table with progress indicators
|
|
|
|
### Managing Jobs
|
|
|
|
1. Navigate to **Jobs** in the navigation bar
|
|
2. Click **Add New Job** to create a project
|
|
3. Fill in project details including budget, team assignments, and milestones
|
|
4. View job details by clicking on a job row
|
|
5. Edit or delete jobs from the detail view
|
|
|
|
### Schedule Management
|
|
|
|
1. Navigate to **Schedule** to view all project phases
|
|
2. Filter by job, phase type, or completion status
|
|
3. Track mobilization dates, due dates, and men on site
|
|
4. Monitor which phases have met their due dates
|
|
|
|
### Materials Tracking
|
|
|
|
1. Navigate to **Materials** to view inventory across all jobs
|
|
2. Filter by part number, job, or status (pending/ordered/received)
|
|
3. Track ordering, receipt, and delivery of materials
|
|
4. Update material status inline
|
|
|
|
### Importing Data
|
|
|
|
To import data from Excel files:
|
|
|
|
```bash
|
|
python import_data.py
|
|
```
|
|
|
|
This imports from:
|
|
- `Raleigh jobs FIRE ALARM INFORMATION.xlsx` - Job records
|
|
- `schedule_updated.xlsm` - Schedule/phase data
|
|
|
|
## Project Structure
|
|
|
|
```
|
|
romanoff/
|
|
├── run.py # Application entry point
|
|
├── import_data.py # Excel data import utility
|
|
├── requirements.txt # Python dependencies
|
|
├── README.md # This file
|
|
├── API.md # API documentation
|
|
├── DEVELOPMENT.md # Developer guide
|
|
├── app/
|
|
│ ├── __init__.py # Flask app factory
|
|
│ ├── models.py # Database models
|
|
│ ├── routes.py # Routes and API endpoints
|
|
│ ├── templates/ # Jinja2 HTML templates
|
|
│ │ ├── base.html
|
|
│ │ ├── dashboard.html
|
|
│ │ ├── jobs.html
|
|
│ │ ├── job_detail.html
|
|
│ │ ├── job_form.html
|
|
│ │ ├── schedule.html
|
|
│ │ └── materials.html
|
|
│ └── static/
|
|
│ ├── css/
|
|
│ │ └── style.css
|
|
│ └── js/
|
|
│ └── app.js
|
|
└── instance/ # Instance-specific data (database)
|
|
```
|
|
|
|
## API
|
|
|
|
See [API.md](API.md) for complete REST API documentation.
|
|
|
|
### Quick Reference
|
|
|
|
| Endpoint | Method | Description |
|
|
|----------|--------|-------------|
|
|
| `/api/stats` | GET | Dashboard statistics |
|
|
| `/api/jobs` | GET, POST | List/create jobs |
|
|
| `/api/jobs/<id>` | GET, PUT, DELETE | Get/update/delete job |
|
|
| `/api/jobs/<id>/phases` | GET, POST | List/create phases for job |
|
|
| `/api/phases/<id>` | PUT, DELETE | Update/delete phase |
|
|
| `/api/materials` | GET | List all materials |
|
|
| `/api/jobs/<id>/materials` | GET, POST | List/create materials for job |
|
|
| `/api/materials/<id>` | PUT, DELETE | Update/delete material |
|
|
|
|
## Development
|
|
|
|
See [DEVELOPMENT.md](DEVELOPMENT.md) for architecture details and contribution guidelines.
|
|
|
|
## License
|
|
|
|
[Add license information here]
|