Skip to content

Commit

Permalink
Merge pull request #144 from supabase-community/fix/rename-postgres-n…
Browse files Browse the repository at this point in the history
…ew-to-database-build-web

chore: rename postgres-new folder to web
  • Loading branch information
jgoux authored Dec 3, 2024
2 parents 06b4210 + d39e200 commit 5b23ed1
Show file tree
Hide file tree
Showing 164 changed files with 3,247 additions and 2,221 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ How is this possible? [PGlite](https://pglite.dev/), a WASM version of Postgres

This is a monorepo split into the following projects:

- [Web](./apps/postgres-new/): The primary web app built with Next.js
- [Web](./apps/web/): The primary web app built with Next.js
- [Browser proxy](./apps/browser-proxy/): Proxies Postgres TCP connections back to the browser using [pg-gateway](https://github.com/supabase-community/pg-gateway) and Web Sockets
- [Deploy worker](./apps/deploy-worker/): Deploys in-browser databases to database platforms (currently Supabase is supported)

Expand All @@ -41,33 +41,33 @@ From the monorepo root:
```shell
npx supabase start
```
3. Store local Supabase URL/anon key in `./apps/postgres-new/.env.local`:
3. Store local Supabase URL/anon key in `./apps/web/.env.local`:
```shell
npx supabase status -o env \
--override-name api.url=NEXT_PUBLIC_SUPABASE_URL \
--override-name auth.anon_key=NEXT_PUBLIC_SUPABASE_ANON_KEY |
grep NEXT_PUBLIC >> ./apps/postgres-new/.env.local
grep NEXT_PUBLIC >> ./apps/web/.env.local
```
4. Create an [OpenAI API key](https://platform.openai.com/api-keys) and save to `./apps/postgres-new/.env.local`:
4. Create an [OpenAI API key](https://platform.openai.com/api-keys) and save to `./apps/web/.env.local`:
```shell
echo 'OPENAI_API_KEY="<openai-api-key>"' >> ./apps/postgres-new/.env.local
echo 'OPENAI_API_KEY="<openai-api-key>"' >> ./apps/web/.env.local
```
5. Store local KV (Redis) vars. Use these exact values:

```shell
echo 'KV_REST_API_URL="http://localhost:8080"' >> ./apps/postgres-new/.env.local
echo 'KV_REST_API_TOKEN="local_token"' >> ./apps/postgres-new/.env.local
echo 'KV_REST_API_URL="http://localhost:8080"' >> ./apps/web/.env.local
echo 'KV_REST_API_TOKEN="local_token"' >> ./apps/web/.env.local
```

6. Start local Redis containers (used for rate limiting). Serves an API on port 8080:

```shell
docker compose -f ./apps/postgres-new/docker-compose.yml up -d
docker compose -f ./apps/web/docker-compose.yml up -d
```

7. Fill in the remaining variables for each app as seen in:

- `./apps/postgres-new/.env.example`
- `./apps/web/.env.example`
- `./apps/browser-proxy/.env.example`
- `./apps/deploy-worker/.env.example`

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion apps/postgres-new/README.md → apps/web/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# postgres-new
# @database.build/web

In-browser Postgres sandbox with AI assistance. Built on Next.js.

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ function LiveShareOverlay(props: { databaseId: string }) {
<p>
We host a{' '}
<a
href="https://github.com/supabase-community/postgres-new/tree/main/apps/browser-proxy"
href="https://github.com/supabase-community/database-build/tree/main/apps/browser-proxy"
target="__blank"
rel="noopener noreferrer"
>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ function Footer() {
<div className="flex flex-row gap-1 pb-1 text-xs text-neutral-500 text-center justify-center">
<a
className="underline cursor-pointer"
href="https://github.com/supabase-community/postgres-new"
href="https://github.com/supabase-community/database-build"
target="_blank"
rel="noopener noreferrer"
>
Expand All @@ -261,7 +261,7 @@ function Footer() {
|{' '}
<a
className="underline cursor-pointer"
href="https://github.com/supabase-community/postgres-new/issues/new/choose"
href="https://github.com/supabase-community/database-build/issues/new/choose"
target="_blank"
rel="noopener noreferrer"
>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 5b23ed1

Please sign in to comment.