Feature Overview
Bejibun provides a comprehensive set of tools for building backend applications, APIs, realtime systems, and modern services using TypeScript and Bun. Rather than assembling dozens of independent libraries, Bejibun delivers a cohesive ecosystem where every component is designed to work together. This guide introduces the framework’s major features and provides a high-level overview of how they fit into your application architecture.The Complete Development Stack
A typical Bejibun application consists of several layers:HTTP Layer
The HTTP layer is responsible for receiving, processing, and responding to client requests.Routing
Routes define how incoming requests are handled.- HTTP methods
- Route parameters
- Route groups
- Prefixes
- Middleware
- Named routes
- Resource controllers
Controllers
Controllers organize request handling logic into dedicated classes.Middleware
Middleware executes before or after a request reaches a controller. Common use cases include:- Authentication
- Authorization
- Logging
- Request transformation
- Rate limiting
- API versioning
Request & Response Objects
Bejibun provides expressive APIs for working with incoming requests and outgoing responses. Request:- JSON
- Text
- Streams
- File downloads
- Redirects
Validation
Input validation is a critical part of application security and reliability. Bejibun integrates validation directly into the request lifecycle.- Type-safe validation
- Custom rules
- Database existence checks
- Unique constraints
- Custom messages
- Nested object validation
Database Layer
Most applications interact with one or more databases. Bejibun provides multiple tools for managing data efficiently.Query Builder
The Query Builder offers a fluent interface for constructing SQL queries.- SQL abstraction
- Dynamic query construction
- Database portability
- Parameter binding
ORM
Models represent database tables as TypeScript classes.- CRUD operations
- Relationships
- Query scopes
- Soft deletes
- Serialization
- Model events
Migrations
Migrations allow database schemas to evolve through version-controlled code.- Version control friendly
- Team collaboration
- Repeatable deployments
- Automated schema management
Seeders
Seeders populate databases with initial or testing data.Authentication & Authorization
Modern applications require secure access control. Bejibun provides tools for verifying user identity and controlling permissions.Authentication
Authentication determines who a user is. Examples:- Session Authentication
- JWT Authentication
- API Tokens
- OAuth Integrations
Authorization
Authorization determines what a user can do. Example:- Middleware
- Policies
- Gates
- Role systems
Caching
Caching improves application performance by storing frequently accessed data.- Memory Cache
- Redis
- Custom Drivers
File Storage
Applications often need to manage files. Bejibun provides a unified storage interface.- Local Storage
- S3-Compatible Storage
- Cloud Providers
Background Jobs
Not every task should execute during an HTTP request. Background jobs allow expensive operations to run asynchronously.- Email delivery
- Notifications
- Data processing
- Report generation
- AI workloads
Task Scheduling
Recurring tasks can be managed through the scheduler.- Daily reports
- Cache cleanup
- Data synchronization
- Maintenance operations
Realtime Communication
Applications increasingly require realtime capabilities. Bejibun supports event-driven communication through WebSockets.- Chat systems
- Notifications
- Live dashboards
- Collaborative tools
- Multiplayer applications
API Development
Bejibun is designed with API-first development in mind.REST APIs
Create scalable and maintainable APIs using familiar patterns.OpenAPI & Swagger
Generate interactive API documentation automatically.- Team collaboration
- Client integration
- API discovery
- Developer onboarding
API Versioning
Support multiple API versions simultaneously.CLI Tooling
Bejibun includes a command-line interface for common development tasks. Generate resources:TypeScript-First Development
Every feature within Bejibun is designed with TypeScript in mind. Benefits include:- Autocomplete
- Type inference
- Safer refactoring
- Better tooling support
- Improved maintainability
Built for Production
Bejibun is designed to support applications beyond the development environment. Production-focused features include:- Environment configuration
- Structured logging
- Error handling
- Validation
- Security tooling
- Background processing
- API documentation
- Deployment support
What’s Next?
Now that you have an overview of the framework’s capabilities, it’s time to build your first application. Continue to:- Installation
- Creating Your First Application
- Project Structure
- Configuration
- Request Lifecycle
