# kratos-admin
**Repository Path**: python395118/kratos-admin
## Basic Information
- **Project Name**: kratos-admin
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: main
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2026-08-19
- **Last Updated**: 2026-08-19
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# Kratos Admin Template
A Kratos service template with an Ant Design Pro console: sign-in, an overview
dashboard, and admin management backed by AIP filtering and pagination.

## Best Practice
Google AIP(https://google.aip.dev/general):
1. Resource-oriented design
2. Filtering
3. Pagination
4. Field masks
5. Field behavior
## Generate API files
Proto generation is driven by [buf](https://buf.build). Dependencies such as
googleapis are resolved from the Buf Schema Registry (`buf.build/googleapis/googleapis`),
so there is no vendored `third_party/` directory.
```shell
# Install tooling (buf + wire)
make init
# Generate API files (pb.go, grpc, kratos http, openapi.yaml, console TS clients) from api/*.proto
make api
# Generate internal config (internal/conf/conf.pb.go) from internal/*.proto
make config
```
## Run Console Application
```shell
# Enter console directory, install dependencies and start development server
cd console
npm install
npm run dev
```
The generated clients work with any Promise-based HTTP client that returns JSON.
Services are defined and re-exported from this file: `console/src/services/index.ts`.
```typescript
import { createAdminServiceClient } from "@/services/kratos/admin/v1/index";
type Request = {
path: string;
method: string;
body: string | null;
};
function requestHandler({ path, method, body }: Request) { ... }
export function createAdminService() {
return createAdminServiceClient(requestHandler);
}
```
Example using the generated client:
```typescript
import { createAdminService } from "@/services/index";
const adminService = createAdminService();
const handleLogin = async (username: string, password: string) => {
try {
const response = await adminService.Login({
username: username,
password: password,
});
console.log("Login successful:", response);
} catch (error) {
console.error("Login failed:", error);
}
};
```