@@ -10,6 +10,7 @@ import {
1010 DialogHeader ,
1111 DialogTitle ,
1212} from "@/components/ui/dialog" ;
13+ import { RadioGroup , RadioGroupItem } from "@/components/ui/radio-group" ;
1314import { useCreateApp } from "@/hooks/useCreateApp" ;
1415import { useCheckName } from "@/hooks/useCheckName" ;
1516import { useSetAtom } from "jotai" ;
@@ -38,6 +39,9 @@ export function CreateAppDialog({
3839 const setSelectedAppId = useSetAtom ( selectedAppIdAtom ) ;
3940 const [ appName , setAppName ] = useState ( "" ) ;
4041 const [ isSubmitting , setIsSubmitting ] = useState ( false ) ;
42+ const [ appType , setAppType ] = useState < "frontend" | "backend" | "fullstack" > (
43+ selectedBackendFramework ? "fullstack" : "frontend"
44+ ) ;
4145 const { createApp } = useCreateApp ( ) ;
4246 const { data : nameCheckResult } = useCheckName ( appName ) ;
4347 const router = useRouter ( ) ;
@@ -57,7 +61,8 @@ export function CreateAppDialog({
5761 const result = await createApp ( {
5862 name : appName . trim ( ) ,
5963 selectedTemplateId : template ?. id ,
60- selectedBackendFramework
64+ selectedBackendFramework,
65+ isFullStack : appType === "fullstack"
6166 } ) ;
6267 if ( template && NEON_TEMPLATE_IDS . has ( template . id ) ) {
6368 await neonTemplateHook ( {
@@ -102,6 +107,23 @@ export function CreateAppDialog({
102107
103108 < form onSubmit = { handleSubmit } >
104109 < div className = "grid gap-4 py-4" >
110+ < div className = "grid gap-2" >
111+ < Label > App Type</ Label >
112+ < RadioGroup value = { appType } onValueChange = { ( value : "frontend" | "backend" | "fullstack" ) => setAppType ( value ) } >
113+ < div className = "flex items-center space-x-2" >
114+ < RadioGroupItem value = "frontend" id = "frontend" />
115+ < Label htmlFor = "frontend" > Frontend (React)</ Label >
116+ </ div >
117+ < div className = "flex items-center space-x-2" >
118+ < RadioGroupItem value = "backend" id = "backend" />
119+ < Label htmlFor = "backend" > Backend Only</ Label >
120+ </ div >
121+ < div className = "flex items-center space-x-2" >
122+ < RadioGroupItem value = "fullstack" id = "fullstack" />
123+ < Label htmlFor = "fullstack" > Full Stack (Frontend + Backend)</ Label >
124+ </ div >
125+ </ RadioGroup >
126+ </ div >
105127 < div className = "grid gap-2" >
106128 < Label htmlFor = "appName" > App Name</ Label >
107129 < Input
0 commit comments