Skip to content

Latest commit

Β 

History

74 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

User-Friendly System Call Interface for Enhanced Security

πŸ“‘ Table of Contents

Project structure

User-Friendly-System-Call-Interface-for-Enhanced-Security/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ app.py
β”‚   β”œβ”€β”€ config.py
β”‚   β”œβ”€β”€ database/
β”‚   β”œβ”€β”€ routes/
β”‚   β”œβ”€β”€ utils/
β”‚   └── ssci_files/
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ index.html
β”‚   β”œβ”€β”€ css/
β”‚   β”œβ”€β”€ js/
β”‚   └── pages/
β”œβ”€β”€ database/
β”œβ”€β”€ docs/
└── requirements.txt

Prerequisites

Before running the project, make sure you have:

  • Python 3.10 or newer
  • pip
  • A browser like Chrome, Edge, or Firefox

Local setup instructions

1) Clone the repository

git clone https://github.com/sushantranjan912/User-Friendly-System-Call-Interface-for-Enhanced-Security.git
cd User-Friendly-System-Call-Interface-for-Enhanced-Security

2) Create a virtual environment

Windows

python -m venv venv
venv\Scripts\activate

macOS / Linux

python3 -m venv venv
source venv/bin/activate

3) Install the Python dependencies

The dependency file is in the project root.

pip install -r requirements.txt

4) Optional: configure environment variables

The app reads values from a .env file through python-dotenv.

You can create a .env file inside backend/ and add values like these:

SECRET_KEY=your-secret-key
JWT_SECRET_KEY=your-jwt-secret
DATABASE_PATH=database/database.db
ENCRYPTION_KEY=your-fernet-key

If you skip this step, the project uses development defaults, but custom values are better for real use.

5) Run the backend server

Go into the backend folder and start Flask directly.

cd backend
python app.py

On Windows, if python does not work, try:

py app.py

6) Open the app in your browser

Visit:

http://localhost:5000

The Flask server serves the frontend from the same address, so there is no separate frontend startup command.


Correct runtime command

This project uses Flask, not FastAPI.

So the correct command is:

python app.py

Not:

uvicorn main:app --reload

How to use the app

For a normal user

  • register or log in
  • upload or manage allowed files
  • run only permitted system commands
  • view personal logs and history
  • restore deleted files from the recycle bin if allowed

For an admin

  • manage users and view broader system activity
  • see audit logs and security events
  • monitor file actions and command history
  • review unauthorized or failed actions

For a viewer

  • access only limited read-only actions
  • no edit or destructive permissions

Dependencies explained

Flask

Flask is the web framework used to build the backend server and API routes.

Flask-CORS

This helps the frontend talk to the backend during local development.

PyJWT

Used to create and verify login tokens after authentication.

bcrypt

Used to hash passwords safely before storing them in the database.

python-dotenv

Loads values from a .env file so secret settings do not have to be hard-coded.

cryptography

Used here for secure encryption and decryption of sensitive log details.


Main API areas

The backend is organized into separate routes for clarity:

  • /api/auth β†’ register, login, logout
  • /api/system β†’ approved system command execution and history
  • /api/files β†’ file manager actions
  • /api/recycle-bin β†’ restore or permanently delete removed files
  • /api/logs β†’ audit logs and log statistics

How to test

  1. Open the project in your editor and check that README.md has clear setup steps.
  2. Create and activate the virtual environment.
  3. Install dependencies with pip install -r requirements.txt.
  4. Run the backend using python app.py from the backend folder.
  5. Open http://localhost:5000 in your browser.
  6. Check that the frontend loads and the API responds normally.

You can also test the API by opening:

http://localhost:5000/api/test

based on your requirements.


About

No description, website, or topics provided.

Resources

Code of conduct

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages