create-eldrin-project
v0.0.2
Published
Create Eldrin applications - scaffolds new projects with Cloudflare Workers, React, and D1
Maintainers
Readme
create-eldrin-project
Scaffold new Eldrin applications with a single command.
Usage
npm create eldrin-project@latest -- my-appOr using npx:
npx create-eldrin-project my-appInteractive Prompts
The CLI will ask you to choose:
- Project name - Name of your new project
- Cloud provider - Cloudflare Workers (more coming soon)
- Frontend framework - React (more coming soon)
- Database - SQLite/D1 (more coming soon)
- Port - Development server port (default: 4001)
- Developer ID - Your developer identifier (e.g., example.com)
- Developer name - Your name or organization name
Available Templates
Cloudflare + React + SQLite (Todo App)
A full-featured Todo application with:
- Frontend: React 19, TypeScript, Tailwind CSS
- Backend: Cloudflare Workers
- Database: D1 (SQLite at the edge)
- Features:
- Create, edit, delete todos
- Categories for organization
- Priority levels (low, medium, high)
- Due dates with overdue indicators
- Filter by status, priority, category
- Dark mode support
- Single-spa integration for Eldrin shell
After Creating a Project
cd my-app
npm install
npm run devOpen http://localhost:4001 (or your chosen port) in your browser.
Project Structure
my-app/
├── migrations/ # SQL migrations
├── scripts/ # Build scripts
├── src/ # React frontend
│ ├── components/ # React components
│ ├── main.tsx # Standalone entry
│ └── eldrin-*.tsx # Single-spa entry
├── worker/ # Cloudflare Worker API
├── package.json
├── vite.config.ts
└── wrangler.jsoncDeploying to Cloudflare
Create a D1 database:
wrangler d1 create my-app-dbUpdate
wrangler.jsoncwith the database ID from the outputDeploy:
npm run deploy
Development
Building the CLI
npm run buildTesting Locally
npm link
create-eldrin-project test-appAdding New Templates
- Create a new directory under
templates/(e.g.,aws-react-postgresql) - Add template files with
.templatesuffix for variable substitution - Update
src/prompts.tsto enable the new option - Build and publish
Template Variables
Templates support these variables:
| Variable | Example | Description |
|----------|---------|-------------|
| {{appName}} | My Todo App | Original project name |
| {{appNameKebab}} | my-todo-app | Kebab-case version |
| {{appNamePascal}} | MyTodoApp | PascalCase version |
| {{appNameCamel}} | myTodoApp | camelCase version |
| {{appNameSnake}} | my_todo_app | snake_case version |
| {{port}} | 4001 | Development server port |
| {{developerId}} | example.com | Developer identifier |
| {{developerName}} | Acme Inc | Developer display name |
License
MIT
