Inspiration
Most template websites only provide predefined layouts using Bootstrap or Tailwind, and none of them let users create fully customized templates. This gap inspired the idea to build a tool that can generate templates dynamically based on user input.
What it does
The project uses the Gemini API to generate custom Next.js component templates. Users can describe what they want, and the system instantly produces clean, ready-to-use component code—removing the limitations of fixed, prebuilt templates.
How we built it
The project is built using Next.js, Tailwind CSS, and the Gemini API. User prompts are sent to Gemini, which responds with complete component code. The frontend handles the UI, and the API route manages requests to Gemini for generating templates.
Challenges we ran into
The biggest challenges were structuring effective prompts, ensuring stable API responses, and making sure the generated code was usable and properly formatted. Handling errors and maintaining consistent output quality also required fine-tuning.
Accomplishments that we're proud of
We successfully created a system that feels like a “custom template generator on demand.” It gives users freedom beyond traditional template libraries and makes component creation much faster. The clean UI and reliable code generation are major wins.
What we learned
We learned how to work with the Gemini API, refine prompts for consistent output, and integrate AI-powered code generation with a modern web framework like Next.js. We also gained experience in handling dynamic content and improving user experience.
What's next for Template-Code Generator
Next steps include supporting more frameworks like React Native and Vue, adding prebuilt prompt presets, improving UI customization, exporting complete pages, and eventually turning it into a full AI-powered website builder.
Built With
- geminapi
- javascript
- mongodb
- next-auth
- nextjs
Log in or sign up for Devpost to join the conversation.