Skip to content

Commit 883383f

Browse files
authored
Merge pull request #53 from FrostCord/FROS-Readme-And-Local-Dev-Instructions
Add localdev instrcts
2 parents 9ee7bf2 + d891bd3 commit 883383f

4 files changed

Lines changed: 1218 additions & 1936 deletions

File tree

.env.example

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
2-
NEXT_PUBLIC_SUPABASE_URL=YOUR_SUPABASE_URL
3-
NEXT_PUBLIC_SUPABASE_ANON_KEY=YOUR_SUPABASE_ANON_KEY
4-
PROJECT_ID=SUPABASE_REFERENCE_ID
1+
NEXT_PUBLIC_SUPABASE_URL=http://localhost:54321
2+
NEXT_PUBLIC_SUPABASE_ANON_KEY=<YOUR ANON KEY HERE>
3+
PROJECT_ID=<YOUR PROJECT ID HERE>
54

65
LK_API_KEY=devkey
76
LK_API_SECRET=secret
87

9-
NEXT_PUBLIC_LK_TOKEN_ENDPOINT=PATH_TO_TOKEN_GENERATOR
10-
NEXT_PUBLIC_LK_SERVER_URL=URL_TO_LIVEKITSERVER
8+
NEXT_PUBLIC_LK_TOKEN_ENDPOINT=/api/v1/auth/livekit
9+
NEXT_PUBLIC_LK_SERVER_URL=ws://localhost:7880

README.md

Lines changed: 50 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,54 @@
1-
## Getting Started
1+
## Getting Started With Local Development
2+
1. Clone this repository
3+
```bash
4+
# HTTPS
5+
$ git clone https://github.com/FrostCord/FrostCord.git
6+
7+
# or
8+
9+
# SSH
10+
$ git clone git@github.com:FrostCord/FrostCord
11+
```
12+
2. Navigate to the project directory
13+
```bash
14+
cd FrostCord
15+
```
16+
3. Head to https://app.supabase.com and sign up
17+
4. Create a new project and navigate to the settings/api tab
18+
5. Copy your project anon key and project reference id (the string of characters in the subdomain of supabase.co)
19+
6. Open `.env.example` and set:
20+
- `NEXT_PUBLIC_SUPABASE_ANON_KEY` to the anon key you just copied
21+
- `PROJECT_ID` to the project reference id from the previous step
22+
7. Rename `.env.example` to `.env.local`
23+
8. Install dependencies
24+
```bash
25+
npm install
26+
```
27+
9. Prepare the local supabase containers
28+
```bash
29+
npx supabase start
30+
```
31+
10. Install the livekit server by following instructions [here](https://docs.livekit.io/getting-started/server-setup/)
32+
- If you're on Linux or Mac, you'll be ready to move onto the next step
33+
- But if you're on windows, you'll want to make sure that the executable is somewhere that's on your system PATH
34+
11. Run livekit in dev mode
35+
```bash
36+
# linux/mac
37+
livekit-server --dev
38+
39+
# or for windows users
40+
livekit-server.exe --dev
41+
```
42+
- If you're on windows and get an error mentioning `bind: An attempt was made to access a socket in a way forbidden by its access permissions.`, you'll want to disable winnat using `net stop winnat` in your terminal. You can restart winnat again after using `net start winnat`
43+
12. Navigate to http://localhost:54323/project/default/storage/buckets and create 2 public buckets:
44+
- avatars
45+
- servericons
46+
13. Start NextJS dev server
47+
```bash
48+
npm run dev
49+
```
50+
14. Navigate http://localhost:3000 and sign up/log in
251

3-
First, run the development server:
4-
5-
```bash
6-
npm run dev
7-
# or
8-
yarn dev
9-
# or
10-
pnpm dev
11-
```
12-
13-
Rename the `.env.example` to `.env.local` and fill in the variables
14-
15-
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
1652

1753
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
1854

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
"autoprefixer": "^10.4.13",
6565
"eslint": "^8.32.0",
6666
"postcss": "^8.4.21",
67-
"supabase": "^1.38.7",
67+
"supabase": "^1.45.2",
6868
"tailwindcss": "^3.2.4",
6969
"typescript": "^4.9.4"
7070
}

0 commit comments

Comments
 (0)