chore: 프론트엔드 마이그레이션 + 아키텍처 정의

- 백엔드 SDK 이전: FastAPI OpenAPI → orval 자동생성 (React Query 훅 포함)
- HTTP 어댑터: ky 기반 customFetcher, fetch httpClient 시그니처
- 아키텍처: features 모듈 / shared 레이어 컨벤션 정의
- 디자인 시스템: Tailwind v4 CSS-first 토큰 (브랜드 색 / status / shadcn)
- 커스텀 CSS: utilities / animations 를 custom.css 로 분리
- Docker: 개발(Dockerfile.dev + compose) / 프로덕션(nginx) 셋업
- README: 기술 스펙 / 프로젝트 구조 / 디자인 토큰 / 폰트 / SDK 사용법 정리

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
minaChoiandClaude Opus 4.7 committed 2026-05-13 11:38:07 +09:00
commit e66b208318
219 files changed
+36881

No files matched your search

+44
View File
@@ -0,0 +1,44 @@
/**
* orval이 생성하는 API 클라이언트의 HTTP 어댑터.
*
* - `kyInstance`: 공통 타임아웃·리트라이·훅(인증 토큰 주입, 401 처리 등 추후 추가) 설정
* - `customFetcher`: orval `httpClient: 'fetch'` 모드의 custom mutator.
* 생성된 코드가 `customFetcher(url, init)`로 호출하면 ky로 요청을 보내고,
* 생성 타입이 기대하는 `{ status, data, headers }` 형태로 응답을 정규화함.
*/
import ky, { type KyInstance } from 'ky'
export const kyInstance: KyInstance = ky.create({
timeout: 10_000,
retry: 1,
// orval generated 타입이 4xx/5xx 응답도 data로 받아오므로 throw 비활성
throwHttpErrors: false,
hooks: {
beforeRequest: [
// TODO: 인증 토큰 주입
// request => {
// const token = localStorage.getItem('token')
// if (token) request.headers.set('Authorization', `Bearer ${token}`)
// },
],
afterResponse: [
// TODO: 401 처리, 토큰 갱신 등
],
},
})
export const customFetcher = async <T>(
url: string,
init?: RequestInit,
): Promise<T> => {
const response = await kyInstance(url, init as Parameters<KyInstance>[1])
let data: unknown = null
try {
data = await response.json()
} catch {
// 빈 응답이거나 JSON 파싱 실패
}
return { status: response.status, data, headers: response.headers } as T
}
export default customFetcher
@@ -0,0 +1,248 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
import {
useMutation,
useQuery
} from '@tanstack/react-query';
import type {
DataTag,
DefinedInitialDataOptions,
DefinedUseQueryResult,
MutationFunction,
QueryClient,
QueryFunction,
QueryKey,
UndefinedInitialDataOptions,
UseMutationOptions,
UseMutationResult,
UseQueryOptions,
UseQueryResult
} from '@tanstack/react-query';
import type {
AnalysisCreate,
AnalysisStartResponse,
AnalysisStatusResponse,
HTTPValidationError
} from '../../model';
import { customFetcher } from '../../api';
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
/**
* @summary Start Analysis
*/
export type startAnalysisResponse202 = {
data: AnalysisStartResponse
status: 202
}
export type startAnalysisResponse422 = {
data: HTTPValidationError
status: 422
}
export type startAnalysisResponseSuccess = (startAnalysisResponse202) & {
headers: Headers;
};
export type startAnalysisResponseError = (startAnalysisResponse422) & {
headers: Headers;
};
export type startAnalysisResponse = (startAnalysisResponseSuccess | startAnalysisResponseError)
export const getStartAnalysisUrl = () => {
return `/api/analyses`
}
export const startAnalysis = async (analysisCreate: AnalysisCreate, options?: RequestInit): Promise<startAnalysisResponse> => {
return customFetcher<startAnalysisResponse>(getStartAnalysisUrl(),
{
...options,
method: 'POST',
headers: { 'Content-Type': 'application/json', ...options?.headers },
body: JSON.stringify(
analysisCreate,)
}
);}
export const getStartAnalysisMutationOptions = <TError = HTTPValidationError,
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof startAnalysis>>, TError,{data: AnalysisCreate}, TContext>, request?: SecondParameter<typeof customFetcher>}
): UseMutationOptions<Awaited<ReturnType<typeof startAnalysis>>, TError,{data: AnalysisCreate}, TContext> => {
const mutationKey = ['startAnalysis'];
const {mutation: mutationOptions, request: requestOptions} = options ?
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
options
: {...options, mutation: {...options.mutation, mutationKey}}
: {mutation: { mutationKey, }, request: undefined};
const mutationFn: MutationFunction<Awaited<ReturnType<typeof startAnalysis>>, {data: AnalysisCreate}> = (props) => {
const {data} = props ?? {};
return startAnalysis(data,requestOptions)
}
return { mutationFn, ...mutationOptions }}
export type StartAnalysisMutationResult = NonNullable<Awaited<ReturnType<typeof startAnalysis>>>
export type StartAnalysisMutationBody = AnalysisCreate
export type StartAnalysisMutationError = HTTPValidationError
/**
* @summary Start Analysis
*/
export const useStartAnalysis = <TError = HTTPValidationError,
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof startAnalysis>>, TError,{data: AnalysisCreate}, TContext>, request?: SecondParameter<typeof customFetcher>}
, queryClient?: QueryClient): UseMutationResult<
Awaited<ReturnType<typeof startAnalysis>>,
TError,
{data: AnalysisCreate},
TContext
> => {
const mutationOptions = getStartAnalysisMutationOptions(options);
return useMutation(mutationOptions, queryClient);
}
/**
* @summary Get Analysis Status
*/
export type getAnalysisStatusResponse200 = {
data: AnalysisStatusResponse
status: 200
}
export type getAnalysisStatusResponse422 = {
data: HTTPValidationError
status: 422
}
export type getAnalysisStatusResponseSuccess = (getAnalysisStatusResponse200) & {
headers: Headers;
};
export type getAnalysisStatusResponseError = (getAnalysisStatusResponse422) & {
headers: Headers;
};
export type getAnalysisStatusResponse = (getAnalysisStatusResponseSuccess | getAnalysisStatusResponseError)
export const getGetAnalysisStatusUrl = (runId: string,) => {
return `/api/analyses/${runId}/status`
}
export const getAnalysisStatus = async (runId: string, options?: RequestInit): Promise<getAnalysisStatusResponse> => {
return customFetcher<getAnalysisStatusResponse>(getGetAnalysisStatusUrl(runId),
{
...options,
method: 'GET'
}
);}
export const getGetAnalysisStatusQueryKey = (runId?: string,) => {
return [
`/api/analyses/${runId}/status`
] as const;
}
export const getGetAnalysisStatusQueryOptions = <TData = Awaited<ReturnType<typeof getAnalysisStatus>>, TError = HTTPValidationError>(runId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAnalysisStatus>>, TError, TData>>, request?: SecondParameter<typeof customFetcher>}
) => {
const {query: queryOptions, request: requestOptions} = options ?? {};
const queryKey = queryOptions?.queryKey ?? getGetAnalysisStatusQueryKey(runId);
const queryFn: QueryFunction<Awaited<ReturnType<typeof getAnalysisStatus>>> = () => getAnalysisStatus(runId, requestOptions);
return { queryKey, queryFn, enabled: !!(runId), staleTime: 60000, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getAnalysisStatus>>, TError, TData> & { queryKey: DataTag<QueryKey, TData> }
}
export type GetAnalysisStatusQueryResult = NonNullable<Awaited<ReturnType<typeof getAnalysisStatus>>>
export type GetAnalysisStatusQueryError = HTTPValidationError
export function useGetAnalysisStatus<TData = Awaited<ReturnType<typeof getAnalysisStatus>>, TError = HTTPValidationError>(
runId: string, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAnalysisStatus>>, TError, TData>> & Pick<
DefinedInitialDataOptions<
Awaited<ReturnType<typeof getAnalysisStatus>>,
TError,
Awaited<ReturnType<typeof getAnalysisStatus>>
> , 'initialData'
>, request?: SecondParameter<typeof customFetcher>}
, queryClient?: QueryClient
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> }
export function useGetAnalysisStatus<TData = Awaited<ReturnType<typeof getAnalysisStatus>>, TError = HTTPValidationError>(
runId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAnalysisStatus>>, TError, TData>> & Pick<
UndefinedInitialDataOptions<
Awaited<ReturnType<typeof getAnalysisStatus>>,
TError,
Awaited<ReturnType<typeof getAnalysisStatus>>
> , 'initialData'
>, request?: SecondParameter<typeof customFetcher>}
, queryClient?: QueryClient
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> }
export function useGetAnalysisStatus<TData = Awaited<ReturnType<typeof getAnalysisStatus>>, TError = HTTPValidationError>(
runId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAnalysisStatus>>, TError, TData>>, request?: SecondParameter<typeof customFetcher>}
, queryClient?: QueryClient
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> }
/**
* @summary Get Analysis Status
*/
export function useGetAnalysisStatus<TData = Awaited<ReturnType<typeof getAnalysisStatus>>, TError = HTTPValidationError>(
runId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAnalysisStatus>>, TError, TData>>, request?: SecondParameter<typeof customFetcher>}
, queryClient?: QueryClient
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {
const queryOptions = getGetAnalysisStatusQueryOptions(runId,options)
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
query.queryKey = queryOptions.queryKey ;
return query;
}
@@ -0,0 +1,120 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
import {
useMutation
} from '@tanstack/react-query';
import type {
MutationFunction,
QueryClient,
UseMutationOptions,
UseMutationResult
} from '@tanstack/react-query';
import type {
ChannelVerifyRequest,
ChannelVerifyResponse,
HTTPValidationError
} from '../../model';
import { customFetcher } from '../../api';
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
/**
* @summary Verify Channels
*/
export type verifyChannelsResponse200 = {
data: ChannelVerifyResponse
status: 200
}
export type verifyChannelsResponse422 = {
data: HTTPValidationError
status: 422
}
export type verifyChannelsResponseSuccess = (verifyChannelsResponse200) & {
headers: Headers;
};
export type verifyChannelsResponseError = (verifyChannelsResponse422) & {
headers: Headers;
};
export type verifyChannelsResponse = (verifyChannelsResponseSuccess | verifyChannelsResponseError)
export const getVerifyChannelsUrl = () => {
return `/api/channels/verify`
}
export const verifyChannels = async (channelVerifyRequest: ChannelVerifyRequest, options?: RequestInit): Promise<verifyChannelsResponse> => {
return customFetcher<verifyChannelsResponse>(getVerifyChannelsUrl(),
{
...options,
method: 'POST',
headers: { 'Content-Type': 'application/json', ...options?.headers },
body: JSON.stringify(
channelVerifyRequest,)
}
);}
export const getVerifyChannelsMutationOptions = <TError = HTTPValidationError,
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof verifyChannels>>, TError,{data: ChannelVerifyRequest}, TContext>, request?: SecondParameter<typeof customFetcher>}
): UseMutationOptions<Awaited<ReturnType<typeof verifyChannels>>, TError,{data: ChannelVerifyRequest}, TContext> => {
const mutationKey = ['verifyChannels'];
const {mutation: mutationOptions, request: requestOptions} = options ?
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
options
: {...options, mutation: {...options.mutation, mutationKey}}
: {mutation: { mutationKey, }, request: undefined};
const mutationFn: MutationFunction<Awaited<ReturnType<typeof verifyChannels>>, {data: ChannelVerifyRequest}> = (props) => {
const {data} = props ?? {};
return verifyChannels(data,requestOptions)
}
return { mutationFn, ...mutationOptions }}
export type VerifyChannelsMutationResult = NonNullable<Awaited<ReturnType<typeof verifyChannels>>>
export type VerifyChannelsMutationBody = ChannelVerifyRequest
export type VerifyChannelsMutationError = HTTPValidationError
/**
* @summary Verify Channels
*/
export const useVerifyChannels = <TError = HTTPValidationError,
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof verifyChannels>>, TError,{data: ChannelVerifyRequest}, TContext>, request?: SecondParameter<typeof customFetcher>}
, queryClient?: QueryClient): UseMutationResult<
Awaited<ReturnType<typeof verifyChannels>>,
TError,
{data: ChannelVerifyRequest},
TContext
> => {
const mutationOptions = getVerifyChannelsMutationOptions(options);
return useMutation(mutationOptions, queryClient);
}
+248
View File
@@ -0,0 +1,248 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
import {
useMutation,
useQuery
} from '@tanstack/react-query';
import type {
DataTag,
DefinedInitialDataOptions,
DefinedUseQueryResult,
MutationFunction,
QueryClient,
QueryFunction,
QueryKey,
UndefinedInitialDataOptions,
UseMutationOptions,
UseMutationResult,
UseQueryOptions,
UseQueryResult
} from '@tanstack/react-query';
import type {
ClinicCreate,
ClinicCreateResponse,
ClinicHistoryResponse,
HTTPValidationError
} from '../../model';
import { customFetcher } from '../../api';
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
/**
* @summary Create Clinic
*/
export type createClinicResponse201 = {
data: ClinicCreateResponse
status: 201
}
export type createClinicResponse422 = {
data: HTTPValidationError
status: 422
}
export type createClinicResponseSuccess = (createClinicResponse201) & {
headers: Headers;
};
export type createClinicResponseError = (createClinicResponse422) & {
headers: Headers;
};
export type createClinicResponse = (createClinicResponseSuccess | createClinicResponseError)
export const getCreateClinicUrl = () => {
return `/api/clinics`
}
export const createClinic = async (clinicCreate: ClinicCreate, options?: RequestInit): Promise<createClinicResponse> => {
return customFetcher<createClinicResponse>(getCreateClinicUrl(),
{
...options,
method: 'POST',
headers: { 'Content-Type': 'application/json', ...options?.headers },
body: JSON.stringify(
clinicCreate,)
}
);}
export const getCreateClinicMutationOptions = <TError = HTTPValidationError,
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createClinic>>, TError,{data: ClinicCreate}, TContext>, request?: SecondParameter<typeof customFetcher>}
): UseMutationOptions<Awaited<ReturnType<typeof createClinic>>, TError,{data: ClinicCreate}, TContext> => {
const mutationKey = ['createClinic'];
const {mutation: mutationOptions, request: requestOptions} = options ?
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
options
: {...options, mutation: {...options.mutation, mutationKey}}
: {mutation: { mutationKey, }, request: undefined};
const mutationFn: MutationFunction<Awaited<ReturnType<typeof createClinic>>, {data: ClinicCreate}> = (props) => {
const {data} = props ?? {};
return createClinic(data,requestOptions)
}
return { mutationFn, ...mutationOptions }}
export type CreateClinicMutationResult = NonNullable<Awaited<ReturnType<typeof createClinic>>>
export type CreateClinicMutationBody = ClinicCreate
export type CreateClinicMutationError = HTTPValidationError
/**
* @summary Create Clinic
*/
export const useCreateClinic = <TError = HTTPValidationError,
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createClinic>>, TError,{data: ClinicCreate}, TContext>, request?: SecondParameter<typeof customFetcher>}
, queryClient?: QueryClient): UseMutationResult<
Awaited<ReturnType<typeof createClinic>>,
TError,
{data: ClinicCreate},
TContext
> => {
const mutationOptions = getCreateClinicMutationOptions(options);
return useMutation(mutationOptions, queryClient);
}
/**
* @summary Get Clinic History
*/
export type getClinicHistoryResponse200 = {
data: ClinicHistoryResponse
status: 200
}
export type getClinicHistoryResponse422 = {
data: HTTPValidationError
status: 422
}
export type getClinicHistoryResponseSuccess = (getClinicHistoryResponse200) & {
headers: Headers;
};
export type getClinicHistoryResponseError = (getClinicHistoryResponse422) & {
headers: Headers;
};
export type getClinicHistoryResponse = (getClinicHistoryResponseSuccess | getClinicHistoryResponseError)
export const getGetClinicHistoryUrl = (id: string,) => {
return `/api/clinics/${id}/history`
}
export const getClinicHistory = async (id: string, options?: RequestInit): Promise<getClinicHistoryResponse> => {
return customFetcher<getClinicHistoryResponse>(getGetClinicHistoryUrl(id),
{
...options,
method: 'GET'
}
);}
export const getGetClinicHistoryQueryKey = (id?: string,) => {
return [
`/api/clinics/${id}/history`
] as const;
}
export const getGetClinicHistoryQueryOptions = <TData = Awaited<ReturnType<typeof getClinicHistory>>, TError = HTTPValidationError>(id: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getClinicHistory>>, TError, TData>>, request?: SecondParameter<typeof customFetcher>}
) => {
const {query: queryOptions, request: requestOptions} = options ?? {};
const queryKey = queryOptions?.queryKey ?? getGetClinicHistoryQueryKey(id);
const queryFn: QueryFunction<Awaited<ReturnType<typeof getClinicHistory>>> = () => getClinicHistory(id, requestOptions);
return { queryKey, queryFn, enabled: !!(id), staleTime: 60000, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getClinicHistory>>, TError, TData> & { queryKey: DataTag<QueryKey, TData> }
}
export type GetClinicHistoryQueryResult = NonNullable<Awaited<ReturnType<typeof getClinicHistory>>>
export type GetClinicHistoryQueryError = HTTPValidationError
export function useGetClinicHistory<TData = Awaited<ReturnType<typeof getClinicHistory>>, TError = HTTPValidationError>(
id: string, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getClinicHistory>>, TError, TData>> & Pick<
DefinedInitialDataOptions<
Awaited<ReturnType<typeof getClinicHistory>>,
TError,
Awaited<ReturnType<typeof getClinicHistory>>
> , 'initialData'
>, request?: SecondParameter<typeof customFetcher>}
, queryClient?: QueryClient
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> }
export function useGetClinicHistory<TData = Awaited<ReturnType<typeof getClinicHistory>>, TError = HTTPValidationError>(
id: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getClinicHistory>>, TError, TData>> & Pick<
UndefinedInitialDataOptions<
Awaited<ReturnType<typeof getClinicHistory>>,
TError,
Awaited<ReturnType<typeof getClinicHistory>>
> , 'initialData'
>, request?: SecondParameter<typeof customFetcher>}
, queryClient?: QueryClient
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> }
export function useGetClinicHistory<TData = Awaited<ReturnType<typeof getClinicHistory>>, TError = HTTPValidationError>(
id: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getClinicHistory>>, TError, TData>>, request?: SecondParameter<typeof customFetcher>}
, queryClient?: QueryClient
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> }
/**
* @summary Get Clinic History
*/
export function useGetClinicHistory<TData = Awaited<ReturnType<typeof getClinicHistory>>, TError = HTTPValidationError>(
id: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getClinicHistory>>, TError, TData>>, request?: SecondParameter<typeof customFetcher>}
, queryClient?: QueryClient
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {
const queryOptions = getGetClinicHistoryQueryOptions(id,options)
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
query.queryKey = queryOptions.queryKey ;
return query;
}
+140
View File
@@ -0,0 +1,140 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
import {
useQuery
} from '@tanstack/react-query';
import type {
DataTag,
DefinedInitialDataOptions,
DefinedUseQueryResult,
QueryClient,
QueryFunction,
QueryKey,
UndefinedInitialDataOptions,
UseQueryOptions,
UseQueryResult
} from '@tanstack/react-query';
import { customFetcher } from '../../api';
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
/**
* @summary Health
*/
export type healthHealthResponse200 = {
data: unknown
status: 200
}
export type healthHealthResponseSuccess = (healthHealthResponse200) & {
headers: Headers;
};
;
export type healthHealthResponse = (healthHealthResponseSuccess)
export const getHealthHealthUrl = () => {
return `/health`
}
export const healthHealth = async ( options?: RequestInit): Promise<healthHealthResponse> => {
return customFetcher<healthHealthResponse>(getHealthHealthUrl(),
{
...options,
method: 'GET'
}
);}
export const getHealthHealthQueryKey = () => {
return [
`/health`
] as const;
}
export const getHealthHealthQueryOptions = <TData = Awaited<ReturnType<typeof healthHealth>>, TError = unknown>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof healthHealth>>, TError, TData>>, request?: SecondParameter<typeof customFetcher>}
) => {
const {query: queryOptions, request: requestOptions} = options ?? {};
const queryKey = queryOptions?.queryKey ?? getHealthHealthQueryKey();
const queryFn: QueryFunction<Awaited<ReturnType<typeof healthHealth>>> = () => healthHealth(requestOptions);
return { queryKey, queryFn, staleTime: 60000, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof healthHealth>>, TError, TData> & { queryKey: DataTag<QueryKey, TData> }
}
export type HealthHealthQueryResult = NonNullable<Awaited<ReturnType<typeof healthHealth>>>
export type HealthHealthQueryError = unknown
export function useHealthHealth<TData = Awaited<ReturnType<typeof healthHealth>>, TError = unknown>(
options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof healthHealth>>, TError, TData>> & Pick<
DefinedInitialDataOptions<
Awaited<ReturnType<typeof healthHealth>>,
TError,
Awaited<ReturnType<typeof healthHealth>>
> , 'initialData'
>, request?: SecondParameter<typeof customFetcher>}
, queryClient?: QueryClient
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> }
export function useHealthHealth<TData = Awaited<ReturnType<typeof healthHealth>>, TError = unknown>(
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof healthHealth>>, TError, TData>> & Pick<
UndefinedInitialDataOptions<
Awaited<ReturnType<typeof healthHealth>>,
TError,
Awaited<ReturnType<typeof healthHealth>>
> , 'initialData'
>, request?: SecondParameter<typeof customFetcher>}
, queryClient?: QueryClient
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> }
export function useHealthHealth<TData = Awaited<ReturnType<typeof healthHealth>>, TError = unknown>(
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof healthHealth>>, TError, TData>>, request?: SecondParameter<typeof customFetcher>}
, queryClient?: QueryClient
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> }
/**
* @summary Health
*/
export function useHealthHealth<TData = Awaited<ReturnType<typeof healthHealth>>, TError = unknown>(
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof healthHealth>>, TError, TData>>, request?: SecondParameter<typeof customFetcher>}
, queryClient?: QueryClient
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {
const queryOptions = getHealthHealthQueryOptions(options)
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
query.queryKey = queryOptions.queryKey ;
return query;
}
+247
View File
@@ -0,0 +1,247 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
import {
useMutation,
useQuery
} from '@tanstack/react-query';
import type {
DataTag,
DefinedInitialDataOptions,
DefinedUseQueryResult,
MutationFunction,
QueryClient,
QueryFunction,
QueryKey,
UndefinedInitialDataOptions,
UseMutationOptions,
UseMutationResult,
UseQueryOptions,
UseQueryResult
} from '@tanstack/react-query';
import type {
HTTPValidationError,
PlanCreate,
PlanResponse
} from '../../model';
import { customFetcher } from '../../api';
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
/**
* @summary Create Plan
*/
export type createPlanResponse201 = {
data: PlanResponse
status: 201
}
export type createPlanResponse422 = {
data: HTTPValidationError
status: 422
}
export type createPlanResponseSuccess = (createPlanResponse201) & {
headers: Headers;
};
export type createPlanResponseError = (createPlanResponse422) & {
headers: Headers;
};
export type createPlanResponse = (createPlanResponseSuccess | createPlanResponseError)
export const getCreatePlanUrl = () => {
return `/api/plans`
}
export const createPlan = async (planCreate: PlanCreate, options?: RequestInit): Promise<createPlanResponse> => {
return customFetcher<createPlanResponse>(getCreatePlanUrl(),
{
...options,
method: 'POST',
headers: { 'Content-Type': 'application/json', ...options?.headers },
body: JSON.stringify(
planCreate,)
}
);}
export const getCreatePlanMutationOptions = <TError = HTTPValidationError,
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createPlan>>, TError,{data: PlanCreate}, TContext>, request?: SecondParameter<typeof customFetcher>}
): UseMutationOptions<Awaited<ReturnType<typeof createPlan>>, TError,{data: PlanCreate}, TContext> => {
const mutationKey = ['createPlan'];
const {mutation: mutationOptions, request: requestOptions} = options ?
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
options
: {...options, mutation: {...options.mutation, mutationKey}}
: {mutation: { mutationKey, }, request: undefined};
const mutationFn: MutationFunction<Awaited<ReturnType<typeof createPlan>>, {data: PlanCreate}> = (props) => {
const {data} = props ?? {};
return createPlan(data,requestOptions)
}
return { mutationFn, ...mutationOptions }}
export type CreatePlanMutationResult = NonNullable<Awaited<ReturnType<typeof createPlan>>>
export type CreatePlanMutationBody = PlanCreate
export type CreatePlanMutationError = HTTPValidationError
/**
* @summary Create Plan
*/
export const useCreatePlan = <TError = HTTPValidationError,
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createPlan>>, TError,{data: PlanCreate}, TContext>, request?: SecondParameter<typeof customFetcher>}
, queryClient?: QueryClient): UseMutationResult<
Awaited<ReturnType<typeof createPlan>>,
TError,
{data: PlanCreate},
TContext
> => {
const mutationOptions = getCreatePlanMutationOptions(options);
return useMutation(mutationOptions, queryClient);
}
/**
* @summary Get Plan
*/
export type getPlanResponse200 = {
data: PlanResponse
status: 200
}
export type getPlanResponse422 = {
data: HTTPValidationError
status: 422
}
export type getPlanResponseSuccess = (getPlanResponse200) & {
headers: Headers;
};
export type getPlanResponseError = (getPlanResponse422) & {
headers: Headers;
};
export type getPlanResponse = (getPlanResponseSuccess | getPlanResponseError)
export const getGetPlanUrl = (id: string,) => {
return `/api/plans/${id}`
}
export const getPlan = async (id: string, options?: RequestInit): Promise<getPlanResponse> => {
return customFetcher<getPlanResponse>(getGetPlanUrl(id),
{
...options,
method: 'GET'
}
);}
export const getGetPlanQueryKey = (id?: string,) => {
return [
`/api/plans/${id}`
] as const;
}
export const getGetPlanQueryOptions = <TData = Awaited<ReturnType<typeof getPlan>>, TError = HTTPValidationError>(id: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getPlan>>, TError, TData>>, request?: SecondParameter<typeof customFetcher>}
) => {
const {query: queryOptions, request: requestOptions} = options ?? {};
const queryKey = queryOptions?.queryKey ?? getGetPlanQueryKey(id);
const queryFn: QueryFunction<Awaited<ReturnType<typeof getPlan>>> = () => getPlan(id, requestOptions);
return { queryKey, queryFn, enabled: !!(id), staleTime: 60000, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getPlan>>, TError, TData> & { queryKey: DataTag<QueryKey, TData> }
}
export type GetPlanQueryResult = NonNullable<Awaited<ReturnType<typeof getPlan>>>
export type GetPlanQueryError = HTTPValidationError
export function useGetPlan<TData = Awaited<ReturnType<typeof getPlan>>, TError = HTTPValidationError>(
id: string, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getPlan>>, TError, TData>> & Pick<
DefinedInitialDataOptions<
Awaited<ReturnType<typeof getPlan>>,
TError,
Awaited<ReturnType<typeof getPlan>>
> , 'initialData'
>, request?: SecondParameter<typeof customFetcher>}
, queryClient?: QueryClient
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> }
export function useGetPlan<TData = Awaited<ReturnType<typeof getPlan>>, TError = HTTPValidationError>(
id: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getPlan>>, TError, TData>> & Pick<
UndefinedInitialDataOptions<
Awaited<ReturnType<typeof getPlan>>,
TError,
Awaited<ReturnType<typeof getPlan>>
> , 'initialData'
>, request?: SecondParameter<typeof customFetcher>}
, queryClient?: QueryClient
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> }
export function useGetPlan<TData = Awaited<ReturnType<typeof getPlan>>, TError = HTTPValidationError>(
id: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getPlan>>, TError, TData>>, request?: SecondParameter<typeof customFetcher>}
, queryClient?: QueryClient
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> }
/**
* @summary Get Plan
*/
export function useGetPlan<TData = Awaited<ReturnType<typeof getPlan>>, TError = HTTPValidationError>(
id: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getPlan>>, TError, TData>>, request?: SecondParameter<typeof customFetcher>}
, queryClient?: QueryClient
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {
const queryOptions = getGetPlanQueryOptions(id,options)
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
query.queryKey = queryOptions.queryKey ;
return query;
}
+152
View File
@@ -0,0 +1,152 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
import {
useQuery
} from '@tanstack/react-query';
import type {
DataTag,
DefinedInitialDataOptions,
DefinedUseQueryResult,
QueryClient,
QueryFunction,
QueryKey,
UndefinedInitialDataOptions,
UseQueryOptions,
UseQueryResult
} from '@tanstack/react-query';
import type {
HTTPValidationError,
ReportResponse
} from '../../model';
import { customFetcher } from '../../api';
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
/**
* @summary Get Report
*/
export type getReportResponse200 = {
data: ReportResponse
status: 200
}
export type getReportResponse422 = {
data: HTTPValidationError
status: 422
}
export type getReportResponseSuccess = (getReportResponse200) & {
headers: Headers;
};
export type getReportResponseError = (getReportResponse422) & {
headers: Headers;
};
export type getReportResponse = (getReportResponseSuccess | getReportResponseError)
export const getGetReportUrl = (runId: string,) => {
return `/api/reports/${runId}`
}
export const getReport = async (runId: string, options?: RequestInit): Promise<getReportResponse> => {
return customFetcher<getReportResponse>(getGetReportUrl(runId),
{
...options,
method: 'GET'
}
);}
export const getGetReportQueryKey = (runId?: string,) => {
return [
`/api/reports/${runId}`
] as const;
}
export const getGetReportQueryOptions = <TData = Awaited<ReturnType<typeof getReport>>, TError = HTTPValidationError>(runId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getReport>>, TError, TData>>, request?: SecondParameter<typeof customFetcher>}
) => {
const {query: queryOptions, request: requestOptions} = options ?? {};
const queryKey = queryOptions?.queryKey ?? getGetReportQueryKey(runId);
const queryFn: QueryFunction<Awaited<ReturnType<typeof getReport>>> = () => getReport(runId, requestOptions);
return { queryKey, queryFn, enabled: !!(runId), staleTime: 60000, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getReport>>, TError, TData> & { queryKey: DataTag<QueryKey, TData> }
}
export type GetReportQueryResult = NonNullable<Awaited<ReturnType<typeof getReport>>>
export type GetReportQueryError = HTTPValidationError
export function useGetReport<TData = Awaited<ReturnType<typeof getReport>>, TError = HTTPValidationError>(
runId: string, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getReport>>, TError, TData>> & Pick<
DefinedInitialDataOptions<
Awaited<ReturnType<typeof getReport>>,
TError,
Awaited<ReturnType<typeof getReport>>
> , 'initialData'
>, request?: SecondParameter<typeof customFetcher>}
, queryClient?: QueryClient
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> }
export function useGetReport<TData = Awaited<ReturnType<typeof getReport>>, TError = HTTPValidationError>(
runId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getReport>>, TError, TData>> & Pick<
UndefinedInitialDataOptions<
Awaited<ReturnType<typeof getReport>>,
TError,
Awaited<ReturnType<typeof getReport>>
> , 'initialData'
>, request?: SecondParameter<typeof customFetcher>}
, queryClient?: QueryClient
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> }
export function useGetReport<TData = Awaited<ReturnType<typeof getReport>>, TError = HTTPValidationError>(
runId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getReport>>, TError, TData>>, request?: SecondParameter<typeof customFetcher>}
, queryClient?: QueryClient
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> }
/**
* @summary Get Report
*/
export function useGetReport<TData = Awaited<ReturnType<typeof getReport>>, TError = HTTPValidationError>(
runId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getReport>>, TError, TData>>, request?: SecondParameter<typeof customFetcher>}
, queryClient?: QueryClient
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {
const queryOptions = getGetReportQueryOptions(runId,options)
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
query.queryKey = queryOptions.queryKey ;
return query;
}
+17
View File
@@ -0,0 +1,17 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
import type { AnalysisCreateClinicId } from './analysisCreateClinicId';
import type { AnalysisCreateUrl } from './analysisCreateUrl';
import type { Channels } from './channels';
import type { AnalysisOptions } from './analysisOptions';
export interface AnalysisCreate {
clinic_id?: AnalysisCreateClinicId;
url?: AnalysisCreateUrl;
channels: Channels;
options?: AnalysisOptions;
}
@@ -0,0 +1,8 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export type AnalysisCreateClinicId = string | null;
@@ -0,0 +1,8 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export type AnalysisCreateUrl = string | null;
+11
View File
@@ -0,0 +1,11 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export interface AnalysisOptions {
skip_vision?: boolean;
skip_perplexity?: boolean;
}
@@ -0,0 +1,15 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
import type { AnalysisStatus } from './analysisStatus';
export interface AnalysisStartResponse {
analysis_run_id: string;
clinic_id: string;
status: AnalysisStatus;
estimated_seconds: number;
poll_url: string;
}
+18
View File
@@ -0,0 +1,18 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export type AnalysisStatus = typeof AnalysisStatus[keyof typeof AnalysisStatus];
// eslint-disable-next-line @typescript-eslint/no-redeclare
export const AnalysisStatus = {
discovering: 'discovering',
collecting: 'collecting',
analyzing: 'analyzing',
completed: 'completed',
failed: 'failed',
} as const;
@@ -0,0 +1,18 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
import type { AnalysisStatus } from './analysisStatus';
import type { AnalysisStatusResponseChannelErrors } from './analysisStatusResponseChannelErrors';
import type { AnalysisStatusResponseCompletedAt } from './analysisStatusResponseCompletedAt';
export interface AnalysisStatusResponse {
analysis_run_id: string;
status: AnalysisStatus;
progress: number;
current_step: string;
channel_errors: AnalysisStatusResponseChannelErrors;
completed_at: AnalysisStatusResponseCompletedAt;
}
@@ -0,0 +1,8 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export type AnalysisStatusResponseChannelErrors = { [key: string]: unknown };
@@ -0,0 +1,8 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export type AnalysisStatusResponseCompletedAt = string | null;
@@ -0,0 +1,13 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
import type { ChannelVerifyRequestYoutube } from './channelVerifyRequestYoutube';
import type { ChannelVerifyRequestInstagram } from './channelVerifyRequestInstagram';
export interface ChannelVerifyRequest {
youtube?: ChannelVerifyRequestYoutube;
instagram?: ChannelVerifyRequestInstagram;
}
@@ -0,0 +1,8 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export type ChannelVerifyRequestInstagram = string[] | null;
@@ -0,0 +1,8 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export type ChannelVerifyRequestYoutube = string | null;
@@ -0,0 +1,13 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
import type { ChannelVerifyResponseYoutube } from './channelVerifyResponseYoutube';
import type { ChannelVerifyResponseInstagram } from './channelVerifyResponseInstagram';
export interface ChannelVerifyResponse {
youtube?: ChannelVerifyResponseYoutube;
instagram?: ChannelVerifyResponseInstagram;
}
@@ -0,0 +1,9 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
import type { ChannelVerifyResponseInstagramAnyOfItem } from './channelVerifyResponseInstagramAnyOfItem';
export type ChannelVerifyResponseInstagram = ChannelVerifyResponseInstagramAnyOfItem[] | null;
@@ -0,0 +1,8 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export type ChannelVerifyResponseInstagramAnyOfItem = { [key: string]: unknown };
@@ -0,0 +1,9 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
import type { ChannelVerifyResponseYoutubeAnyOf } from './channelVerifyResponseYoutubeAnyOf';
export type ChannelVerifyResponseYoutube = ChannelVerifyResponseYoutubeAnyOf | null;
@@ -0,0 +1,8 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export type ChannelVerifyResponseYoutubeAnyOf = { [key: string]: unknown };
+19
View File
@@ -0,0 +1,19 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
import type { ChannelsYoutube } from './channelsYoutube';
import type { ChannelsInstagram } from './channelsInstagram';
import type { ChannelsFacebook } from './channelsFacebook';
import type { ChannelsNaverBlog } from './channelsNaverBlog';
import type { ChannelsGangnamUnni } from './channelsGangnamUnni';
export interface Channels {
youtube?: ChannelsYoutube;
instagram?: ChannelsInstagram;
facebook?: ChannelsFacebook;
naver_blog?: ChannelsNaverBlog;
gangnam_unni?: ChannelsGangnamUnni;
}
+8
View File
@@ -0,0 +1,8 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export type ChannelsFacebook = string | null;
@@ -0,0 +1,8 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export type ChannelsGangnamUnni = string | null;
@@ -0,0 +1,8 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export type ChannelsInstagram = string | null;
@@ -0,0 +1,8 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export type ChannelsNaverBlog = string | null;
+8
View File
@@ -0,0 +1,8 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export type ChannelsYoutube = string | null;
+15
View File
@@ -0,0 +1,15 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
import type { ClinicCreateNameEn } from './clinicCreateNameEn';
import type { ClinicCreateAddress } from './clinicCreateAddress';
export interface ClinicCreate {
url: string;
name: string;
name_en?: ClinicCreateNameEn;
address?: ClinicCreateAddress;
}
@@ -0,0 +1,8 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export type ClinicCreateAddress = string | null;
@@ -0,0 +1,8 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export type ClinicCreateNameEn = string | null;
@@ -0,0 +1,13 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export interface ClinicCreateResponse {
id: string;
url: string;
name: string;
created_at: string;
}
@@ -0,0 +1,14 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
import type { RunSummary } from './runSummary';
import type { ClinicHistoryResponseMetricsTimeseries } from './clinicHistoryResponseMetricsTimeseries';
export interface ClinicHistoryResponse {
clinic_id: string;
runs: RunSummary[];
metrics_timeseries: ClinicHistoryResponseMetricsTimeseries;
}
@@ -0,0 +1,8 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export type ClinicHistoryResponseMetricsTimeseries = { [key: string]: unknown };
+11
View File
@@ -0,0 +1,11 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export interface ClinicInfo {
name: string;
url: string;
}
@@ -0,0 +1,11 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
import type { ValidationError } from './validationError';
export interface HTTPValidationError {
detail?: ValidationError[];
}
+56
View File
@@ -0,0 +1,56 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export * from './analysisCreate';
export * from './analysisCreateClinicId';
export * from './analysisCreateUrl';
export * from './analysisOptions';
export * from './analysisStartResponse';
export * from './analysisStatus';
export * from './analysisStatusResponse';
export * from './analysisStatusResponseChannelErrors';
export * from './analysisStatusResponseCompletedAt';
export * from './channelVerifyRequest';
export * from './channelVerifyRequestInstagram';
export * from './channelVerifyRequestYoutube';
export * from './channelVerifyResponse';
export * from './channelVerifyResponseInstagram';
export * from './channelVerifyResponseInstagramAnyOfItem';
export * from './channelVerifyResponseYoutube';
export * from './channelVerifyResponseYoutubeAnyOf';
export * from './channels';
export * from './channelsFacebook';
export * from './channelsGangnamUnni';
export * from './channelsInstagram';
export * from './channelsNaverBlog';
export * from './channelsYoutube';
export * from './clinicCreate';
export * from './clinicCreateAddress';
export * from './clinicCreateNameEn';
export * from './clinicCreateResponse';
export * from './clinicHistoryResponse';
export * from './clinicHistoryResponseMetricsTimeseries';
export * from './clinicInfo';
export * from './hTTPValidationError';
export * from './planCreate';
export * from './planResponse';
export * from './planResponseBrandGuide';
export * from './planResponseContentStrategy';
export * from './reportResponse';
export * from './reportResponseConversionStrategy';
export * from './reportResponseFacebook';
export * from './reportResponseGangnamUnni';
export * from './reportResponseInstagram';
export * from './reportResponseNaverBlog';
export * from './reportResponseNaverPlace';
export * from './reportResponseYoutube';
export * from './runSummary';
export * from './runSummaryCompletedAt';
export * from './runSummaryOverallScore';
export * from './validationError';
export * from './validationErrorCtx';
export * from './validationErrorLocItem';
+11
View File
@@ -0,0 +1,11 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export interface PlanCreate {
report_id: string;
regenerate?: boolean;
}
+18
View File
@@ -0,0 +1,18 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
import type { PlanResponseBrandGuide } from './planResponseBrandGuide';
import type { PlanResponseContentStrategy } from './planResponseContentStrategy';
export interface PlanResponse {
id: string;
analysis_run_id: string;
brand_guide: PlanResponseBrandGuide;
channel_strategies: unknown[];
content_strategy: PlanResponseContentStrategy;
calendar: unknown[];
created_at: string;
}
@@ -0,0 +1,8 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export type PlanResponseBrandGuide = { [key: string]: unknown };
@@ -0,0 +1,8 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export type PlanResponseContentStrategy = { [key: string]: unknown };
+30
View File
@@ -0,0 +1,30 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
import type { ClinicInfo } from './clinicInfo';
import type { ReportResponseYoutube } from './reportResponseYoutube';
import type { ReportResponseInstagram } from './reportResponseInstagram';
import type { ReportResponseFacebook } from './reportResponseFacebook';
import type { ReportResponseNaverPlace } from './reportResponseNaverPlace';
import type { ReportResponseNaverBlog } from './reportResponseNaverBlog';
import type { ReportResponseGangnamUnni } from './reportResponseGangnamUnni';
import type { ReportResponseConversionStrategy } from './reportResponseConversionStrategy';
export interface ReportResponse {
id: string;
clinic: ClinicInfo;
overall_score: number;
youtube: ReportResponseYoutube;
instagram: ReportResponseInstagram;
facebook: ReportResponseFacebook;
naver_place: ReportResponseNaverPlace;
naver_blog: ReportResponseNaverBlog;
gangnam_unni: ReportResponseGangnamUnni;
conversion_strategy: ReportResponseConversionStrategy;
roadmap: unknown[];
kpis: unknown[];
generated_at: string;
}
@@ -0,0 +1,8 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export type ReportResponseConversionStrategy = { [key: string]: unknown };
@@ -0,0 +1,8 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export type ReportResponseFacebook = { [key: string]: unknown };
@@ -0,0 +1,8 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export type ReportResponseGangnamUnni = { [key: string]: unknown };
@@ -0,0 +1,8 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export type ReportResponseInstagram = { [key: string]: unknown };
@@ -0,0 +1,8 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export type ReportResponseNaverBlog = { [key: string]: unknown };
@@ -0,0 +1,8 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export type ReportResponseNaverPlace = { [key: string]: unknown };
@@ -0,0 +1,8 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export type ReportResponseYoutube = { [key: string]: unknown };
+16
View File
@@ -0,0 +1,16 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
import type { RunSummaryCompletedAt } from './runSummaryCompletedAt';
import type { RunSummaryOverallScore } from './runSummaryOverallScore';
export interface RunSummary {
run_id: string;
status: string;
started_at: string;
completed_at: RunSummaryCompletedAt;
overall_score: RunSummaryOverallScore;
}
@@ -0,0 +1,8 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export type RunSummaryCompletedAt = string | null;
@@ -0,0 +1,8 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export type RunSummaryOverallScore = number | null;
+16
View File
@@ -0,0 +1,16 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
import type { ValidationErrorLocItem } from './validationErrorLocItem';
import type { ValidationErrorCtx } from './validationErrorCtx';
export interface ValidationError {
loc: ValidationErrorLocItem[];
msg: string;
type: string;
input?: unknown;
ctx?: ValidationErrorCtx;
}
@@ -0,0 +1,8 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export type ValidationErrorCtx = { [key: string]: unknown };
@@ -0,0 +1,8 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export type ValidationErrorLocItem = string | number;
+13
View File
@@ -0,0 +1,13 @@
/**
* 페이지 플로우는 동적 라우트를 위해 경로 prefix 를 사용합니다.
* startsWith 매칭으로 /report/{any-id} 가 '/report/' 와 매칭됩니다.
*/
export const PAGE_FLOW = [
{ prefix: '/', label: '랜딩', exact: true },
{ prefix: '/report/', label: '마케팅 분석' },
{ prefix: '/plan/', label: '콘텐츠 기획' },
{ prefix: '/studio/', label: '콘텐츠 제작' },
{ prefix: '/channels', label: '채널 연결', exact: true },
{ prefix: '/distribute', label: '콘텐츠 배포', exact: true },
{ prefix: '/performance', label: '성과 관리', exact: true },
];
+11
View File
@@ -0,0 +1,11 @@
export const PLAN_SECTIONS = [
{ id: 'branding-guide', label: '브랜딩 가이드' },
{ id: 'channel-strategy', label: '채널 전략' },
{ id: 'content-strategy', label: '콘텐츠 전략' },
{ id: 'content-calendar', label: '콘텐츠 캘린더' },
{ id: 'asset-collection', label: '에셋 수집' },
{ id: 'repurposing-proposal', label: '리퍼포징 제안' },
{ id: 'workflow-tracker', label: '제작 파이프라인' },
{ id: 'my-asset-upload', label: '나의 소재' },
{ id: 'strategy-adjustment', label: '전략 조정' },
];
+12
View File
@@ -0,0 +1,12 @@
export const REPORT_SECTIONS = [
{ id: 'header', label: '개요' },
{ id: 'clinic-snapshot', label: '의원 현황' },
{ id: 'channel-overview', label: '채널 종합' },
{ id: 'youtube-audit', label: 'YouTube' },
{ id: 'instagram-audit', label: 'Instagram' },
{ id: 'facebook-audit', label: 'Facebook' },
{ id: 'other-channels', label: '기타 채널' },
{ id: 'problem-diagnosis', label: '문제 진단' },
{ id: 'roadmap', label: '로드맵' },
{ id: 'kpi-dashboard', label: 'KPI' },
];
+326
View File
@@ -0,0 +1,326 @@
/**
* Channel Strategy & Content Calendar 용 Filled/Shape 스타일 아이콘.
* 부드러운 파스텔 컬러, 외곽선 없음 — 모든 도형은 fill 만 사용.
*/
interface IconProps {
size?: number;
className?: string;
}
export function YoutubeFilled({ size = 20, className = '' }: IconProps) {
return (
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
<rect x="2" y="4" width="20" height="16" rx="4" fill="currentColor" opacity="0.25" />
<path d="M10 8.5v7l6-3.5-6-3.5z" fill="currentColor" />
</svg>
);
}
export function InstagramFilled({ size = 20, className = '' }: IconProps) {
return (
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
<rect x="2" y="2" width="20" height="20" rx="6" fill="currentColor" opacity="0.25" />
<circle cx="12" cy="12" r="4.5" fill="currentColor" />
<circle cx="17.5" cy="6.5" r="1.5" fill="currentColor" />
</svg>
);
}
export function FacebookFilled({ size = 20, className = '' }: IconProps) {
return (
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
<rect x="2" y="2" width="20" height="20" rx="6" fill="currentColor" opacity="0.25" />
<path d="M15.5 3.5H13.5C11.29 3.5 9.5 5.29 9.5 7.5V9.5H7.5V12.5H9.5V20.5H12.5V12.5H14.5L15.5 9.5H12.5V7.5C12.5 7.22 12.72 7 13 7H15.5V3.5Z" fill="currentColor" />
</svg>
);
}
export function GlobeFilled({ size = 20, className = '' }: IconProps) {
return (
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
<circle cx="12" cy="12" r="10" fill="currentColor" opacity="0.2" />
<ellipse cx="12" cy="12" rx="4" ry="10" fill="currentColor" opacity="0.35" />
<line x1="2" y1="12" x2="22" y2="12" stroke="currentColor" strokeWidth="1.5" opacity="0.5" />
<line x1="12" y1="2" x2="12" y2="22" stroke="currentColor" strokeWidth="1.5" opacity="0.3" />
</svg>
);
}
export function VideoFilled({ size = 20, className = '' }: IconProps) {
return (
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
<rect x="1" y="5" width="15" height="14" rx="3" fill="currentColor" opacity="0.25" />
<path d="M16 9.5L22 6.5V17.5L16 14.5V9.5Z" fill="currentColor" />
<rect x="1" y="5" width="15" height="14" rx="3" fill="currentColor" opacity="0.5" />
</svg>
);
}
export function MessageFilled({ size = 20, className = '' }: IconProps) {
return (
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
<path d="M4 4H20C21.1 4 22 4.9 22 6V16C22 17.1 21.1 18 20 18H6L2 22V6C2 4.9 2.9 4 4 4Z" fill="currentColor" opacity="0.3" />
<path d="M4 4H20C21.1 4 22 4.9 22 6V16C22 17.1 21.1 18 20 18H6L2 22V6C2 4.9 2.9 4 4 4Z" fill="currentColor" opacity="0.4" />
</svg>
);
}
export function CalendarFilled({ size = 20, className = '' }: IconProps) {
return (
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
<rect x="3" y="4" width="18" height="18" rx="3" fill="currentColor" opacity="0.25" />
<rect x="3" y="4" width="18" height="6" rx="3" fill="currentColor" opacity="0.5" />
<circle cx="8" cy="15" r="1.2" fill="currentColor" />
<circle cx="12" cy="15" r="1.2" fill="currentColor" />
<circle cx="16" cy="15" r="1.2" fill="currentColor" />
<line x1="8" y1="2" x2="8" y2="5" stroke="currentColor" strokeWidth="2" strokeLinecap="round" />
<line x1="16" y1="2" x2="16" y2="5" stroke="currentColor" strokeWidth="2" strokeLinecap="round" />
</svg>
);
}
export function FileTextFilled({ size = 20, className = '' }: IconProps) {
return (
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
<path d="M6 2H14L20 8V20C20 21.1 19.1 22 18 22H6C4.9 22 4 21.1 4 20V4C4 2.9 4.9 2 6 2Z" fill="currentColor" opacity="0.25" />
<path d="M14 2L20 8H16C14.9 8 14 7.1 14 6V2Z" fill="currentColor" opacity="0.5" />
<rect x="8" y="12" width="8" height="1.5" rx="0.75" fill="currentColor" />
<rect x="8" y="16" width="5" height="1.5" rx="0.75" fill="currentColor" />
</svg>
);
}
export function ShareFilled({ size = 20, className = '' }: IconProps) {
return (
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
<circle cx="18" cy="5" r="3.5" fill="currentColor" opacity="0.4" />
<circle cx="6" cy="12" r="3.5" fill="currentColor" opacity="0.4" />
<circle cx="18" cy="19" r="3.5" fill="currentColor" opacity="0.4" />
<line x1="9" y1="10.5" x2="15" y2="6.5" stroke="currentColor" strokeWidth="2" opacity="0.3" />
<line x1="9" y1="13.5" x2="15" y2="17.5" stroke="currentColor" strokeWidth="2" opacity="0.3" />
</svg>
);
}
export function MegaphoneFilled({ size = 20, className = '' }: IconProps) {
return (
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
<path d="M19 3L8 8H4C2.9 8 2 8.9 2 10V14C2 15.1 2.9 16 4 16H5L7 21H10L8 16L19 21V3Z" fill="currentColor" opacity="0.35" />
<path d="M21 10C22.1 10 23 10.9 23 12C23 13.1 22.1 14 21 14" stroke="currentColor" strokeWidth="2" strokeLinecap="round" opacity="0.5" />
</svg>
);
}
export function TiktokFilled({ size = 20, className = '' }: IconProps) {
return (
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
<rect x="2" y="2" width="20" height="20" rx="6" fill="currentColor" opacity="0.25" />
<path d="M16.5 4.5V12.5C16.5 15.26 14.26 17.5 11.5 17.5C8.74 17.5 6.5 15.26 6.5 12.5C6.5 9.74 8.74 7.5 11.5 7.5V10C10.12 10 9 11.12 9 12.5C9 13.88 10.12 15 11.5 15C12.88 15 14 13.88 14 12.5V4.5H16.5Z" fill="currentColor" />
</svg>
);
}
export function MusicFilled({ size = 20, className = '' }: IconProps) {
return (
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
<circle cx="7" cy="17" r="3" fill="currentColor" opacity="0.25" />
<circle cx="17" cy="15" r="3" fill="currentColor" opacity="0.25" />
<circle cx="7" cy="17" r="2" fill="currentColor" />
<circle cx="17" cy="15" r="2" fill="currentColor" />
<path d="M9 17V7L19 5V15" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" fill="none" />
<rect x="9" y="5" width="10" height="2" rx="1" fill="currentColor" opacity="0.4" />
</svg>
);
}
/* ─── Dashboard / Utility Icons ─── */
export function ShieldFilled({ size = 20, className = '' }: IconProps) {
return (
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
<path d="M12 2L3 7V12C3 17.5 6.8 22.7 12 24C17.2 22.7 21 17.5 21 12V7L12 2Z" fill="currentColor" opacity="0.25" />
<path d="M12 2L3 7V12C3 17.5 6.8 22.7 12 24C17.2 22.7 21 17.5 21 12V7L12 2Z" fill="currentColor" opacity="0.3" />
<path d="M10 14L8.5 12.5L7.5 13.5L10 16L16.5 9.5L15.5 8.5L10 14Z" fill="currentColor" />
</svg>
);
}
export function DatabaseFilled({ size = 20, className = '' }: IconProps) {
return (
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
<ellipse cx="12" cy="6" rx="8" ry="3" fill="currentColor" opacity="0.35" />
<path d="M4 6V12C4 13.66 7.58 15 12 15C16.42 15 20 13.66 20 12V6" fill="currentColor" opacity="0.25" />
<path d="M4 12V18C4 19.66 7.58 21 12 21C16.42 21 20 19.66 20 18V12" fill="currentColor" opacity="0.35" />
<ellipse cx="12" cy="18" rx="8" ry="3" fill="currentColor" opacity="0.5" />
</svg>
);
}
export function ServerFilled({ size = 20, className = '' }: IconProps) {
return (
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
<rect x="3" y="2" width="18" height="8" rx="2" fill="currentColor" opacity="0.3" />
<rect x="3" y="14" width="18" height="8" rx="2" fill="currentColor" opacity="0.3" />
<circle cx="7" cy="6" r="1.5" fill="currentColor" />
<circle cx="7" cy="18" r="1.5" fill="currentColor" />
<rect x="11" y="5" width="6" height="2" rx="1" fill="currentColor" opacity="0.5" />
<rect x="11" y="17" width="6" height="2" rx="1" fill="currentColor" opacity="0.5" />
</svg>
);
}
export function BoltFilled({ size = 20, className = '' }: IconProps) {
return (
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
<path d="M13 2L4 14H11L10 22L20 10H13L13 2Z" fill="currentColor" opacity="0.25" />
<path d="M13 2L4 14H11L10 22L20 10H13L13 2Z" fill="currentColor" />
</svg>
);
}
export function EyeFilled({ size = 20, className = '' }: IconProps) {
return (
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
<path d="M12 4.5C7 4.5 2.73 7.61 1 12C2.73 16.39 7 19.5 12 19.5C17 19.5 21.27 16.39 23 12C21.27 7.61 17 4.5 12 4.5Z" fill="currentColor" opacity="0.2" />
<circle cx="12" cy="12" r="4" fill="currentColor" />
</svg>
);
}
export function EyeOffFilled({ size = 20, className = '' }: IconProps) {
return (
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
<path d="M12 4.5C7 4.5 2.73 7.61 1 12C2.73 16.39 7 19.5 12 19.5C17 19.5 21.27 16.39 23 12C21.27 7.61 17 4.5 12 4.5Z" fill="currentColor" opacity="0.15" />
<circle cx="12" cy="12" r="4" fill="currentColor" opacity="0.3" />
<line x1="4" y1="4" x2="20" y2="20" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" />
</svg>
);
}
export function CopyFilled({ size = 20, className = '' }: IconProps) {
return (
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
<rect x="8" y="8" width="12" height="14" rx="2" fill="currentColor" opacity="0.25" />
<rect x="4" y="2" width="12" height="14" rx="2" fill="currentColor" opacity="0.5" />
</svg>
);
}
export function CheckFilled({ size = 20, className = '' }: IconProps) {
return (
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
<circle cx="12" cy="12" r="10" fill="currentColor" opacity="0.25" />
<path d="M8 12L11 15L16 9" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round" />
</svg>
);
}
export function CrossFilled({ size = 20, className = '' }: IconProps) {
return (
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
<circle cx="12" cy="12" r="10" fill="currentColor" opacity="0.25" />
<path d="M8 8L16 16M16 8L8 16" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" />
</svg>
);
}
export function WarningFilled({ size = 20, className = '' }: IconProps) {
return (
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
<path d="M12 2L1 21H23L12 2Z" fill="currentColor" opacity="0.25" />
<rect x="11" y="9" width="2" height="6" rx="1" fill="currentColor" />
<circle cx="12" cy="18" r="1.2" fill="currentColor" />
</svg>
);
}
export function RefreshFilled({ size = 20, className = '' }: IconProps) {
return (
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
<circle cx="12" cy="12" r="9" fill="currentColor" opacity="0.15" />
<path d="M17.65 6.35A7.95 7.95 0 0012 4C7.58 4 4 7.58 4 12C4 16.42 7.58 20 12 20C15.73 20 18.84 17.45 19.73 14H17.65C16.83 16.33 14.61 18 12 18C8.69 18 6 15.31 6 12C6 8.69 8.69 6 12 6C13.66 6 15.14 6.69 16.22 7.78L13 11H20V4L17.65 6.35Z" fill="currentColor" />
</svg>
);
}
export function FlowFilled({ size = 20, className = '' }: IconProps) {
return (
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
<rect x="2" y="3" width="6" height="6" rx="1.5" fill="currentColor" opacity="0.35" />
<rect x="9" y="9" width="6" height="6" rx="1.5" fill="currentColor" opacity="0.5" />
<rect x="16" y="15" width="6" height="6" rx="1.5" fill="currentColor" />
<path d="M8 6H9.5C10.33 6 11 6.67 11 7.5V9" stroke="currentColor" strokeWidth="1.5" opacity="0.4" />
<path d="M15 12H16.5C17.33 12 18 12.67 18 13.5V15" stroke="currentColor" strokeWidth="1.5" opacity="0.4" />
</svg>
);
}
export function CoinFilled({ size = 20, className = '' }: IconProps) {
return (
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
<circle cx="12" cy="12" r="10" fill="currentColor" opacity="0.25" />
<circle cx="12" cy="12" r="7" fill="currentColor" opacity="0.35" />
<text x="12" y="16" textAnchor="middle" fontSize="10" fontWeight="bold" fill="currentColor">$</text>
</svg>
);
}
export function LinkExternalFilled({ size = 20, className = '' }: IconProps) {
return (
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
<rect x="3" y="5" width="14" height="14" rx="2" fill="currentColor" opacity="0.2" />
<path d="M14 3H21V10" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round" />
<path d="M21 3L10 14" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" />
</svg>
);
}
/**
* InfinityLoopFilled — Infinite Marketing 루프 아이콘.
* HubSpot 스타일 인피니티 루프 + 그라데이션 셰이딩.
* 가로 비율, 텍스트 cap-height 에 맞춰 스케일링.
*/
export function DownloadFilled({ size = 20, className = '' }: IconProps) {
return (
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
<rect x="3" y="16" width="18" height="5" rx="1.5" fill="currentColor" opacity="0.25" />
<path d="M12 3v10M8 10l4 4 4-4" stroke="currentColor" strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round" />
</svg>
);
}
export function RocketFilled({ size = 20, className = '' }: IconProps) {
return (
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
<ellipse cx="12" cy="9" rx="5" ry="7" fill="currentColor" opacity="0.25" />
<path d="M12 2C9 2 6 5 6 9c0 3 1.5 5.5 3 7h6c1.5-1.5 3-4 3-7 0-4-3-7-6-7z" fill="currentColor" />
<path d="M9 16l-2 4h10l-2-4" fill="currentColor" opacity="0.4" />
<circle cx="12" cy="9" r="2" fill="white" opacity="0.7" />
</svg>
);
}
export function PrismFilled({ size = 20, className = '' }: IconProps) {
const w = Math.round(size * 1.6);
const h = size;
const id = `inf-grad-${size}`;
return (
<svg width={w} height={h} viewBox="0 0 28 20" fill="none" className={className}>
<defs>
<linearGradient id={id} x1="0" y1="0" x2="28" y2="20" gradientUnits="userSpaceOnUse">
<stop offset="0%" stopColor="currentColor" stopOpacity="0.9" />
<stop offset="45%" stopColor="currentColor" stopOpacity="0.55" />
<stop offset="100%" stopColor="currentColor" stopOpacity="0.85" />
</linearGradient>
</defs>
<path
d="M2,10 C2,4 8,4 14,10 C20,16 26,16 26,10 C26,4 20,4 14,10 C8,16 2,16 2,10Z"
stroke={`url(#${id})`}
strokeWidth="2.8"
strokeLinejoin="round"
fill="none"
/>
</svg>
);
}
+21
View File
@@ -0,0 +1,21 @@
import { Link } from 'react-router';
export default function Footer() {
return (
<footer className="bg-white border-t border-slate-100 py-12 px-6">
<div className="max-w-7xl mx-auto flex flex-col md:flex-row items-center justify-between gap-6">
<Link to="/" className="flex items-center gap-2">
<span className="font-serif text-3xl font-black tracking-[0.05em] bg-gradient-to-r from-[#4F1DA1] to-[#021341] bg-clip-text text-transparent">INFINITH</span>
</Link>
<div className="text-sm text-slate-500 text-center md:text-left">
&copy; {new Date().getFullYear()} INFINITH. All rights reserved. <br className="md:hidden" />
Infinite Marketing for Premium Medical Business & Marketing Agency
</div>
<div className="flex items-center gap-6 text-sm font-medium text-slate-600">
<a href="#" className="hover:text-primary-900 transition-colors">Privacy Policy</a>
<a href="#" className="hover:text-primary-900 transition-colors">Terms of Service</a>
</div>
</div>
</footer>
);
}
+16
View File
@@ -0,0 +1,16 @@
import { Outlet, useLocation } from 'react-router'
import Navbar from './Navbar'
import Footer from './Footer'
export function Layout() {
const location = useLocation()
const isLoadingPage = location.pathname.startsWith('/report/loading')
return (
<div className="min-h-screen bg-slate-50 selection:bg-purple-200 selection:text-primary-900">
{!isLoadingPage && <Navbar />}
<Outlet />
{!isLoadingPage && <Footer />}
</div>
)
}
+71
View File
@@ -0,0 +1,71 @@
/**
* Navbar — 전역 상단 네비게이션.
*
* PART III 피봇:
* - "Free Report" CTA 완전 제거 (계약 기반 영업 모델로 전환).
* - Login 버튼 복원 — 계약 완료된 병원에 별도 발급된 자격 정보로 로그인 (스캐폴딩 단계).
* - 주 CTA는 `문의하기` (mailto:contact@o2o.kr) — 모든 리드 단일 채널화.
*
* 라우팅 구성:
* - 로고 "INFINITH" → `/` (홈)
* - Product / Use Cases → `/#solution`, `/#use-cases` 앵커
* - Pricing → `/pricing?from=header` (유입 추적용 쿼리)
* - Login → `/login` (Secondary pill — 계약 병원 전용)
* - 문의하기 → mailto (Primary pill — 신규 리드)
*
* ⚠️ 앵커 링크를 `/#solution` 형태로 쓰는 이유:
* 단순 `#solution`은 현재 페이지 내부 해시로 해석됩니다.
* 예컨대 `/pricing`에서 `#solution`을 누르면 /pricing 페이지 내의 #solution을 찾다가 실패합니다.
* `/#solution`은 React Router가 홈으로 이동시킨 뒤 브라우저가 해시 스크롤을 처리합니다.
*/
import { Link } from 'react-router';
import { ArrowRight } from 'lucide-react';
import { buildContactMailto } from '../lib/contact';
export default function Navbar() {
return (
<nav className="fixed top-0 left-0 right-0 z-50 bg-white/95 border-b border-slate-100 backdrop-blur-md">
<div className="max-w-7xl mx-auto px-6 h-20 flex items-center justify-between">
{/* 로고 */}
<Link to="/" className="flex items-center gap-2">
<span className="font-serif text-3xl font-black tracking-[0.05em] bg-gradient-to-r from-[#4F1DA1] to-[#021341] bg-clip-text text-transparent">
INFINITH
</span>
</Link>
{/* 가운데 메뉴 */}
<div className="hidden md:flex items-center gap-8 text-sm font-medium text-slate-600">
<a href="/#solution" className="hover:text-primary-900 transition-colors">
Product
</a>
<Link
to="/pricing?from=header"
className="hover:text-primary-900 transition-colors"
>
Pricing
</Link>
<a href="/#use-cases" className="hover:text-primary-900 transition-colors">
Use Cases
</a>
</div>
{/* 우측 CTA — Login(Secondary) + 문의하기(Primary) */}
<div className="flex items-center gap-3">
<Link
to="/login"
className="inline-flex items-center gap-2 px-5 py-2.5 text-sm font-semibold text-[#021341] bg-white border border-slate-200 rounded-full hover:bg-slate-50 hover:border-slate-300 transition-colors"
>
Login
</Link>
<a
href={buildContactMailto('도입 문의')}
className="inline-flex items-center gap-2 px-6 py-3 text-sm font-semibold text-white rounded-full transition-all shadow-sm hover:shadow-md bg-gradient-to-r from-[#4F1DA1] to-[#021341] hover:opacity-90"
>
문의하기
<ArrowRight className="w-4 h-4" />
</a>
</div>
</div>
</nav>
);
}
+77
View File
@@ -0,0 +1,77 @@
import { useLocation, useNavigate } from 'react-router';
import { ChevronLeft, ChevronRight } from 'lucide-react';
import { PAGE_FLOW } from '@/shared/constants/pageFlow';
function findCurrentIndex(pathname: string): number {
return PAGE_FLOW.findIndex((p) =>
p.exact ? pathname === p.prefix : pathname.startsWith(p.prefix)
);
}
function getNavigatePath(prefix: string, currentPath: string): string {
// 동적 라우트의 경우 현재 report/plan ID를 보존하려고 시도
if (prefix === '/') return '/';
// 현재 경로에서 ID 추출 (예: /report/abc123 → abc123)
const idMatch = currentPath.match(/\/(report|plan|studio|clinic)\/(.+)/);
const currentId = idMatch?.[2] || 'live';
if (prefix.endsWith('/')) {
return `${prefix}${currentId}`;
}
return prefix;
}
export default function PageNavigator() {
const location = useLocation();
const navigate = useNavigate();
const currentIndex = findCurrentIndex(location.pathname);
if (currentIndex === -1) return null;
const prev = currentIndex > 0 ? PAGE_FLOW[currentIndex - 1] : null;
const next = currentIndex < PAGE_FLOW.length - 1 ? PAGE_FLOW[currentIndex + 1] : null;
return (
<div
data-no-print
className="fixed bottom-6 left-1/2 -translate-x-1/2 z-50 flex items-center gap-1 bg-white/90 backdrop-blur-xl border border-slate-200 rounded-full px-2 py-2 shadow-[0_4px_20px_rgba(0,0,0,0.08)]"
>
{/* Back */}
<button
onClick={() => prev && navigate(getNavigatePath(prev.prefix, location.pathname))}
disabled={!prev}
className="flex items-center gap-2 px-3 py-2 rounded-full text-sm font-medium transition-all disabled:opacity-30 disabled:cursor-not-allowed hover:bg-slate-50 text-slate-600"
>
<ChevronLeft size={16} />
{prev && <span className="hidden sm:inline">{prev.label}</span>}
</button>
{/* Page Indicators */}
<div className="flex items-center gap-2 px-2">
{PAGE_FLOW.map((page, i) => (
<button
key={page.prefix}
onClick={() => navigate(getNavigatePath(page.prefix, location.pathname))}
title={page.label}
className={`rounded-full transition-all ${
i === currentIndex
? 'w-6 h-2 bg-[#0A1128]'
: 'w-2 h-2 bg-slate-300 hover:bg-slate-400'
}`}
/>
))}
</div>
{/* Next */}
<button
onClick={() => next && navigate(getNavigatePath(next.prefix, location.pathname))}
disabled={!next}
className="flex items-center gap-2 px-3 py-2 rounded-full text-sm font-medium transition-all disabled:opacity-30 disabled:cursor-not-allowed hover:bg-slate-50 text-slate-600"
>
{next && <span className="hidden sm:inline">{next.label}</span>}
<ChevronRight size={16} />
</button>
</div>
);
}
+23
View File
@@ -0,0 +1,23 @@
/**
* contact — 회사 연락처 정보 중앙 관리.
*
* PricingPage / Navbar / LoginPage / CTA 등 여러 파일에서
* `contact@o2o.kr`과 mailto 쿼리를 중복 하드코딩하던 것을 일원화했습니다.
*
* 변경 이력 (PART III 피봇):
* - "Free Report" 진입점 제거 → 모든 리드를 문의하기 단일 채널로 통일
* - 계약 기반 B2B 영업 모델 반영 (온라인 결제/무료 체험 없음)
*/
export const CONTACT_EMAIL = 'contact@o2o.kr';
/**
* INFINITH 태그를 자동으로 prefix한 mailto 링크 생성.
* @param subject 이메일 제목에 들어갈 문구 (자동으로 "[INFINITH] " prefix 추가됨).
*
* 예: buildContactMailto("도입 문의") → mailto:contact@o2o.kr?subject=%5BINFINITH%5D%20%EB%8F%84%EC%9E%85%20%EB%AC%B8%EC%9D%98
*/
export function buildContactMailto(subject: string): string {
const normalizedSubject = subject.trim() || '문의';
return `mailto:${CONTACT_EMAIL}?subject=${encodeURIComponent(`[INFINITH] ${normalizedSubject}`)}`;
}
+6
View File
@@ -0,0 +1,6 @@
import { clsx, type ClassValue } from 'clsx'
import { twMerge } from 'tailwind-merge'
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}
+66
View File
@@ -0,0 +1,66 @@
import * as React from "react"
import { cva, type VariantProps } from "class-variance-authority"
import { cn } from "@/shared/lib/utils"
const alertVariants = cva(
"relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
{
variants: {
variant: {
default: "bg-card text-card-foreground",
destructive:
"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current",
},
},
defaultVariants: {
variant: "default",
},
}
)
function Alert({
className,
variant,
...props
}: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>) {
return (
<div
data-slot="alert"
role="alert"
className={cn(alertVariants({ variant }), className)}
{...props}
/>
)
}
function AlertTitle({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="alert-title"
className={cn(
"col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",
className
)}
{...props}
/>
)
}
function AlertDescription({
className,
...props
}: React.ComponentProps<"div">) {
return (
<div
data-slot="alert-description"
className={cn(
"col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed",
className
)}
{...props}
/>
)
}
export { Alert, AlertTitle, AlertDescription }
+48
View File
@@ -0,0 +1,48 @@
import * as React from "react"
import { cva, type VariantProps } from "class-variance-authority"
import { Slot } from "radix-ui"
import { cn } from "@/shared/lib/utils"
const badgeVariants = cva(
"inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",
{
variants: {
variant: {
default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
secondary:
"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
destructive:
"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",
outline:
"border-border text-foreground [a&]:hover:bg-accent/10 [a&]:hover:text-foreground",
ghost: "[a&]:hover:bg-accent/10 [a&]:hover:text-foreground",
link: "text-primary underline-offset-4 [a&]:hover:underline",
},
},
defaultVariants: {
variant: "default",
},
}
)
function Badge({
className,
variant = "default",
asChild = false,
...props
}: React.ComponentProps<"span"> &
VariantProps<typeof badgeVariants> & { asChild?: boolean }) {
const Comp = asChild ? Slot.Root : "span"
return (
<Comp
data-slot="badge"
data-variant={variant}
className={cn(badgeVariants({ variant }), className)}
{...props}
/>
)
}
export { Badge, badgeVariants }
+64
View File
@@ -0,0 +1,64 @@
import * as React from "react"
import { cva, type VariantProps } from "class-variance-authority"
import { Slot } from "radix-ui"
import { cn } from "@/shared/lib/utils"
const buttonVariants = cva(
"inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none cursor-pointer focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
{
variants: {
variant: {
default: "bg-primary text-primary-foreground hover:bg-primary/90",
destructive:
"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",
outline:
"border bg-background shadow-xs hover:bg-accent/10 hover:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
secondary:
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
ghost:
"hover:bg-accent/10 hover:text-foreground dark:hover:bg-accent/30",
link: "text-primary underline-offset-4 hover:underline",
},
size: {
default: "h-9 px-4 py-2 has-[>svg]:px-3",
xs: "h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
sm: "h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
icon: "size-9",
"icon-xs": "size-6 rounded-md [&_svg:not([class*='size-'])]:size-3",
"icon-sm": "size-8",
"icon-lg": "size-10",
},
},
defaultVariants: {
variant: "default",
size: "default",
},
}
)
function Button({
className,
variant = "default",
size = "default",
asChild = false,
...props
}: React.ComponentProps<"button"> &
VariantProps<typeof buttonVariants> & {
asChild?: boolean
}) {
const Comp = asChild ? Slot.Root : "button"
return (
<Comp
data-slot="button"
data-variant={variant}
data-size={size}
className={cn(buttonVariants({ variant, size, className }))}
{...props}
/>
)
}
export { Button, buttonVariants }
+92
View File
@@ -0,0 +1,92 @@
import * as React from "react"
import { cn } from "@/shared/lib/utils"
function Card({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="card"
className={cn(
"flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",
className
)}
{...props}
/>
)
}
function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="card-header"
className={cn(
"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
className
)}
{...props}
/>
)
}
function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="card-title"
className={cn("leading-none font-semibold", className)}
{...props}
/>
)
}
function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="card-description"
className={cn("text-sm text-muted-foreground", className)}
{...props}
/>
)
}
function CardAction({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="card-action"
className={cn(
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
className
)}
{...props}
/>
)
}
function CardContent({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="card-content"
className={cn("px-6", className)}
{...props}
/>
)
}
function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="card-footer"
className={cn("flex items-center px-6 [.border-t]:pt-6", className)}
{...props}
/>
)
}
export {
Card,
CardHeader,
CardFooter,
CardTitle,
CardAction,
CardDescription,
CardContent,
}
+30
View File
@@ -0,0 +1,30 @@
import * as React from "react"
import { CheckIcon } from "lucide-react"
import { Checkbox as CheckboxPrimitive } from "radix-ui"
import { cn } from "@/shared/lib/utils"
function Checkbox({
className,
...props
}: React.ComponentProps<typeof CheckboxPrimitive.Root>) {
return (
<CheckboxPrimitive.Root
data-slot="checkbox"
className={cn(
"peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary",
className
)}
{...props}
>
<CheckboxPrimitive.Indicator
data-slot="checkbox-indicator"
className="grid place-content-center text-current transition-none"
>
<CheckIcon className="size-3.5" />
</CheckboxPrimitive.Indicator>
</CheckboxPrimitive.Root>
)
}
export { Checkbox }
+158
View File
@@ -0,0 +1,158 @@
"use client"
import * as React from "react"
import { XIcon } from "lucide-react"
import { Dialog as DialogPrimitive } from "radix-ui"
import { cn } from "@/shared/lib/utils"
import { Button } from "@/shared/ui/button"
function Dialog({
...props
}: React.ComponentProps<typeof DialogPrimitive.Root>) {
return <DialogPrimitive.Root data-slot="dialog" {...props} />
}
function DialogTrigger({
...props
}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {
return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />
}
function DialogPortal({
...props
}: React.ComponentProps<typeof DialogPrimitive.Portal>) {
return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />
}
function DialogClose({
...props
}: React.ComponentProps<typeof DialogPrimitive.Close>) {
return <DialogPrimitive.Close data-slot="dialog-close" {...props} />
}
function DialogOverlay({
className,
...props
}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {
return (
<DialogPrimitive.Overlay
data-slot="dialog-overlay"
className={cn(
"fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",
className
)}
{...props}
/>
)
}
function DialogContent({
className,
children,
showCloseButton = true,
...props
}: React.ComponentProps<typeof DialogPrimitive.Content> & {
showCloseButton?: boolean
}) {
return (
<DialogPortal data-slot="dialog-portal">
<DialogOverlay />
<DialogPrimitive.Content
data-slot="dialog-content"
className={cn(
"fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg",
className
)}
{...props}
>
{children}
{showCloseButton && (
<DialogPrimitive.Close
data-slot="dialog-close"
className="absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
>
<XIcon />
<span className="sr-only">Close</span>
</DialogPrimitive.Close>
)}
</DialogPrimitive.Content>
</DialogPortal>
)
}
function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="dialog-header"
className={cn("flex flex-col gap-2 text-center sm:text-left", className)}
{...props}
/>
)
}
function DialogFooter({
className,
showCloseButton = false,
children,
...props
}: React.ComponentProps<"div"> & {
showCloseButton?: boolean
}) {
return (
<div
data-slot="dialog-footer"
className={cn(
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
className
)}
{...props}
>
{children}
{showCloseButton && (
<DialogPrimitive.Close asChild>
<Button variant="outline">Close</Button>
</DialogPrimitive.Close>
)}
</div>
)
}
function DialogTitle({
className,
...props
}: React.ComponentProps<typeof DialogPrimitive.Title>) {
return (
<DialogPrimitive.Title
data-slot="dialog-title"
className={cn("text-lg leading-none font-semibold", className)}
{...props}
/>
)
}
function DialogDescription({
className,
...props
}: React.ComponentProps<typeof DialogPrimitive.Description>) {
return (
<DialogPrimitive.Description
data-slot="dialog-description"
className={cn("text-sm text-muted-foreground", className)}
{...props}
/>
)
}
export {
Dialog,
DialogClose,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogOverlay,
DialogPortal,
DialogTitle,
DialogTrigger,
}
+21
View File
@@ -0,0 +1,21 @@
import * as React from "react"
import { cn } from "@/shared/lib/utils"
function Input({ className, type, ...props }: React.ComponentProps<"input">) {
return (
<input
type={type}
data-slot="input"
className={cn(
"h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30",
"focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
"aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",
className
)}
{...props}
/>
)
}
export { Input }
+22
View File
@@ -0,0 +1,22 @@
import * as React from "react"
import { Label as LabelPrimitive } from "radix-ui"
import { cn } from "@/shared/lib/utils"
function Label({
className,
...props
}: React.ComponentProps<typeof LabelPrimitive.Root>) {
return (
<LabelPrimitive.Root
data-slot="label"
className={cn(
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
className
)}
{...props}
/>
)
}
export { Label }
+190
View File
@@ -0,0 +1,190 @@
"use client"
import * as React from "react"
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react"
import { Select as SelectPrimitive } from "radix-ui"
import { cn } from "@/shared/lib/utils"
function Select({
...props
}: React.ComponentProps<typeof SelectPrimitive.Root>) {
return <SelectPrimitive.Root data-slot="select" {...props} />
}
function SelectGroup({
...props
}: React.ComponentProps<typeof SelectPrimitive.Group>) {
return <SelectPrimitive.Group data-slot="select-group" {...props} />
}
function SelectValue({
...props
}: React.ComponentProps<typeof SelectPrimitive.Value>) {
return <SelectPrimitive.Value data-slot="select-value" {...props} />
}
function SelectTrigger({
className,
size = "default",
children,
...props
}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
size?: "sm" | "default"
}) {
return (
<SelectPrimitive.Trigger
data-slot="select-trigger"
data-size={size}
className={cn(
"flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
className
)}
{...props}
>
{children}
<SelectPrimitive.Icon asChild>
<ChevronDownIcon className="size-4 opacity-50" />
</SelectPrimitive.Icon>
</SelectPrimitive.Trigger>
)
}
function SelectContent({
className,
children,
position = "item-aligned",
align = "center",
...props
}: React.ComponentProps<typeof SelectPrimitive.Content>) {
return (
<SelectPrimitive.Portal>
<SelectPrimitive.Content
data-slot="select-content"
className={cn(
"relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
position === "popper" &&
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
className
)}
position={position}
align={align}
{...props}
>
<SelectScrollUpButton />
<SelectPrimitive.Viewport
className={cn(
"p-1",
position === "popper" &&
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
)}
>
{children}
</SelectPrimitive.Viewport>
<SelectScrollDownButton />
</SelectPrimitive.Content>
</SelectPrimitive.Portal>
)
}
function SelectLabel({
className,
...props
}: React.ComponentProps<typeof SelectPrimitive.Label>) {
return (
<SelectPrimitive.Label
data-slot="select-label"
className={cn("px-2 py-1.5 text-xs text-muted-foreground", className)}
{...props}
/>
)
}
function SelectItem({
className,
children,
...props
}: React.ComponentProps<typeof SelectPrimitive.Item>) {
return (
<SelectPrimitive.Item
data-slot="select-item"
className={cn(
"relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
className
)}
{...props}
>
<span
data-slot="select-item-indicator"
className="absolute right-2 flex size-3.5 items-center justify-center"
>
<SelectPrimitive.ItemIndicator>
<CheckIcon className="size-4" />
</SelectPrimitive.ItemIndicator>
</span>
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
</SelectPrimitive.Item>
)
}
function SelectSeparator({
className,
...props
}: React.ComponentProps<typeof SelectPrimitive.Separator>) {
return (
<SelectPrimitive.Separator
data-slot="select-separator"
className={cn("pointer-events-none -mx-1 my-1 h-px bg-border", className)}
{...props}
/>
)
}
function SelectScrollUpButton({
className,
...props
}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {
return (
<SelectPrimitive.ScrollUpButton
data-slot="select-scroll-up-button"
className={cn(
"flex cursor-default items-center justify-center py-1",
className
)}
{...props}
>
<ChevronUpIcon className="size-4" />
</SelectPrimitive.ScrollUpButton>
)
}
function SelectScrollDownButton({
className,
...props
}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {
return (
<SelectPrimitive.ScrollDownButton
data-slot="select-scroll-down-button"
className={cn(
"flex cursor-default items-center justify-center py-1",
className
)}
{...props}
>
<ChevronDownIcon className="size-4" />
</SelectPrimitive.ScrollDownButton>
)
}
export {
Select,
SelectContent,
SelectGroup,
SelectItem,
SelectLabel,
SelectScrollDownButton,
SelectScrollUpButton,
SelectSeparator,
SelectTrigger,
SelectValue,
}
+26
View File
@@ -0,0 +1,26 @@
import * as React from "react"
import { Separator as SeparatorPrimitive } from "radix-ui"
import { cn } from "@/shared/lib/utils"
function Separator({
className,
orientation = "horizontal",
decorative = true,
...props
}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
return (
<SeparatorPrimitive.Root
data-slot="separator"
decorative={decorative}
orientation={orientation}
className={cn(
"shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
className
)}
{...props}
/>
)
}
export { Separator }
+31
View File
@@ -0,0 +1,31 @@
import { cn } from '@/shared/lib/utils'
const sizeMap = {
xs: 'w-3 h-3 border',
sm: 'w-4 h-4 border-2',
md: 'w-5 h-5 border-2',
lg: 'w-8 h-8 border-[3px]',
xl: 'w-12 h-12 border-4',
} as const
type SpinnerSize = keyof typeof sizeMap
interface SpinnerProps {
size?: SpinnerSize
className?: string
label?: string
}
export function Spinner({ size = 'md', className, label }: SpinnerProps) {
return (
<span
role="status"
aria-label={label ?? '로딩 중'}
className={cn(
'inline-block rounded-full border-current border-t-transparent animate-spin',
sizeMap[size],
className,
)}
/>
)
}
+60
View File
@@ -0,0 +1,60 @@
import { cn } from '@/shared/lib/utils'
type StatusVariant = 'critical' | 'warning' | 'good' | 'info' | 'neutral'
const variantMap: Record<StatusVariant, string> = {
critical:
'bg-status-critical-bg text-status-critical-text border-status-critical-border',
warning:
'bg-status-warning-bg text-status-warning-text border-status-warning-border',
good:
'bg-status-good-bg text-status-good-text border-status-good-border',
info:
'bg-status-info-bg text-status-info-text border-status-info-border',
neutral:
'bg-muted text-muted-foreground border-border',
}
const dotMap: Record<StatusVariant, string> = {
critical: 'bg-status-critical-dot',
warning: 'bg-status-warning-dot',
good: 'bg-status-good-dot',
info: 'bg-status-info-dot',
neutral: 'bg-muted-foreground',
}
interface StatusBadgeProps {
variant?: StatusVariant
/** 좌측 상태 점 표시 */
withDot?: boolean
size?: 'sm' | 'md'
className?: string
children: React.ReactNode
}
export function StatusBadge({
variant = 'neutral',
withDot = false,
size = 'md',
className,
children,
}: StatusBadgeProps) {
return (
<span
className={cn(
'inline-flex items-center gap-1.5 rounded-full border font-medium whitespace-nowrap',
size === 'sm' ? 'px-2 py-0.5 text-xs' : 'px-2.5 py-1 text-xs',
variantMap[variant],
className,
)}
>
{withDot && (
<span
aria-hidden
className={cn('inline-block w-1.5 h-1.5 rounded-full', dotMap[variant])}
/>
)}
{children}
</span>
)
}
+91
View File
@@ -0,0 +1,91 @@
"use client"
import * as React from "react"
import { cva, type VariantProps } from "class-variance-authority"
import { Tabs as TabsPrimitive } from "radix-ui"
import { cn } from "@/shared/lib/utils"
function Tabs({
className,
orientation = "horizontal",
...props
}: React.ComponentProps<typeof TabsPrimitive.Root>) {
return (
<TabsPrimitive.Root
data-slot="tabs"
data-orientation={orientation}
orientation={orientation}
className={cn(
"group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",
className
)}
{...props}
/>
)
}
const tabsListVariants = cva(
"group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none",
{
variants: {
variant: {
default: "bg-muted",
line: "gap-1 bg-transparent",
},
},
defaultVariants: {
variant: "default",
},
}
)
function TabsList({
className,
variant = "default",
...props
}: React.ComponentProps<typeof TabsPrimitive.List> &
VariantProps<typeof tabsListVariants>) {
return (
<TabsPrimitive.List
data-slot="tabs-list"
data-variant={variant}
className={cn(tabsListVariants({ variant }), className)}
{...props}
/>
)
}
function TabsTrigger({
className,
...props
}: React.ComponentProps<typeof TabsPrimitive.Trigger>) {
return (
<TabsPrimitive.Trigger
data-slot="tabs-trigger"
className={cn(
"relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
"group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent",
"data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground",
"after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",
className
)}
{...props}
/>
)
}
function TabsContent({
className,
...props
}: React.ComponentProps<typeof TabsPrimitive.Content>) {
return (
<TabsPrimitive.Content
data-slot="tabs-content"
className={cn("flex-1 outline-none", className)}
{...props}
/>
)
}
export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants }
+18
View File
@@ -0,0 +1,18 @@
import * as React from "react"
import { cn } from "@/shared/lib/utils"
function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
return (
<textarea
data-slot="textarea"
className={cn(
"flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",
className
)}
{...props}
/>
)
}
export { Textarea }