Update README.md

This commit is contained in:
martinalong 2021-12-08 13:06:22 -08:00 committed by GitHub
parent 9106c47a06
commit b2a5670a56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,99 +26,9 @@ Slate is tightly scoped for the present and more broadly thought out for the fut
# Get involved # Get involved
Slate is built by a growing community of collaborators and contributors. Wed love for you to join us! Slate is built by a growing community of collaborators and contributors. Wed love for you to join us! You can reach out to us by email at hello@slate.host
How?
- Find something you want to work on and [file an issue](https://github.com/filecoin-project/slate/issues).
- If you see something you want to fix or change, **submit a PR**.
- Reach out at any time. We're always available on Twitter to answer your questions: [@\_slate](https://www.twitter.com/_slate).
## Slate Development Guide
- To work on Slate you must have an internet connection.
- We don't have windows support at the moment.
### Clone this repo
Working on Slate starts by cloning the repo :)
```sh
git clone https://github.com/filecoin-project/slate.git
cd slate
```
### .env
You must create a `.env` file if you want to work on the service.
- You must setup your own postgres or hosted postgres.
- You must have your own Textile hub account setup
- You will have to run 3 other servers manually until we automate.
```
POSTGRES_ADMIN_PASSWORD=XXX
POSTGRES_ADMIN_USERNAME=XXX
POSTGRES_HOSTNAME=XXX
POSTGRES_DATABASE=XXX
LOCAL_PASSWORD_SECRET=XXX
LOCAL_PASSWORD_ROUNDS_MANUAL=5
LOCAL_PASSWORD_ROUNDS=14
TEXTILE_HUB_KEY=XXX
TEXTILE_HUB_SECRET=XXX
JWT_SECRET=XXX
ALLOWED_HOST=localhost:1337
PUBSUB_SECRET=pKLO4lbzdMrhAFKwPo9bnmq03bxQrtu3
NEXT_PUBLIC_URI_SHOVEL=http://localhost:4242
NEXT_PUBLIC_URI_FIJI=ws://localhost:6464
NEXT_PUBLIC_URI_LENS=http://localhost:1313
NEXT_PUBLIC_NODE_ENV=development
```
### Setup pubsub server
- In another terminal window, clone https://github.com/slate-engineering/fiji
- Use the same `.env` secret values as the root server.
### Setup file upload server
- In another terminal window, clone https://github.com/slate-engineering/shovel
- Use the same `.env` secret values as the root server.
### Setup search server
- In another terminal window, clone https://github.com/slate-engineering/lens
- Use the same `.env` secret values as the root server.
### Install and run
```sh
npm install
npm run dev
```
- Visit `localhost:1337` in a browser.
- You should have 3 terminal screens open unless you don't want real time updates and file upload support.
<!-- ## Design System
Our design system is out of date and could use an update.
- [Use our components](https://slate.host/_/system)
- [Design System Release Repository](https://github.com/filecoin-project/slate-react-system) -->
## Developer API ## Developer API
Slate has a Developer API that allows you upload files using code and HTTP. Slate has a Developer API that allows you upload files using code and HTTP. Every user who creates an account on Slate can use the API. The documentation is visible after logging in, under the API tab.
Every user who creates an account on Slate can use the API. Here is an example:
```js
const response = await fetch("https://slate.host/api/v1/get", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "XXX-YOUR-SLATE-KEY-XXX",
},
});
```