forked from baron/baron-sso
논리 검사 계속. 스케폴딩 일부 진행
This commit is contained in:
107
README_en.md
Normal file
107
README_en.md
Normal file
@@ -0,0 +1,107 @@
|
||||
# Baron SSO
|
||||
|
||||
**Baron SSO** is a white-labeled User Authentication Hub and Unified Launcher.
|
||||
It leverages **Descope** for secure, passwordless authentication (Enchanted Link / Magic Link) and provides a custom Flutter UI for a seamless user experience. A Go (Fiber) backend manages Audit Logs via ClickHouse.
|
||||
|
||||
## 🏗 Architecture
|
||||
|
||||
### 1. Frontend (Flutter Web)
|
||||
- **Framework**: Flutter 3.32+
|
||||
- **Organization**: `kr.co.baroncs`
|
||||
- **Key Packages**: `descope`, `flutter_riverpod`, `go_router`
|
||||
- **Features**:
|
||||
- Login UI with Tabs (Email / SMS)
|
||||
- Descope SDK Integration (Enchanted Link, Magic Link)
|
||||
|
||||
### 2. Backend (Go Fiber)
|
||||
- **Language**: Go 1.25+
|
||||
- **Framework**: Fiber v2.25+
|
||||
- **Database**:
|
||||
- **ClickHouse**: Audit Logs (High performance ingestion)
|
||||
- **PostgreSQL**: Metadata storage (Primary)
|
||||
- **Features**:
|
||||
- `POST /api/v1/audit`: Endpoint to ingest audit logs.
|
||||
|
||||
### 3. Infrastructure (Docker)
|
||||
- **Services**: `postgres`, `clickhouse` (defined in `compose.infra.yaml`)
|
||||
- **App**: `frontend`, `backend` (defined in `docker-compose.yaml`)
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Getting Started
|
||||
|
||||
### Prerequisites
|
||||
- Docker & Docker Compose
|
||||
- Flutter SDK (for local development)
|
||||
- Go (for local backend development)
|
||||
|
||||
### Environment Setup
|
||||
1. Copy the sample environment file.
|
||||
```bash
|
||||
cp .env.sample .env
|
||||
```
|
||||
2. **Crucial**: Edit `.env` and provide your **Descope Project ID**.
|
||||
```env
|
||||
DESCOPE_PROJECT_ID=P2t...
|
||||
```
|
||||
|
||||
### Running the Stack
|
||||
|
||||
#### 1. Start Infrastructure (Databases)
|
||||
Start the persistent data layer first.
|
||||
```bash
|
||||
docker compose -f compose.infra.yaml up -d
|
||||
```
|
||||
|
||||
#### 2. Start Applications
|
||||
Start the Frontend and Backend services.
|
||||
```bash
|
||||
docker compose up
|
||||
```
|
||||
|
||||
- **Frontend**: Accessible at http://localhost:5000
|
||||
- **Backend**: API active at http://localhost:3000
|
||||
- **ClickHouse**: http://localhost:8123
|
||||
|
||||
### Local Development (Manual)
|
||||
If you prefer running without Docker for code editing:
|
||||
|
||||
**Backend:**
|
||||
```bash
|
||||
cd backend
|
||||
go mod tidy
|
||||
go run cmd/server/main.go
|
||||
```
|
||||
|
||||
**Frontend:**
|
||||
```bash
|
||||
cd frontend
|
||||
flutter pub get
|
||||
flutter run -d chrome
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📂 Project Structure
|
||||
|
||||
```
|
||||
baron_sso/
|
||||
├── backend/ # Go Fiber Application
|
||||
│ ├── cmd/server/ # Entry point
|
||||
│ ├── internal/ # Domain, Handlers, Repository
|
||||
│ └── Dockerfile
|
||||
├── frontend/ # Flutter Application
|
||||
│ ├── lib/ # UI & Logic
|
||||
│ └── pubspec.yaml
|
||||
├── compose.infra.yaml # DB Services (Postgres, ClickHouse)
|
||||
├── docker-compose.yaml # App Services
|
||||
├── .env.sample # Env Config Template
|
||||
└── README.md # This file
|
||||
```
|
||||
|
||||
## 📝 Status & Roadmap
|
||||
- [x] **Phase 1**: Initial Setup & Architecture (Done)
|
||||
- [x] **Phase 2**: Backend Audit API (Done)
|
||||
- [x] **Phase 3**: Frontend Login UI & Descope Auth Logic (Done)
|
||||
- [ ] **Phase 4**: Connect Frontend to Audit API (Todo)
|
||||
- [ ] **Phase 5**: Dashboard & Unified Launcher (Todo)
|
||||
Reference in New Issue
Block a user