Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
chimpdev authored Mar 28, 2024
1 parent 0150f80 commit 21cfea8
Showing 1 changed file with 88 additions and 2 deletions.
90 changes: 88 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@ This repository contains the source code for the discord.place website. The proj

To get a local copy of the project up and running, follow these steps:

1. Clone the repository:

```bash
git clone https://github.com/discordplace/discord.place.git
```

2. Navigate to the project directory:

```bash
cd discord.place
```

## Getting Started

To get a local copy of the project up and running, follow these steps:

1. Clone the repository:

```bash
Expand All @@ -27,7 +43,55 @@ To get a local copy of the project up and running, follow these steps:
npm install
```

4. Start the development servers:
4. Configure Environment Variables:

- **Client**:
- Create a `.env` file in the `client` directory and populate it with the following variables:

```plaintext
ANALYZE=
NEXT_PUBLIC_CF_SITE_KEY=
```
- **Server**:
- Create a `.env` file in the `server` directory and populate it with the following variables:
```plaintext
# Secrets
COOKIE_SECRET=
SESSION_SECRET=
SESSION_STORE_SECRET=
GITHUB_AUTO_DEPLOY_SECRET=
# Discord Bot
DISCORD_CLIENT_TOKEN=
DISCORD_CLIENT_SECRET=
# Database
MONGO_URL=
# Cloudflare R2
S3_BUCKET_NAME=
S3_ACCESS_KEY_ID=
S3_SECRET_ACCESS_KEY=
S3_REGION=
S3_ENDPOINT=
# Cloudflare Turnstile
CLOUDFLARE_TURNSTILE_SECRET_KEY=
```
Ensure you fill in the values for each environment variable according to your setup. Take a look to [Secrets Configuration](#secrets-configuration) for more information about .env
4. Install dependencies for the client and server:
```bash
cd client
npm install
cd ../server
npm install
```

5. Start the development servers:

```bash
# In one terminal tab
Expand All @@ -53,10 +117,32 @@ We welcome contributions from the community! If you'd like to contribute to the

Please make sure to follow the [Code of Conduct](.github/CODE_OF_CONDUCT.md) and [Contributing Guidelines](.github/CONTRIBUTING.md) when contributing to this project.

## Secrets Configuration

Before running the project, you need to set up the following environment variables in the `.env` files for both the client and server. Here's a breakdown of each secret:

| Secret | Description | Required | Example Value |
|--------------------------|-------------------------------------------------------------|----------|------------------------|
| COOKIE_SECRET | Secret used for cookie encryption | Yes | RandomString |
| SESSION_SECRET | Secret used for session encryption | Yes | RandomString |
| SESSION_STORE_SECRET | Secret used for session store encryption | Yes | RandomString |
| GITHUB_AUTO_DEPLOY_SECRET | Secret for GitHub auto-deployment webhook verification | No | RandomString |
| DISCORD_CLIENT_TOKEN | Token for Discord bot integration | Yes | DiscordToken |
| DISCORD_CLIENT_SECRET | Secret for Discord bot integration | Yes | DiscordSecret |
| MONGO_URL | URL for MongoDB database connection | Yes | mongodb://localhost:27017/mydatabase |
| S3_BUCKET_NAME | Name of the AWS S3 bucket for Cloudflare R2 | Yes | BucketName |
| S3_ACCESS_KEY_ID | AWS access key ID for Cloudflare R2 | Yes | AccessKeyID |
| S3_SECRET_ACCESS_KEY | AWS secret access key for Cloudflare R2 | Yes | SecretAccessKey |
| S3_REGION | AWS region for Cloudflare R2 | Yes | Region |
| S3_ENDPOINT | AWS S3 endpoint for Cloudflare R2 | Yes | Endpoint |
| CLOUDFLARE_TURNSTILE_SECRET_KEY | Secret key for Cloudflare Turnstile integration | Yes | RandomString |
| ANALYZE | Whether to enable bundle analysis during client build | No | true/false |
| NEXT_PUBLIC_CF_SITE_KEY | Public key for Cloudflare integration | No | SiteKey |

## Help

If you encounter any issues with the discord.place website or have any questions, feel free to [open an issue](https://github.com/discordplace/discord.place/issues) on this repository. We'll do our best to assist you!

## License

This project is licensed under the [ISC License](LICENSE).
This project is licensed under the [ISC License](LICENSE).

0 comments on commit 21cfea8

Please sign in to comment.