Luci UI is a modern AI-powered platform for generating dynamic themes, UI layout variations, and specialized React component artifacts using the Gemini API.
- AI-Driven Theme Generation: Create complete color palettes based on simple natural language prompts.
- Dynamic Theme Variations: Produce alternative style combinations derived from an existing theme.
- UI Artifact Creation: Generate functional, styled React components tailored to your design preferences using Tailwind CSS.
- Action Definition Management: Easily adjust the generative AI prompts and models from the administrative dashboard.
- Secure Local Key Management: Your Gemini API keys are encrypted at rest (AES-256-GCM) directly in your MongoDB database.
- Framework: Next.js 16 (App Router)
- Library: React 19
- Styling: Tailwind CSS v4
- Database: MongoDB with Mongoose ORM
- AI Integration:
@google/genai(Gemini API) - Authentication: JWT & secure local credential hashing (bcrypt)
Prerequisites: Node.js (v18+) and MongoDB.
Create a .env.local file at the root of the project by copying the example or creating a new one:
cp .env.example .env.localEnsure you set:
MONGODB_URI: Your MongoDB connection string.JWT_SECRET: A secure, random string for signing JSON Web Tokens.ENCRYPTION_KEY: A robust 32-byte hexadecimal string for encrypting API keys (e.g.openssl rand -hex 32).ALLOWED_EMAILS: A comma-separated list of emails allowed to sign up.
npm installBefore running the application, you must seed the database to create an administrative user and insert the AI Action Definitions.
- Open
scripts/seed-init-db.ts - Update the
SEED_USERconstant at the top of the file with your desired admin credentials (email, name, password). - Run the script:
npx tsx scripts/seed-init-db.tsNote: The password provided will be securely hashed before being stored in the database.
npm run devVisit http://localhost:9000 to log in with the admin user you just created.
You can easily run the entire stack (MongoDB and the Next.js app) using Docker Compose.
- Configure your
.env.localas described above. - Build and start the containers:
docker compose up --build -dThe application will be available at http://localhost:9000.