bembajs
v1.3.0
Published
BembaJS - A Next.js-like framework for programming in Bemba language with full control flow and Chakra UI support
Downloads
58
Maintainers
Readme
BembaJS
BembaJS - A Next.js-like framework for programming in Bemba language 🇿🇲
🚀 Quick Start
Installation
# Install globally
npm install -g bembajs
# Or use with npx
npx bembajs --helpCreate Your First Project
# Using CLI
bemba panga my-app
# Using npm create (Next.js style)
npm create bembajs@latest my-appDevelopment
cd my-app
npm run dev
# Server starts at http://localhost:3000📚 CLI Commands
bemba panga <name> # Create new project
bemba tungulula # Start development server
bemba akha # Build for production
bemba lint # Lint Bemba code
bemba format # Format Bemba code
bemba --version # Show version
bemba help # Show help🏗️ Project Structure
my-app/
├── amapeji/ # Pages (like Next.js pages/)
│ ├── index.bemba
│ └── about.bemba
├── ifikopo/ # Components (like Next.js components/)
│ ├── Button.bemba
│ └── Card.bemba
├── maapi/ # API routes (like Next.js api/)
│ ├── hello.bemba
│ └── users.bemba
├── maungu/ # Static files (like Next.js public/)
│ ├── logo.png
│ └── style.css
└── package.json💻 Programmatic Usage
import { compile, createDevServer, build } from 'bembajs';
// Compile Bemba code
const result = compile(`
pangaIpepa('Home', {
umutwe: 'Mwaiseni ku BembaJS!',
ilyashi: 'Welcome to BembaJS framework'
});
`);
// Start dev server
const server = await createDevServer({
port: 3000,
watch: true
});
// Build for production
await build({
output: 'dist'
});🌟 Features
- 🇿🇲 Bemba Language - Program in your native Zambian language
- ⚡ Next.js-like - Familiar developer experience
- 🚀 Fast Development - Hot reload and instant feedback
- 📦 Component-based - Reusable Bemba components
- 🛣️ File-based Routing - Automatic route generation
- 🔧 CLI Tools - Powerful command-line interface
- 📱 Responsive - Mobile-first design
- 🎨 Modern UI - Beautiful default styling
🎯 Templates
Choose from multiple project templates:
- Base - Basic BembaJS application
- Dashboard - Admin dashboard with charts
- E-commerce - Online store template
- Blog - Content management system
🔧 Configuration
Create bemba.config.js in your project root:
module.exports = {
// Development server port
port: 3000,
// Build output directory
output: 'dist',
// Enable TypeScript
typescript: true,
// Custom Bemba folder names
folders: {
pages: 'amapeji',
components: 'ifikopo',
api: 'maapi',
static: 'maungu'
}
};🚀 Bun Support
BembaJS is optimized for Bun runtime:
# Install with Bun
bun install -g bembajs
# Create project with Bun
bun create bembajs my-app
# Development with Bun
bun run dev📖 Documentation
🤝 Contributing
We welcome contributions! Please see our Contributing Guide.
📄 License
MIT License - see LICENSE file for details.
🌍 Community
- Website: https://bembajs.dev
- GitHub: https://github.com/bembajs/bembajs
- Discord: https://discord.gg/bembajs
- Twitter: @BembaJS
Made with ❤️ in Zambia 🇿🇲
