Skip to content

Commit b630126

Browse files
committed
feat: enhanced authentication with GitHub OAuth support, updated README for new features, and improved deployment scripts for better configuration management
1 parent 1c39dbc commit b630126

13 files changed

Lines changed: 2515 additions & 57 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,3 +137,4 @@ dist
137137
# Vite logs files
138138
vite.config.js.timestamp-*
139139
vite.config.ts.timestamp-*
140+
.github-secrets

README.md

Lines changed: 58 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Event-Driven Team Task Board on GKE
2424
- [Getting Started](#getting-started)
2525
- [Local Development](#local-development)
2626
- [GKE Deployment](#gke-deployment)
27+
- [Authentication](#authentication)
2728
- [Scripts](#scripts)
2829
- [License](#license)
2930

@@ -33,7 +34,7 @@ Cascade implements a microservices architecture with the following core services
3334

3435
### Services
3536

36-
1. **Auth Service** (`auth`) - User authentication using Better Auth
37+
1. **Auth Service** (`auth`) - User authentication using Better Auth with email/password and GitHub OAuth
3738
2. **Board Command Service** (`board-command`) - Write operations for boards and tasks
3839
3. **Board Query Service** (`board-query`) - Read operations with caching
3940
4. **Activity Service** (`activity`) - Real-time activity logging
@@ -89,18 +90,33 @@ To run the project locally using Docker Compose:
8990

9091
1. Ensure you have [Docker](https://www.docker.com/) and [Docker Compose](https://docs.docker.com/compose/) installed.
9192
2. Start the services:
93+
9294
```bash
9395
docker-compose up --build
9496
```
97+
9598
More details in the local [docker compose documentation](./docs/DOCKER-COMPOSE.md).
9699

97100
### GKE Deployment
98101

99102
To deploy the project to Google Kubernetes Engine (GKE) using Helm:
100103

101-
1. Configure your `gcloud` CLI and Kubernetes context.
102-
2. Use the Helm charts located in the `helm/` directory.
103-
3. You can use the provided scripts to automate the process.
104+
**Quick Start**:
105+
106+
```bash
107+
./setup.sh <YOUR_PROJECT_ID>
108+
```
109+
110+
**Manual Deployment**: See the [Deployment Checklist](./docs/DEPLOYMENT-CHECKLIST.md) for step-by-step instructions.
111+
112+
**Key Features**:
113+
114+
- Automated cluster setup and configuration
115+
- Kafka with KRaft mode (no Zookeeper)
116+
- MongoDB 3-node replica set
117+
- Redis caching layer
118+
- Nginx Ingress with dynamic IP support (nip.io)
119+
- GitHub OAuth authentication
104120

105121
### Accessing Kafka UI
106122

@@ -110,15 +126,50 @@ Kafka UI is not exposed via Ingress by default. To access it:
110126
kubectl port-forward svc/cascade-kafka-ui 8080:80
111127
```
112128

113-
Then open http://localhost:8080 in your browser.
129+
Then open <http://localhost:8080> in your browser.
130+
131+
## Authentication
132+
133+
Cascade supports multiple authentication methods:
134+
135+
### Email/Password Authentication
136+
137+
Users can sign up and sign in using email and password (powered by Better Auth).
138+
139+
### GitHub OAuth
140+
141+
Users can sign in with their GitHub accounts for a seamless experience.
142+
143+
**Setup Instructions**: See [GitHub OAuth Setup Guide](./docs/GITHUB-OAUTH.md) for detailed configuration steps.
144+
145+
**Quick Setup**:
146+
147+
1. Create a GitHub OAuth App at <https://github.com/settings/developers>
148+
2. Deploy with secrets:
149+
150+
```bash
151+
helm upgrade cascade helm/cascade \
152+
--set secrets.githubClientId="your-client-id" \
153+
--set secrets.githubClientSecret="your-secret"
154+
```
155+
156+
3. Configure callback URL: `http://<INGRESS_IP>/api/auth/callback/github`
114157

115158
## API Documentation
116159

117160
API documentation is available via Scalar for each microservice when running:
118161

119-
- **Centralized API Docs**: http://localhost:3006
162+
- **Centralized API Docs**: <http://localhost:3006>
163+
164+
## Documentation
120165

121-
For architecture diagrams and detailed documentation, see [docs/architecture_presentation.md](./docs/architecture_presentation.md).
166+
- **[Architecture Overview](./docs/architecture_presentation.md)** - High-level architecture diagrams
167+
- **[GKE Architecture Guide](./docs/GKE-ARCHITECTURE.md)** - Detailed documentation on how Cascade works in Kubernetes
168+
- Service discovery and communication patterns
169+
- Database architecture and synchronization
170+
- Caching strategy and data flow
171+
- Event-driven architecture with Kafka
172+
- Complete deployment topology
122173

123174
## Scripts
124175

backend/services/auth/src/auth.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ export const auth = betterAuth({
1919
emailAndPassword: {
2020
enabled: true,
2121
},
22+
socialProviders: {
23+
github: {
24+
clientId: process.env.GITHUB_CLIENT_ID as string,
25+
clientSecret: process.env.GITHUB_CLIENT_SECRET as string,
26+
},
27+
},
2228
plugins: [openAPI()],
2329
secret: process.env.AUTH_SECRET || "default-secret-change-in-production",
2430
baseURL: process.env.BASE_URL || "http://localhost:3001",

0 commit comments

Comments
 (0)