Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: build
on:
push:
branches: [main]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Compile
run: g++ -std=c++11 -O2 -o osim-security-simulation src/*.cpp -Iinclude
31 changes: 23 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# OSIM Security Simulation

[![build](https://github.com/Denarzai/Osim-Security-Simulation/actions/workflows/build.yml/badge.svg)](https://github.com/Denarzai/Osim-Security-Simulation/actions/workflows/build.yml)

## Project Overview
OSIM Security Simulation is a C++ console application that models an internal organizational environment with role-based access control (RBAC). It was built for an Object-Oriented Programming university course and focuses on secure operational workflows such as authentication, authorization, task handling, communications, audit logging, and anomaly reporting.

Expand All @@ -13,16 +15,25 @@ The system uses five organizational roles with increasing clearance:
Application state is persisted in text files (for example users, tasks, messages, notifications, audit logs, and performance data), so actions performed in the console menus are retained across runs.

## Class Design
The full UML class diagram is in `finalUML.pdf` (source: `projuml.drawio`).
The full UML class diagram is in `docs/finalUML.pdf` (source: `docs/projuml.drawio`).

![Class diagram](class-diagram.png)
![Class diagram](docs/class-diagram.png)

## Tech Stack
- Language: C++
- Standard libraries: iostream, string, ctime/cstdlib, fstream, iomanip, cstring
- Architecture style: Object-Oriented Programming (classes, inheritance, managers/singletons)
- Data storage: Plain text files in the project root
- Platform target: Console application (Windows-compatible)
- Data storage: Plain text files (sample data in `data/`)
- Platform target: Console application (cross-platform; developed on Windows)

## Repository Structure

| Path | Contents |
|------|----------|
| `src/` | Implementation files (`.cpp`) |
| `include/` | Headers (`.h`) |
| `data/` | Sample data files the application reads and writes |
| `docs/` | UML class diagram (PDF, draw.io source, PNG export) |

## Features
- Authentication and RBAC
Expand Down Expand Up @@ -71,11 +82,11 @@ The full UML class diagram is in `finalUML.pdf` (source: `projuml.drawio`).
## How to Compile and Run
The project does not include a build system file, so compile from source files directly.

### Option 1: g++ (MinGW)
### Option 1: g++
From the project root:

```bash
g++ -std=c++11 -O2 -o osim-security-simulation *.cpp
g++ -std=c++11 -O2 -o osim-security-simulation src/*.cpp -Iinclude
./osim-security-simulation
```

Expand All @@ -89,11 +100,15 @@ On Windows PowerShell, run:
From the project root:

```bat
cl /EHsc /std:c++14 *.cpp
cl /EHsc /std:c++14 /Iinclude src\*.cpp /Feosim-security-simulation.exe
osim-security-simulation.exe
```

Note: The application expects its text data files (such as users.txt, tasks.txt, inbox.txt, notification.txt, audit.txt, performanceLog.txt, preference.txt, anomalyLog.txt) in the same working directory.
Note: The application reads and writes its text data files (users.txt, tasks.txt, inbox.txt, notification.txt, audit.txt, performanceLog.txt, preference.txt, anomalyLog.txt) in the current working directory. Sample data lives in `data/` — copy it next to the binary before the first run:

```bash
cp data/*.txt .
```

## Role in Project
Built as a pair project for a university OOP course.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion dashboard.h → include/dashboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "audit.h"
#include "messageManager.h"
#include "notificationManager.h"
#include "perfomanceReview.h"
#include "performanceReview.h"
#include "policyEngine.h"
#include "taskManager.h"
#include "timeManager.h"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion user.h → include/user.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once
#include "pch.h"
#include "utilities.h"
#include "perfomanceReview.h"
#include "performanceReview.h"

class User {
protected:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion perfomanceReview.cpp → src/performanceReview.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "perfomanceReview.h"
#include "performanceReview.h"

PerformanceReview::PerformanceReview(string n, string r)
: name(n), role(r), tasksCompleted(0), tasksOverdue(0),
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading