@chriselements
I asked Claude Code if its app was ready for production. Then I rebuilt it on Elements.
No. Elements deploys to any Ubuntu server you reach over SSH. I used AWS in the video, and DigitalOcean, Hetzner or a server in your office work the same way. Every server runs the same three…Why Claude Code runs db:reset on production (and how Elements stops it)
Add tx=false to the build tag at the top of that migration file: /** @migration tx=false */ drop index concurrently if exists ordersCustomerIdIdx; create index concurrently ordersCustomerIdIdx on…Why Claude Code runs db:reset on production (and how Elements stops it)
Name the environments in the build tag at the top of the migration file: /** @migration env=development,staging */ The build applies that migration in development and in staging, and a production…Why Claude Code runs db:reset on production (and how Elements stops it)
Claude Code writes it. In the video I typed each migration by hand so you could see every step. Normally you tell Claude what you want, like "add a due date to tasks". Claude runs elements create…I asked Claude Code if its app was ready for production. Then I rebuilt it on Elements.
Not for building and testing. The build on your laptop type checks the code and runs the tests every time a file is saved, and a deploy stops if that build has an error. Then every server builds the…I asked Claude Code if its app was ready for production. Then I rebuilt it on Elements.
Yes. Every Elements project has one build server. Your terminal, your editor and every agent connect to that build server. Their file saves, build requests, installs and test runs all go into one…I asked Claude Code if its app was ready for production. Then I rebuilt it on Elements.
Yes. Install Elements, create a new app, and ask Claude Code to port your existing app into it. Give Claude the folder with your current code. An agent can port an app to Elements easily. Your pages…I asked Claude Code if its app was ready for production. Then I rebuilt it on Elements.
Yes. Elements is a program on your computer, and any agent that can run a terminal command can use it. We use Claude Code in the videos, and Codex and Cursor work the same way. The agent saves a file,…Why Claude Code runs db:reset on production (and how Elements stops it)
Deploy with the -maint flag: elements deploy -maint The build, the test database migration and the tests all run with your site up. The maintenance page goes up on every machine just before the…Why Claude Code runs db:reset on production (and how Elements stops it)
The first machine in the environment's list. Every app server builds the new release and runs the tests, and the first machine is the only one that migrates the production database. Elements also hold…Why Claude Code runs db:reset on production (and how Elements stops it)
Agents usually don't do destructive things on purpose. They're trying to reach a goal. The problem comes when you tell an agent to update the database schema and give it no constraints, and it runs a…Why Claude Code runs db:reset on production (and how Elements stops it)
In production, migrations only go forward. To undo one, add a new migration that corrects the change, and deploy it. If a migration renamed a column and you want the old name, the new migration…Claude Code built a full CRM on Elements from one prompt. Here's what it costs to run.
Yes. Describe your business in the prompt. For real estate, you might ask for listings, buyers and sellers, showings, and a closing date on each deal. For recruiting, you might ask for candidates,…Claude Code built a full CRM on Elements from one prompt. Here's what it costs to run.
In a Postgres database you own. On your laptop it's the Postgres that comes with Elements. In production we recommend a managed Postgres like Amazon RDS, in your own AWS account, which backs it up…Claude Code built a full CRM on Elements from one prompt. Here's what it costs to run.
Not for Elements. Elements is priced per machine, not per user, so the same monthly price covers you whether you have 2 reps or 20. The server cost doesn't really move either. A small sales team is…Claude Code built a full CRM on Elements from one prompt. Here's what it costs to run.
Ask your agent to deploy it. Elements needs an Ubuntu server it can SSH into, on AWS, DigitalOcean, Hetzner or wherever you like, and it takes care of the setup, HTTPS and every deploy after that. By…Claude Code built a full CRM on Elements from one prompt. Here's what it costs to run.
Yes. Export your contacts as a CSV from wherever they live now, put the file in your project, and ask your agent to import it. If you'll be doing it more than once, ask for an import page instead, so…Claude Code built my newsletter app on Elements from one prompt. It costs $26/mo to run.
Send through a service like Amazon SES rather than your own server. Then add the records SES gives you to your domain, which prove the mail really comes from you. If your domain is on AWS or…Claude Code built my newsletter app on Elements from one prompt. It costs $26/mo to run.
Every newsletter that goes out gets a row in the database, and each post in it is linked to that issue. On Friday the job picks only the published posts that aren't linked to an issue yet. If there…Claude Code built my newsletter app on Elements from one prompt. It costs $26/mo to run.
Sign in as an admin and click Admin in the header, or go to /admin. Click New post, write the title and the body in markdown, and check Published. The post goes up on the blog right away and is in the…Claude Code built my newsletter app on Elements from one prompt. It costs $26/mo to run.
Ask your agent to help you deploy the app. By default it will guide you towards AWS, and use the SES service for sending email. But you can use whatever service you'd like. For deployment, Elements…Why Elements doesn't use React
The UI updates at the lowest level of the data change. Only the minimum UI needed to reflect the changed data is updated. <div>{user.address.city}</div> <div>{user.address.state}</div> In this sample code, if the city changes only the first expression block is…Why Elements doesn't use React
There's numerous ways you can accomplish this, since you primarily have to update reactive data and the UI will update automatically. Below is a simple example. You can use elements man…Why Elements doesn't use React
Checkboxes and radio buttons are interesting because typically they're used in groups. The checkbox can also be used by itself. Here's a couple of examples: <form> <!-- select: one value --> <select…Why Elements doesn't use React
Elements HTML handles the automatic UI updates when reactive data changes. The data can be updated over the wire, or locally like in the counter example. In this example of the "row" you might be…7 things Claude Code needs to build a real app (and your stack has none of them)
Each deployment goes through several steps before it's actually live. If any step fails, the deploy stops, and your previous release is left alone. Migrations are first run against the test database.…7 things Claude Code needs to build a real app (and your stack has none of them)
We made this design decision many years ago, even before AI became a big deal! Back in the day, ORMs were all the rage. The idea was that somehow working with sql was messy, and not object oriented,…7 things Claude Code needs to build a real app (and your stack has none of them)
Not much. You rent virtual machines from a provider like AWS. They take care of giving you the raw box. Elements takes care of provisioning it and getting it ready for deploy and hosting your app.…7 things Claude Code needs to build a real app (and your stack has none of them)
We recommend deploying to AWS. Elements can deploy to any Ubuntu Linux server, as long as we can access the machine via SSH. As of today, Vercel abstracts away deployment and gives you what has…7 things Claude Code needs to build a real app (and your stack has none of them)
If you ask an agent today what stack it should use, it will often suggest these two. Next.js has become popular as the de facto web framework for React. Elements ships with its own default web…7 things Claude Code needs to build a real app (and your stack has none of them)
Claude can write code quickly, but it still needs a foundation to build and deploy on. Left on its own, it will reinvent its own building blocks, or find disparate open source packages and build…7 things Claude Code needs to build a real app (and your stack has none of them)
Thanks @atombot, I appreciate you.How to think about multiple sites and apps
@justin to be more precise on what to tell your agent... First, create your Digital Ocean droplet. And while you're in there, create a managed Postgres instance. Second, copy the connection details…Single Sign On
@justin No, libraries are fine, just be picky about them. If Elements already does it, use that. Auth is the main case: Elements already has your users, sessions and database working together, so an…Single Sign On
Got it, thanks! You don't need a third-party auth library for this. Make justin.com the sign-in hub. It already has your users table and their subscriptions in your own database. When someone visits…How to think about multiple sites and apps
@justin Your first purchase covers two licenses: one for your laptop and one for a deploy server, such as a DigitalOcean droplet. That's enough to get started. Elements installs Postgres on the deploy…Single Sign On
Do you mean something like OAuth for your own site, with Google, Github, etc as authentication providers? Or did you mean something else? If the former, you definitely do NOT need a third party…How to think about multiple sites and apps
Hi @justin, thanks for giving us your background and thoughtful analysis. I think this is a very exciting use case, and I can't wait to hear more about your experience unifying your business…Is there a reason you recommend Claude Code over others?
Also, the demos I've been doing with Claude desktop app are using the $20/mo plan and that's fine for getting an app finished. I haven't tested how long it would take to exhaust it. Our company has…Is there a reason you recommend Claude Code over others?
It's conceivable! My recommendation stems from two things: (1) I use Claude Code myself extensively, in the terminal. (2) And, of the more desktop vibe coding apps, I found Claude desktop app to be…