Skip to content
Merged
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
31 changes: 29 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,38 @@
cp .env.example .env
```
- Edit the `.env` file and update the values according to your setup:
- `SECRET_KEY`: Generate a unique secret key for Django
- `SECRET_KEY`: Generate a unique secret key for Django using one of these methods:
```bash
# Method 1: Using Django's built-in utility (Recommended)
python -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())"

# Method 2: Using Python's secrets module
python -c "import secrets; print(secrets.token_urlsafe(50))"

# Method 3: Using openssl (if available)
openssl rand -base64 50
```
- `MONGODB_URI`: MongoDB connection string (default: `mongodb://localhost:27017`)
- `DB_NAME`: Your database name
- `GOOGLE_OAUTH_CLIENT_ID` and `GOOGLE_OAUTH_CLIENT_SECRET`: OAuth credentials for Google authentication
- `PRIVATE_KEY` and `PUBLIC_KEY`: Generate RSA key pairs for JWT token signing
- `PRIVATE_KEY` and `PUBLIC_KEY`: Generate RSA key pairs for JWT token signing using one of these methods:
```bash
# Method 1: Using openssl (Recommended)
# Generate private key (2048-bit RSA)
openssl genrsa -out private_key.pem 2048

# Generate public key from private key
openssl rsa -in private_key.pem -pubout -out public_key.pem

# View the keys and copy them to your .env file
cat private_key.pem
cat public_key.pem

# Method 2: Using ssh-keygen
ssh-keygen -t rsa -b 2048 -m PEM -f jwt_key -N ''
openssl rsa -in jwt_key -pubout -out jwt_key.pub
```
**Note**: Copy the entire content including `-----BEGIN...-----` and `-----END...-----` headers
- Other settings can be left as default for local development
7. Install [docker](https://docs.docker.com/get-docker/) and [docker compose](https://docs.docker.com/compose/install/)
8. Start MongoDB using docker
Expand Down
Loading