diff --git a/README.md b/README.md index 2973e74..1b5dd79 100644 --- a/README.md +++ b/README.md @@ -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 + + +npm install + + +Create a .env file in the root directory and add: +PORT=3000 +API_TOKEN=your_secret_token + + +npm start +✅ Verify Setup + + +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 + +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 \ No newline at end of file