Skip to content

su7ox/Web-OS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🖥️ Web-OS Simulation

Project Status License PHP

Web-OS Simulation is a lightweight, browser-based operating system emulator built with PHP, HTML5, CSS3, and JavaScript. It mimics a real desktop environment, allowing users to log in, manage files, run terminal commands, and execute C code—all within the browser.


🚀 Key Features

  • 🔐 Secure Login System: User authentication with session management and user switching capabilities.
  • 🖥️ Interactive Desktop:
    • Draggable desktop icons.
    • Live clock and date widget.
    • Functional Start Menu and Taskbar.
  • 💻 Virtual Terminal: A command-line interface supporting commands like ls, cd, mkdir, touch, echo, cat, and clear.
  • 📂 File Manager: Browse directories, view files, and manage content with a PHP-backend.
  • 📝 Text Editor: Create, edit, and save text files directly in the OS.
  • ⚙️ C Code Runner: Integrated environment to write and execute C programs (e.g., QuickSort) directly from the web interface.
  • 🎨 Customization: System settings to personalize the user experience.

🛠️ Tech Stack

Component Technology
Frontend HTML5, CSS3, JavaScript (Vanilla)
Backend PHP (Session handling, file I/O, Database auth)
Database MySQL (User credentials)
Data JSON (Folder structures)

📂 Project Structure

OS-Simulation/
├── code/           # C compiler & execution logic
├── desktop/        # Main desktop environment (icons, taskbar, clock)
├── filemanager/    # File explorer system (JSON + PHP)
├── login/          # User authentication & database connection
├── logout/         # Session destruction scripts
├── settings/       # User preference settings
├── terminal/       # Terminal command parsing & logic
└── texteditor/     # Notepad-like application


⚙️ Installation & Setup

This project requires a standard PHP server environment like XAMPP, WAMP, or MAMP.

1️⃣ Clone the Repository

git clone [https://github.com/yourusername/web-os.git](https://github.com/yourusername/web-os.git)

2️⃣ Configure Server Directory

  1. Move the project folder to your local server's root directory.
  • XAMPP: C:\xampp\htdocs\
  • MAMP: /Applications/MAMP/htdocs/
  1. Important: Rename the folder to OS-Simulation to ensure all internal links work correctly.

3️⃣ Database Setup (Crucial for Login)

  1. Open phpMyAdmin (http://localhost/phpmyadmin).
  2. Create a new database named web_os (or whatever is defined in login/login.php).
  3. Run the following SQL command to create the users table:
CREATE TABLE users (
    id INT AUTO_INCREMENT PRIMARY KEY,
    username VARCHAR(50) NOT NULL,
    password VARCHAR(255) NOT NULL, -- Use password_hash() in production
    role VARCHAR(20) DEFAULT 'user'
);

-- Insert a default test user
INSERT INTO users (username, password) VALUES ('admin', 'password123');
  1. Optional: Update login/login.php if your database credentials differ from the default (root, empty password).

4️⃣ Start the Server

  1. Open your XAMPP/WAMP Control Panel.
  2. Start Apache (Web Server).
  3. Start MySQL (Database).

5️⃣ Run the Application

Open your browser and navigate to:

  • Login Page: http://localhost/OS-Simulation/login/index.html

  • Use the credentials you inserted in Step 3.

  • Desktop Direct Link: http://localhost/OS-Simulation/desktop/index.html

  • (Bypasses login - useful for UI testing)


📸 Screenshots

(Add screenshots of your Desktop, Terminal, and Login screen here)


🐛 Known Issues / Roadmap

  • Add directory persistence for the Terminal (currently resets on reload).
  • Improve mobile responsiveness for the desktop interface.
  • Add support for "drag and drop" file uploads.

🤝 Contributing

Contributions are welcome! Feel free to fork this repository and submit a pull request.


Developed by Manish

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published