Skip to content

Commit 7b285bc

Browse files
Fix starter template directory paths to match GitHub repository
Updated all githubRepo paths in STARTER_TEMPLATES to match the actual directory names in codinit-dev/starters repository. Changes: - Fixed template paths (codinit-expo-template → codinit-expo, etc.) - Updated Astro template to Astro Shadcn (only version available) - Added standalone Next.js template - Replaced Vanilla Vite with Vanilla JavaScript (js directory) - Replaced Vite Typescript with TypeScript (typescript directory) - Commented out unavailable templates (Remix, SolidJS) - Updated template detection mappings in Chat.client.tsx - Added documentation about directory naming requirements This fixes the 500 errors when loading starter templates.
1 parent e67d22f commit 7b285bc

2 files changed

Lines changed: 72 additions & 48 deletions

File tree

app/components/chat/Chat.client.tsx

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,23 +140,28 @@ function detectTemplateFromPrompt(message: string): string | null {
140140
// Template name mappings for common variations
141141
const templateMappings: Record<string, string> = {
142142
expo: 'Expo App',
143-
astro: 'Basic Astro',
143+
astro: 'Astro Shadcn',
144144
'next.js': 'Next.JS',
145145
nextjs: 'Next.JS',
146146
'next js': 'Next.JS',
147147
'vite shadcn': 'Vite Shadcn',
148148
shadcn: 'Vite Shadcn',
149149
qwik: 'Qwik Typescript',
150-
remix: 'Remix Typescript',
150+
151+
// remix: 'Remix Typescript', // Template not available yet
151152
slidev: 'Slidev',
152153
svelte: 'Sveltekit',
153154
sveltekit: 'Sveltekit',
154-
vanilla: 'Vanilla Vite',
155-
'vanilla vite': 'Vanilla Vite',
155+
vanilla: 'Vanilla JavaScript',
156+
'vanilla js': 'Vanilla JavaScript',
156157
vue: 'Vue',
157158
angular: 'Angular',
158-
solidjs: 'SolidJS',
159-
solid: 'SolidJS',
159+
typescript: 'TypeScript',
160+
161+
/*
162+
* solidjs: 'SolidJS', // Template not available yet
163+
* solid: 'SolidJS', // Template not available yet
164+
*/
160165
};
161166

162167
// Check for direct template name matches

app/utils/constants.ts

Lines changed: 61 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -36,37 +36,48 @@ PROVIDER_LIST.forEach((provider) => {
3636
* 1. Basic: "owner/repo" - Fetches from repository root
3737
* 2. Subdirectory: "owner/repo/path/to/subdirectory" - Fetches specific subdirectory
3838
*
39-
* Most templates use the monorepo format: "codinit-dev/starters/template-name"
39+
* All templates use the monorepo format: "codinit-dev/starters/template-name"
4040
* Where:
4141
* - owner: codinit-dev
4242
* - repo: starters
43-
* - subdirectory: template-name (e.g., codinit-expo-template, codinit-astro-basic-template)
43+
* - subdirectory: template-name (e.g., codinit-expo, astro-shadcn, nextjs-shadcn)
44+
*
45+
* Template directories must match exactly with the directory names in the starters repository:
46+
* https://github.com/codinit-dev/starters
4447
*/
4548
export const STARTER_TEMPLATES: Template[] = [
4649
{
4750
name: 'Expo App',
4851
label: 'Expo App',
4952
description: 'Expo starter template for building cross-platform mobile apps',
50-
githubRepo: 'codinit-dev/starters/codinit-expo-template',
53+
githubRepo: 'codinit-dev/starters/codinit-expo',
5154
tags: ['mobile', 'expo', 'mobile-app', 'android', 'iphone'],
5255
icon: 'i-codinit:expo',
5356
},
5457
{
55-
name: 'Basic Astro',
56-
label: 'Astro Basic',
57-
description: 'Lightweight Astro starter template for building fast static websites',
58-
githubRepo: 'codinit-dev/starters/codinit-astro-basic-template',
59-
tags: ['astro', 'blog', 'performance'],
58+
name: 'Astro Shadcn',
59+
label: 'Astro + shadcn/ui',
60+
description: 'Astro starter template integrated with shadcn/ui components for building fast static websites',
61+
githubRepo: 'codinit-dev/starters/astro-shadcn',
62+
tags: ['astro', 'blog', 'performance', 'shadcn'],
6063
icon: 'i-codinit:astro',
6164
},
6265
{
6366
name: 'NextJS Shadcn',
6467
label: 'Next.js with shadcn/ui',
6568
description: 'Next.js starter fullstack template integrated with shadcn/ui components and styling system',
66-
githubRepo: 'codinit-dev/starters/codinit-nextjs-shadcn-template',
69+
githubRepo: 'codinit-dev/starters/nextjs-shadcn',
6770
tags: ['nextjs', 'react', 'typescript', 'shadcn', 'tailwind'],
6871
icon: 'i-codinit:nextjs',
6972
},
73+
{
74+
name: 'Next.JS',
75+
label: 'Next.js',
76+
description: 'Next.js starter template for building full-stack React applications',
77+
githubRepo: 'codinit-dev/starters/nextjs',
78+
tags: ['nextjs', 'react', 'typescript', 'fullstack'],
79+
icon: 'i-codinit:nextjs',
80+
},
7081
{
7182
name: 'Vite Shadcn',
7283
label: 'Vite with shadcn/ui',
@@ -79,80 +90,88 @@ export const STARTER_TEMPLATES: Template[] = [
7990
name: 'Qwik Typescript',
8091
label: 'Qwik TypeScript',
8192
description: 'Qwik framework starter with TypeScript for building resumable applications',
82-
githubRepo: 'codinit-dev/starters/codinit-qwik-ts-template',
93+
githubRepo: 'codinit-dev/starters/codinit-qwik',
8394
tags: ['qwik', 'typescript', 'performance', 'resumable'],
8495
icon: 'i-codinit:qwik',
8596
},
86-
{
87-
name: 'Remix Typescript',
88-
label: 'Remix TypeScript',
89-
description: 'Remix framework starter with TypeScript for full-stack web applications',
90-
githubRepo: 'codinit-dev/starters/codinit-remix-ts-template',
91-
tags: ['remix', 'typescript', 'fullstack', 'react'],
92-
icon: 'i-codinit:remix',
93-
},
97+
98+
/*
99+
* Note: Remix template not available in starters repo yet
100+
* {
101+
* name: 'Remix Typescript',
102+
* label: 'Remix TypeScript',
103+
* description: 'Remix framework starter with TypeScript for full-stack web applications',
104+
* githubRepo: 'codinit-dev/starters/remix',
105+
* tags: ['remix', 'typescript', 'fullstack', 'react'],
106+
* icon: 'i-codinit:remix',
107+
* },
108+
*/
94109
{
95110
name: 'Slidev',
96111
label: 'Slidev Presentation',
97112
description: 'Slidev starter template for creating developer-friendly presentations using Markdown',
98-
githubRepo: 'codinit-dev/starters/codinit-slidev-template',
113+
githubRepo: 'codinit-dev/starters/slidev',
99114
tags: ['slidev', 'presentation', 'markdown'],
100115
icon: 'i-codinit:slidev',
101116
},
102117
{
103118
name: 'Sveltekit',
104119
label: 'SvelteKit',
105120
description: 'SvelteKit starter template for building fast, efficient web applications',
106-
githubRepo: 'codinit-dev/starters/codinit-sveltekit-template',
121+
githubRepo: 'codinit-dev/starters/sveltekit',
107122
tags: ['svelte', 'sveltekit', 'typescript'],
108123
icon: 'i-codinit:svelte',
109124
},
110125
{
111-
name: 'Vanilla Vite',
112-
label: 'Vanilla + Vite',
113-
description: 'Minimal Vite starter template for vanilla JavaScript projects',
114-
githubRepo: 'codinit-dev/starters/vanilla-vite-template',
115-
tags: ['vite', 'vanilla-js', 'minimal'],
116-
icon: 'i-codinit:vite',
126+
name: 'Vanilla JavaScript',
127+
label: 'Vanilla JS',
128+
description: 'Minimal JavaScript starter template for simple projects',
129+
githubRepo: 'codinit-dev/starters/js',
130+
tags: ['javascript', 'vanilla-js', 'minimal'],
131+
icon: 'i-codinit:javascript',
117132
},
118133
{
119134
name: 'Vite React',
120135
label: 'React + Vite + typescript',
121136
description: 'React starter template powered by Vite for fast development experience',
122-
githubRepo: 'codinit-dev/starters/codinit-vite-react-ts-template',
137+
githubRepo: 'codinit-dev/starters/codinit-vite-react-ts',
123138
tags: ['react', 'vite', 'frontend', 'website', 'app'],
124139
icon: 'i-codinit:react',
125140
},
126141
{
127-
name: 'Vite Typescript',
128-
label: 'Vite + TypeScript',
129-
description: 'Vite starter template with TypeScript configuration for type-safe development',
130-
githubRepo: 'codinit-dev/starters/codinit-vite-ts-template',
131-
tags: ['vite', 'typescript', 'minimal'],
142+
name: 'TypeScript',
143+
label: 'TypeScript',
144+
description: 'Basic TypeScript starter template for type-safe development',
145+
githubRepo: 'codinit-dev/starters/typescript',
146+
tags: ['typescript', 'minimal'],
132147
icon: 'i-codinit:typescript',
133148
},
134149
{
135150
name: 'Vue',
136151
label: 'Vue.js',
137152
description: 'Vue.js starter template with modern tooling and best practices',
138-
githubRepo: 'codinit-dev/starters/codinit-vue-template',
153+
githubRepo: 'codinit-dev/starters/vue',
139154
tags: ['vue', 'typescript', 'frontend'],
140155
icon: 'i-codinit:vue',
141156
},
142157
{
143158
name: 'Angular',
144159
label: 'Angular Starter',
145160
description: 'A modern Angular starter template with TypeScript support and best practices configuration',
146-
githubRepo: 'codinit-dev/starters/codinit-angular-template',
161+
githubRepo: 'codinit-dev/starters/angular',
147162
tags: ['angular', 'typescript', 'frontend', 'spa'],
148163
icon: 'i-codinit:angular',
149164
},
150-
{
151-
name: 'SolidJS',
152-
label: 'SolidJS Tailwind',
153-
description: 'Lightweight SolidJS starter template for building fast static websites',
154-
githubRepo: 'codinit-dev/starters/solidjs-ts-tw',
155-
tags: ['solidjs'],
156-
icon: 'i-codinit:solidjs',
157-
},
165+
166+
/*
167+
* Note: SolidJS template not available in starters repo yet
168+
* {
169+
* name: 'SolidJS',
170+
* label: 'SolidJS Tailwind',
171+
* description: 'Lightweight SolidJS starter template for building fast static websites',
172+
* githubRepo: 'codinit-dev/starters/solidjs',
173+
* tags: ['solidjs'],
174+
* icon: 'i-codinit:solidjs',
175+
* },
176+
*/
158177
];

0 commit comments

Comments
 (0)