Urgent.News

What's breaking now, across thousands of outlets.

Tech

I built a CLI that scaffolds the boring parts of an AI SaaS — here's what it actually generates

Every AI SaaS project starts with the same two days of nothing-interesting: auth, a users table, an encrypted place to store provider API keys, a Prisma schema. Then you finally get to the part you actually wanted to build. I've been working on a CLI ( @chimerai/cli ) that scaffolds exactly that prefix. This post is about what it actually writes to disk — not what a landing page would claim —…

This article details a CLI tool called @chimerai/cli, which automates the creation of an AI SaaS project, handling common but unexciting elements like authentication, user management, encryption of API keys, and a basic Prisma schema. The tool prompted the user to customize features, with defaults including authentication, role-based access control, an admin dashboard, and analytics.

Users can opt for specific features like database type (PostgreSQL with Docker) or disable Docker entirely. The generated project structure includes app components, UI components, and utility libraries for various functionalities. Prisma is used for database operations, with models generated based on selected features. The CLI ensures secure handling of API keys through AES-256 encryption.

The stack leverages Next.js 14/15 App Router, API routes for backend functionality, TypeScript for type-safe user-facing code, and Python for AI orchestration using FastAPI and FastAI libraries. This approach aims to provide clear, inspectable code rather than a dependency that cannot be audited. The CLI also integrates with Next.js' authentication and provider management systems, allowing for flexible provider configuration.

Additionally, RBAC is implemented through resource-action permission strings, ensuring secure access control.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Python Error Handling: try/except for Beginners

📌 Quick Info Topic: Error handling in Python Target Audience: Beginners who've seen error messages but don't know how to handle them Goal: Stop being scared of errors and start handling them…

  • try/except statement catches and manages errors in Python code
  • Syntax includes try block with potential error code, except block to handle errors
  • try/except improves program resilience, handles user input errors gracefully

More from Thursday 24 September →