docs: improve local dev setup instructions in README.md (#68)

* Update README.md

Made some updates to the readme to address some issues

* docs: Improvements to the setup guide of the README.md

* install supabase locally

---------

Co-authored-by: Rotimi Best <[email protected]>
This commit is contained in:
Em_Dev
2023-12-01 23:03:19 +03:00
committed by GitHub
co-authored by Rotimi Best
parent 29f45f65d5
commit a72021fcc2
3 changed files with 18 additions and 12 deletions
+12 -10
View File
@@ -81,7 +81,7 @@ This repo is a mono repo that consists of 3 projects:
### Setup ### Setup
1. Clone the repo 1. Fork the repo, then clone it using the following command (remember to replace the url with the url from your forked repo)
```bash ```bash
git clone https://github.com/rotimi-best/classroomio.git git clone https://github.com/rotimi-best/classroomio.git
@@ -107,19 +107,21 @@ This repo is a mono repo that consists of 3 projects:
You can install nvm from [here](https://github.com/nvm-sh/nvm). You can install nvm from [here](https://github.com/nvm-sh/nvm).
4. Set up your `.env` file You also need to have pnpm installed, you can find the installation guide [here](https://pnpm.io/installation#using-npm)
5. Set up your `.env` file
- Go to `apps/classroomio-com` and `apps/dashboard` - Go to `apps/classroomio-com` and `apps/dashboard`
- Duplicate the `.env.example` file and rename it to `.env` - Duplicate the `.env.example` file and rename it to `.env`
5. Setup Supabase. 6. Setup Supabase.
- Make sure you've downloaded the [Supabase cli](https://github.com/supabase/cli) - Make sure you've downloaded the [Supabase cli](https://github.com/supabase/cli)
- Install and Start [docker](https://docs.docker.com/engine/install/) - Install and Start [docker](https://docs.docker.com/engine/install/)
- Go to the project directory in your terminal and start Supabase - Go to the project directory in your terminal and start Supabase
```bash ```bash
supabase start pnpm supabase start
``` ```
- You should get a result like this - You should get a result like this
@@ -137,7 +139,7 @@ This repo is a mono repo that consists of 3 projects:
service_role key: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU service_role key: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU
``` ```
- Add Supabase environment variables into `app/dashboard` folder, which should be taken from the result of `supabase start` - Add Supabase environment variables into `app/dashboard` folder, which should be taken from the result of `pnpm supabase start`
```env ```env
PUBLIC_SUPABASE_URL=<API URL> PUBLIC_SUPABASE_URL=<API URL>
@@ -145,26 +147,26 @@ This repo is a mono repo that consists of 3 projects:
PUBLIC_SUPABASE_BUCKET_URL=<Inbucket URL> PUBLIC_SUPABASE_BUCKET_URL=<Inbucket URL>
``` ```
- To view the Supabase studio, open the Studio URL from the result of `supabase start` - To view the Supabase studio, open the Studio URL from the result of `pnpm supabase start`
6. Install the required dependencies 7. Install the required dependencies
```bash ```bash
pnpm i pnpm i
``` ```
7. Run all projects (in development mode) 8. Run all projects (in development mode)
```bash ```bash
pnpm dev pnpm dev
``` ```
8. All projects should start running 9. All projects should start running
- `classroomio-com`: [http://localhost:5173](http://localhost:5173) - `classroomio-com`: [http://localhost:5173](http://localhost:5173)
- `dashboard`: [http://localhost:5174](http://localhost:5174) - `dashboard`: [http://localhost:5174](http://localhost:5174)
- `docs`: [http://localhost:3000](http://localhost:3000) - `docs`: [http://localhost:3000](http://localhost:3000)
9. Running a specific project 10. Running a specific project
- **classroomio-com**: `pnpm dev --filter=classroomio-com` - **classroomio-com**: `pnpm dev --filter=classroomio-com`
- **dashboard**: `pnpm dev --filter=dashboard` - **dashboard**: `pnpm dev --filter=dashboard`
- **docs**: `pnpm dev --filter=docs` - **docs**: `pnpm dev --filter=docs`
+3 -2
View File
@@ -16,8 +16,9 @@
"prettier": "^3.1.0", "prettier": "^3.1.0",
"prettier-plugin-svelte": "^3.1.2", "prettier-plugin-svelte": "^3.1.2",
"prettier-plugin-tailwindcss": "^0.5.7", "prettier-plugin-tailwindcss": "^0.5.7",
"supabase": "^1.112.0",
"tsconfig": "workspace:*",
"turbo": "^1.10.16", "turbo": "^1.10.16",
"typescript": "^5.1.6", "typescript": "^5.1.6"
"tsconfig": "workspace:*"
} }
} }
+3
View File
@@ -20,6 +20,9 @@ importers:
prettier-plugin-tailwindcss: prettier-plugin-tailwindcss:
specifier: ^0.5.7 specifier: ^0.5.7
version: 0.5.7([email protected])([email protected]) version: 0.5.7([email protected])([email protected])
supabase:
specifier: ^1.112.0
version: 1.112.0
tsconfig: tsconfig:
specifier: workspace:* specifier: workspace:*
version: link:packages/tsconfig version: link:packages/tsconfig