Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🧹 chore: Improving Developer Onboarding #XON-Hackathon-2024 #10

Merged
merged 4 commits into from
Jan 25, 2024
Merged
Changes from 1 commit
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
61 changes: 45 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,36 +76,65 @@ If you spot any problems or have suggestions for improvements, please raise an i

And if you want to contribute, we welcome your pull requests. We'll gladly consider any changes or fixes you suggest.

## Installation & pre-requisities
## Quick Start for Local Development

A quick introduction of the minimal setup you need to get this API working.
### Using Docker-Compose

```shell
sudo apt-get install -y google-cloud-sdk google-cloud-sdk-app-engine-python python3-pip google-cloud-sdk-app-engine-python build-essential libffi-dev python-dev
```
1. **Clone the Repository:**

The requirements.txt file should list all Python libraries XposedOrNot depend on, and they will be installed using:
```shell
git clone https://github.com/XposedOrNot/XposedOrNot-API
```

2. **Update the necessary environment variables in the docker-compose.yml file if needed, then run:**

```shell
pip3 install -r requirements.txt
```

This installs all the needed requirements and libraries using pip3.
```shell
docker-compose up
```

Before running XposedOrNot-API, you need to, either:
This command will build API and Datastore Docker images. Note that the project source directory is mapped in the Docker container, so any changes in the source code won't require rebuilding the Docker image.

### Local Installation

1. **Clone the Repository:**

```shell
git clone https://github.com/XposedOrNot/XposedOrNot-API
```

2. **Install Required Packages**

```shell
sudo apt-get install -y google-cloud-sdk google-cloud-sdk-app-engine-python python3-pip google-cloud-sdk-app-engine-python build-essential libffi-dev python-dev
```

3. **Install Python Libraries**


```shell
pip3 install -r requirements.txt
```

4. **Setup Google Cloud Datastore**

Before running XposedOrNot-API, choose one of the following options:

- [Run local Google DataStore emulator](https://cloud.google.com/datastore/docs/tools/datastore-emulator)
and debug using the local emulator rather than directly connect to Google DataStore.


```shell
# For posix platforms, e.g. linux, mac:
gcloud beta emulators datastore start
```
```shell
# For posix platforms, e.g. linux, mac:
gcloud beta emulators datastore start
```

- [Authenticate to Google DataStore](https://cloud.google.com/sdk/gcloud/reference/beta/auth/application-default) and directly debug using Google DataStore.

5. **Run the applicaiont**
jbhv12 marked this conversation as resolved.
Show resolved Hide resolved

```shell
python main.py
jbhv12 marked this conversation as resolved.
Show resolved Hide resolved
```

## Contributing

Expand Down