Skip to content

Commit

Permalink
add instructions to run the file
Browse files Browse the repository at this point in the history
  • Loading branch information
sambuaneesh committed Oct 19, 2024
1 parent a914a12 commit 88769da
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 5 deletions.
85 changes: 81 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,82 @@
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# goLLab - A Collaborative Document Editor

python client/client.py
This project is a collaborative document editor with a client-server architecture using gRPC for communication.

## Quick Start

To quickly build and run the project:

1. Make the build script executable:
```
chmod +x toBuild.sh
```

2. Run the build script:
```
./toBuild.sh
```

This will create three executables: `run-client`, `run-logger`, and `run-server`.

Run them in the following order:

1. `run-logger`
2. `run-server`
3. `run-client` (you can run multiple instances of this)

## Manual Setup and Running

If you prefer to set up and run the components manually, follow these steps:

### Prerequisites

- Python 3.x
- Go 1.x
- Make

### Setup

1. Prepare the project:
```
make prep
```

2. Set up Python environment:
```
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
```

3. Tidy Go modules:
```
cd server
go mod tidy
```

### Running the Components

1. Start the logger:
```
cd server
go run logger.go
```

2. In a new terminal, start the server:
```
cd server
go run server.go
```

3. In another terminal, run the client:
```
python client/client.py
```

## Project Structure

- `client/`: Contains the Python client code
- `server/`: Contains the Go server and logger code
- `document.proto`: Protocol Buffer definition file
- `Makefile`: Contains commands for building and cleaning components of the project
- `toBuild.sh`: Script for building all components
2 changes: 1 addition & 1 deletion client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
class CollaborativeEditor:
def __init__(self):
self.root = tk.Tk()
self.root.title("🤝 gOLLAB Editor")
self.root.title("🤝 goLLab Editor")
self.root.geometry("800x600")

# Configure styles
Expand Down

0 comments on commit 88769da

Please sign in to comment.