Public
Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md
Google Stax
Google Stax (formerly Evaluable AI) is a specialized platform for evaluating and scaling AI/ML applications. It provides developers with the tools to bootstrap infrastructure, manage evaluation workflows via Pub/Sub, and visualize performance metrics through a modern web interface.
🏗️ 1. Infrastructure Setup (Terraform)
Terraform manages the GCP resources including Cloud Run, Cloud SQL, and Pub/Sub.
Prerequisites
- GCP Project: Create a project and enable billing. Note your
PROJECT_ID. - Local Tools: Install Terraform and the gcloud CLI.
- Docker Images: Build and push your images to the Artifact Registry:
us-central1-docker.pkg.dev/${PROJECT_ID}/cloud-run-source-deploy/stax-uius-central1-docker.pkg.dev/${PROJECT_ID}/cloud-run-source-deploy/stax-backend
Bootstrap Steps
- Initialize GCloud:
gcloud init gcloud config set project $PROJECT_ID gcloud auth application-default login - Deploy Resources:
cd terraform/quickstart # Update project_id in main.tf terraform init -upgrade terraform plan terraform apply
⚙️ 2. Backend Server (Spring Boot)
The backend handles the core evaluation logic and integrates with the GCP Pub/Sub emulator for local development.
Manual Prerequisites
- JDK 17+, Maven 3.9.6+, MySQL 8.x.
Local Setup & Execution
- Configure Environment:
cd server export AES_SECRET_KEY=defaultaessecret export TOKEN_SIGNING_KEY=default_token_signing_key export JDBC_DATABASE_URL="jdbc:mysql://localhost:3306/stax_db" export PROFILE_ACTIVE=local export GCP_PROJECT_ID=test - Run Pub/Sub Emulator:
gcloud components install beta pubsub-emulator gcloud beta emulators pubsub start --host-port=localhost:8085 - Build & Run:
App starts at
mvn clean install mvn spring-boot:runhttp://localhost:8080.
🖥️ 3. Frontend Application (Next.js)
A React-based UI built with Mantine and Tailwind CSS for interacting with the Stax platform.
Setup & Execution
- Install Dependencies:
cd frontend npm install - Environment Configuration:
- Copy
.env.templateto.env.localand setNEXT_PUBLIC_API_BASE_URL(e.g.http://localhost:8080) andNEXT_PUBLIC_APP_BASE_URL(e.g.http://localhost:3000). - Add
NEXT_PUBLIC_GOOGLE_CLIENT_IDif using authentication.
- Copy
- Run Development Server:
Access the dashboard at
npm run devhttp://localhost:3000.
Quality Control
- Test:
npm run test - Lint:
npm run lint:check - Git Hooks:
npm run githooks:init(enforces quality on commit)
📂 Project Structure
├── terraform/ # Infrastructure as Code (GCP)
│ ├── modules/ # Reusable GCP resource definitions
│ └── quickstart/ # Main deployment entry point
├── server/ # Spring Boot Java Server
│ └── src/ # Evaluation logic and API routes
└── frontend/ # Next.js & React Web App
├── app/ # App routes and page components
└── components/ # Reusable UI components