create-nevr
v0.3.5
Published
Create a new Nevr project - Nevr write boilerplate again
Maintainers
Readme
🚀 Create Your Project
npm create nevr@latestThat's it. The wizard guides you through setup.
⚡ One-Liner (Non-Interactive)
npm create nevr@latest my-api -t express -d postgresql --auth --no-interactive🎯 CLI Options
| Option | Alias | Description |
|--------|-------|-------------|
| --template <name> | -t | express or hono |
| --database <db> | -d | sqlite, postgresql, mysql |
| --auth | | Include authentication |
| --no-auth | | Skip authentication |
| --pm <manager> | -p | npm, pnpm, or bun |
| --no-install | | Skip dependency installation |
| --no-interactive | | Use defaults, no prompts |
📁 What You Get
my-api/
├── src/
│ ├── entities/ # Your domain models
│ ├── plugins/ # Plugin configurations
│ ├── hooks/ # Lifecycle hooks
│ ├── routes/ # Custom endpoints
│ ├── nevr.config.ts # Main configuration
│ └── server.ts # Entry point
├── prisma/ # Database schema
├── package.json
├── tsconfig.json
└── .env🎬 After Creation
cd my-api
# Generate Prisma schema
npm run generate
# Create database tables
npm run db:push
# Start development
npm run devYour API is live at http://localhost:3000/api 🎉
📜 Available Scripts
| Script | Description |
|--------|-------------|
| npm run dev | Start with hot reload |
| npm run build | Production build |
| npm run generate | Generate schema & types |
| npm run db:push | Push schema to database |
| npm run db:migrate | Create migration |
| npm run db:studio | Open Prisma Studio |
🔐 Authentication (Optional)
When --auth is enabled, you get:
// Endpoints auto-mounted at /api/auth/*
POST /api/auth/sign-up
POST /api/auth/sign-in
POST /api/auth/sign-out
GET /api/auth/sessionConfigure OAuth in src/plugins/auth.ts:
auth({
emailAndPassword: true,
socialProviders: {
google: { clientId: "...", clientSecret: "..." },
github: { clientId: "...", clientSecret: "..." },
},
})🌐 Templates
Express (Recommended)
Battle-tested Node.js framework. Great for most projects.
Hono
Ultrafast, edge-ready. Perfect for Cloudflare Workers, Vercel Edge.
📊 Databases
| Database | When to use | |----------|-------------| | SQLite | Development, small projects, embedded | | PostgreSQL | Production, complex queries, scale | | MySQL | Production, existing MySQL infrastructure |
📚 Related
| Package | Description |
|---------|-------------|
| nevr | Core framework |
| @nevr/cli | CLI commands |
| @nevr/generator | Code generator |
📄 License
MIT © Nevr Contributors
