Skip to content

add security and dependency injection#28

Merged
Josephat-S merged 1 commit into
mainfrom
config/security
May 25, 2026
Merged

add security and dependency injection#28
Josephat-S merged 1 commit into
mainfrom
config/security

Conversation

@Josephat-S

Copy link
Copy Markdown
Contributor

This pull request introduces several improvements to the project generation workflow and template system, focusing on dynamic theming, dependency management, and animation support. The most significant changes include enabling conditional rendering and imports based on user-selected design themes, introducing an animation provider component for "Glassmorphism" designs, and improving dependency resolution during project generation. Additionally, environment variable validation and database connection handling have been added to the portfolio template.

Template theming and conditional logic:

  • Added a custom Handlebars eq helper in src/generate.js to enable conditional logic in templates, allowing for dynamic imports and UI changes based on the selected design theme.
  • Updated layout.tsx files in both ecommerce and portfolio templates to conditionally import and render theme-specific elements, such as the Terminal icon for the "Dark Terminal" design. [1] [2] [3] [4] [5]

Animation and UI enhancements:

  • Introduced an AnimationProvider component in both ecommerce and portfolio templates. For the "Glassmorphism" theme, this wraps children with a framer-motion animation; for other themes, it renders children directly. The provider is now used in main layout files to enhance page transitions. [1] [2] [3]

Project generation and dependency management:

  • Improved the project generation workflow in src/generate.js by adding a step to resolve and inject dynamic dependencies based on user choices before running npm install. Also, template rendering now supports .mjs files. [1] [2] [3]

Environment and database setup (portfolio template):

  • Added environment variable validation using Zod in env.mjs to ensure correctness and safety of sensitive configuration.
  • Implemented a lib/db.ts utility to manage and validate the database connection string using the new environment validation.

Closes #15

@Josephat-S Josephat-S requested a review from a team May 25, 2026 11:27
@Josephat-S Josephat-S merged commit 4e463b2 into main May 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ISSUE-008 — Wire Up Security Validation & Dynamic Dependencies

1 participant