Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

chore(repo): improve backend readme for setup locally #343

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Thanks for taking the interest in contributing ♥. We really appreciate any sup
git checkout -b feat/<feature-description>
```

3. See the individual [package's](https://github.com/revertinc/Revert#packages) README for instructions on how to build each from source.
3. See the individual [package's](https://github.com/revertinc/revert#packages) README for instructions on how to build each from source.

## Building

Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,18 @@ git clone --depth 1 https://github.com/revertinc/revert

# Copy the example env file
cp .env.example .env
cp .env.example .env
cp packages/backend/.env.example packages/backend/.env
cp packages/client/.env.example packages/client/.env
cp packages/js/.env.example packages/js/.env
cp packages/react/.env.example packages/react/.env
cp packages/vue/.env.example packages/vue/.env

# Update this .env file with your own secrets
# Update these .env files with your own secrets if you'd like to.

# Then In the root directory run

# When running for the first time to seed the database.
# When running for the first time to seed the database. (RUN ONLY ONCE)
docker-compose run db-seed

# For subsequent runs
Expand Down
28 changes: 26 additions & 2 deletions packages/backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,44 @@
<img width="150" style="border-radius:75px;" src="../../public/logo.png"/>
<h1 align="center"><b>Revert.dev</b></h1>
<p align="center">
<h2 align="center">The fastest way to build user-facing integrations
<h2 align="center">Open-source unified API for product integrations

# @revertdotdev/backend

```shell

# Copy the example env file
cp packages/backend/.env.example packages/backend/.env

# Update this .env file with your own secrets if you'd like to.

```

### Fern setup

- Login with Fern with `fern login`.
- To generate Fern drive code locally, run `yarn fern` in the root folder of this repo. This will create the `packages/backend/generated` folder with the generated code.

### Setup Redis

- Have a redis instance running locally or use https://upstash.com/ to get a redis url.
- Update the redis url in `.env`

### Seed the database

```shell
# seed the database with sample data
yarn workspace @revertdotdev/backend db-seed

```

### Running the API locally

- Run `yarn workspace @revertdotdev/backend dev` to the run service locally at `:4001`

### Connect to Pipedrive CRM
## Integrations

#### Connect to Pipedrive CRM via Revert

- Open [Pipedrive Developers Corner](https://developers.pipedrive.com/) and sign in to your account, or create a new one
- Go to Settings > (company name) Developer Hub
Expand Down
1 change: 1 addition & 0 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"db-seed": "prisma db seed",
"db-seed:docker": "ts-node prisma/seed.ts",
"db-pull": "prisma db pull",
"db-studio": "prisma studio",
"migration:resolve": "prisma migrate resolve --applied $MIGRATION_ID",
"migration:dev": "prisma migrate dev",
"migration:rollback": "prisma migrate resolve --rolled-back $MIGRATION_ID",
Expand Down
2 changes: 1 addition & 1 deletion packages/react/.env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# locally
#
# CDN_PATH=src/lib/build/revert-dev.js
CDN_PATH=src/lib/build/revert-dev.js

# While building for deployment
#
Expand Down
2 changes: 1 addition & 1 deletion packages/vue/.env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# locally
#
# CDN_PATH=src/lib/build/revert-dev.js
CDN_PATH=src/lib/build/revert-dev.js

# While building for deployment
#
Expand Down