Skip to content
Open
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
131 changes: 131 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,133 @@
# BOS
BOS (Bugema Operating System) the internet OS! Free, Open Source, Self hostable

Setup Instructions

Follow these steps to set up and run BOS (Bugema Operating System) locally.

📋 Prerequisites

Ensure you have the following installed:
Node.js (v16 or higher)
Git
npm (comes with Node.js)

📥 Installation

Clone the repository
git clone https://github.com/your-username/bos.git
cd bos

<!-- Install dependencies -->
npm install

<!-- Set up environment variables -->
Create a .env file in the root directory and add:
PORT=3000
API_TOKEN=your_secret_token

<!-- Start the server -->
npm start
✅ Verify Setup

<!-- Open your browser or run: -->
curl http://localhost:3000/api/status

You should receive a response indicating the system is running.

📡 API Documentation

This section provides an overview of available API endpoints in BOS and how to interact with them.

🔐 Authentication

Some endpoints may require authentication.

Authentication is done using an API Token
The token should be included in the request headers
Format:
Authorization: Bearer <your_token>

If authentication is not required for an endpoint, it will be specified.

📍 Endpoints
1. Get System Status

Endpoint: /api/status
Method: GET
Authentication: Not required

Description:
Returns the current status of the BOS system.

Request Example:

Method: GET
URL: /api/status

Response Example:

Status: Success
Data:
system: running
uptime: 24 hours
2. Get Users

Endpoint: /api/users
Method: GET
Authentication: Required

Description:
Retrieves a list of all users in the system.

Request Example:

Method: GET
URL: /api/users
Header: Authorization token required

Response Example:

Status: Success
Data:
user1: John
user2: Mary
3. Create User

Endpoint: /api/users
Method: POST
Authentication: Required

Description:
Creates a new user in the system.

Request Example:

Method: POST
URL: /api/users
Body:
name: John Doe
email: john@example.com

Response Example:

Status: Success
Message: User created successfully
4. Delete User

Endpoint: /api/users/{id}
Method: DELETE
Authentication: Required

Description:
Deletes a user by ID.

Request Example:

Method: DELETE
URL: /api/users/1

Response Example:

Status: Success
Message: User deleted successfully